472,978 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,978 software developers and data experts.

running startup scripts at server startup?

I was wondering if PHP has some type of initialization functionality
at startup where I can run a script when the web server first boots
up?

I have an Apache server running PHP, and I would like whenever my web
server restarts to clean up some tables that have temporary
information in it.

I have searched through my PHP books and tried Googling, but as you
can imagine, most hits are about the apachectl startup script which is
not what I'm looking for.

Any help would be greatly appreciated!

Thanks,

Terry
Jul 17 '05 #1
2 2399
it would be best to put a link to your script in /etc/crond.daily/ rather
than when your server restarts, really how often does your server restart,
min restart about once every year.

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"T Stoneman" <ts********@hotmail.com> wrote in message
news:23**************************@posting.google.c om...
I was wondering if PHP has some type of initialization functionality
at startup where I can run a script when the web server first boots
up?

I have an Apache server running PHP, and I would like whenever my web
server restarts to clean up some tables that have temporary
information in it.

I have searched through my PHP books and tried Googling, but as you
can imagine, most hits are about the apachectl startup script which is
not what I'm looking for.

Any help would be greatly appreciated!

Thanks,

Terry

Jul 17 '05 #2
On 2004-01-29, T Stoneman <ts********@hotmail.com> wrote:
I have an Apache server running PHP, and I would like whenever my web
server restarts to clean up some tables that have temporary
information in it.


I'm using debian overhere, so all my startup scripts are in /etc/rcX.d/
(with X the runlevel). Actually those directories only containt symlinks
to /etc/init.d/scripts

So if i wanted something that is being called when apache is started,
i'd edit /etc/init.d/apache and add a call to the script in the start
section.

But that requires that nobody is using apachectl directly.

--
http://home.mysth.be/~timvw
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Peter Otten | last post by:
Is there a way to limit both width and height of a canvas text item? My current workaround seems clumsy: import Tkinter as tk root = tk.Tk() canvas = tk.Canvas(root, width=400, height=200,...
8
by: rbt | last post by:
Is there a recommended or 'Best Practices' way of checking the version of python before running scripts? I have scripts that use the os.walk() feature (introduced in 2.3) and users running 2.2 who...
3
by: Sravani | last post by:
Hi, I am setting up a new server for an already running website. The problem is the person before me ran ASP scripts on .html extension pages (The old machine is a windows 2000 server with IIS...
4
by: duzinga | last post by:
I am trying to have a server program that runs at startup and accepts several commands from the clients. One of the commands is to play an audio file. I am using...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
24
by: Mark | last post by:
Hi, I'm new to python and looking for a better idiom to use for the manner I have been organising my python scripts. I've googled all over the place about this but found absolutely nothing. I'm...
1
by: walterbyrd | last post by:
I understand that Python has them, but PHP doesn't. I think that is because mod_php is built into apache, but mod_python is not usually in apache. If mod_python was built into apache, would...
0
by: shaileshkumar | last post by:
hi, iam unable to run my applications in netbeans4.1. problem may be due to JVM or port numbers conflict. i did not intentionally change any port numbers . please guide me accordingly. iam...
22
by: V S Rawat | last post by:
(bringing the discussion here for php.general) I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL 5.0.51b. http://localhost/ is E:\wamp\www\ I have put the first php script...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.