473,698 Members | 2,808 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Run PHP-Script in Background

I am using php 5.0.4 under IIS 6 under Windows Server 2003 and want to
run a php-script as a separate process. This schript dies not have any
output. I tried several variants without success:

exec("c/php5/php.exe path/to/script parameters &") will run the schript
but will wait until the schript finished processing.

exec("c/php5/php.exe path/to/script parameters > null &") gives me the
error message "The specified CGI application exceeded the allowed time
for processing. The server has deleted the process."

Dealing with other variants of php cli procesors like php-win.exe gave
the same result. Also trying to use the start command did not help. My
head is burned out, what else could run my script under this
environment?

Thanks for any ideas.

Thomas

Sep 11 '05 #1
5 4967
Do you need your script to run constantly? Or should it run only once
after x-many days/hours/minutes?

I had a similar task to do in a W2K environment. I wrote a master PHP
script with set timings on when to run each secondary script bazed on
time of day. Then I just put that mster script in the Windows
scheduler so it runs every hour... That did my job but I don't know if
that's what you are looking for.

Sep 11 '05 #2
> Do you need your script to run constantly? Or should it run only once

It should run only once, and I need to send a parameter with. It's
actually a script which would run too long to wait on with the browser,
so it would run into the timeout limits. So I could look at the
progress with another script that runs periodically using a javascript
timer.

Sep 11 '05 #3
I can't think of how you can pass a parameter... perhaps through a
database... but for the timeout issue, you can dynamically set how long
you want your script to run.

Sep 11 '05 #4
Do you want to run the script as an INDEPENDENT process or start from
the web app and wait for the results?

If this is independent, maybe write the request in .net and update a
database?

You could also write a service on the machine to look for requests and
then process them.

On 11 Sep 2005 10:20:27 -0700, "Thomas" <tj@3sweb.net > wrote:
I am using php 5.0.4 under IIS 6 under Windows Server 2003 and want to
run a php-script as a separate process. This schript dies not have any
output. I tried several variants without success:

exec("c/php5/php.exe path/to/script parameters &") will run the schript
but will wait until the schript finished processing.

exec("c/php5/php.exe path/to/script parameters > null &") gives me the
error message "The specified CGI application exceeded the allowed time
for processing. The server has deleted the process."

Dealing with other variants of php cli procesors like php-win.exe gave
the same result. Also trying to use the start command did not help. My
head is burned out, what else could run my script under this
environment?

Thanks for any ideas.

Thomas


Sep 12 '05 #5
NC
Thomas wrote:

I am using php 5.0.4 under IIS 6 under Windows Server 2003 and want to
run a php-script as a separate process. This schript dies not have any
output. I tried several variants without success:

exec("c/php5/php.exe path/to/script parameters &") will run the schript
but will wait until the schript finished processing.


This is not Unix; "&" does not work here. Try this:

exec('start c:/php5/php.exe path/to/script parameters');

For more information, type "help start" at your Windows command
prompt.

Cheers,
NC

Sep 12 '05 #6

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

Similar topics

3
4044
by: lawrence | last post by:
I haven't been able to reach www.php.net for days. Most of the rest of the web is working for me, though I've bad trouble reaching any English sites. Anyone else having trouble?
6
38331
by: the wonderer | last post by:
This is an elementary question, but I've not been able to find the answer, so here goes: I am developing a site using php. I have the html header information in a file that I include in all the pages using the require_once function. That is, each page includes the line <?require_once('PageStart.php')?>
8
4033
by: Marcel | last post by:
I have a problem with a PHP page that seems to get executed twice. I am running PHP5 ISAPI on 2003 server. The script is a PHP page with a form. When the form is submitted one record have to be inserted in the database but when i look at the database after submitting the form there are two(!) records inserted so it looks like the script is executed twice. Can this be a proxy-setting or an ISA`server related subject???
0
1673
by: tsivaraman | last post by:
I am trying to build php-5.2.1 in RedHat Linux 9. I have installed libxml2-2.6.11,mysql-5.0.33,httpd-2.2.4(apache) successfully.When i do 'make' from the php directory,i get the following errors..Not able to proceed further.(./configure went smooth). I request you to provide suggestions to solve this problem. -5.2.1/include -I/lamp/php-5.2.1/main -I/lamp/php-5.2.1 -I/usr/local/ include/libxml2 -I/lamp/php-5.2.1/ext/date/lib...
0
4778
by: Yannick | last post by:
Hi, I'm Julien from France, We have recently install a new Web Server for my company The server is composed : - Linux RedHat RHEL4 U4 - Httpd-2.0.52-27.ent - Oracle Database 10.2.0.1
1
5791
by: Kesavan | last post by:
I install apache2 in /usr/local/apache2 and install php5 by ./configure --with-apxs2=/usr/local/apache2/bin/ apxs PHP is successfully installed in my system. But now my .php files inside /usr/local/apache2/htdocs doesn't get phrased. When I run suse-10-2:/home/kesavan # php info.php
0
2747
by: Benjamin Grieshaber | last post by:
Hi, I´m on SuSE 9.3 with xmlrpc-c and xmlrpc-c-devel installed (ver. 0.9.10) I tried to compile php with xmlrpc support and got the following errors: ext/xmlrpc/.libs/xmlrpc-epi-php.o(.text+0x359): In function `set_zval_xmlrpc_type': /php-5.2.5/ext/xmlrpc/xmlrpc-epi-php.c:1313: undefined reference to `XMLRPC_CreateValueDateTime_ISO8601'
9
2039
by: mekalai82 | last post by:
i have information.php file that file contain following coding <?php echo phpinfo(); ?> while i calling the URL ("http://localhost/information.php"). i am getting the coding <?php echo phpinfo(); ?> not show the php information...... i am new to the php can you help me?
4
4375
by: mechphisto | last post by:
I'm working on a friend's box, Fedora Core 6. It has PHP 5.1.6. I need to install mcrypt into it, and the only way I can find to do it is from source then recompile PHP. So I did all that, and got the latest PHP, 5.2.5. The ./configure finally went through OK. Make and make install. Then I restarted Apache... but the phpinfo() shows no change. It's still using 5.1.6. When I run "php -v" from command line I get a huge error I'll include...
5
4634
Chrisjc
by: Chrisjc | last post by:
Good afternoon, I am seeking some php configuration help. Here is the run down I am running Windows server 2003 and IIS V6.0 I have never had issues before until now. I have Symantec Antivirus 11.0 Manager, it controls all the Symantec clients in the company. Now it uses a web interface for all of its commands and settings which is called (SEPM) This reporting unit uses php, Symantec by default is loading its php.ini from “C:\Program...
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.