Max_execution_time Ignored, Multiple Apache Processes Spawned
I have an app that is going berzerk on its own; without any code or environmental changes of any kind, for some bizarre reason it will randomly just hang, spawn multiple Apache processes and completely ignore max_execution_time, literally running infinitely.
Using PHP 5.2.0, Apache 1.3 and Win XP
Is this normal "bizarre" behavior that can occur within this setup; if so, what workarounds have you found to combat this, other than the obvious (try to debug and fix code)?
View Complete Forum Thread with Replies
Related Forum Messages:
Limiting The Number Of Spawned MySQL Child Processes
Need to know if there is any way to limit the number of spawned MySQL child processes in linux ? I have done my research at http://www.mysql.com and have not been able to find my answer. Have also looked at the source code (what i can understand of it). Using MySQL v.4.0.25-max. Using an older system and the 14 childern are just bogging the system down. I am the only one with access to the server so 14 childern is overkill.
View Replies !
Forking Multiple Processes At A Time
i have a php script that needs to execute an external php script (call this script 2) when the user clicks a link, however I don't want the user to have to wait until script 2 finishes executing before he sees the output of script one... i know I can use the exec() command to do this, and use the & to run the command in the background.... but say i want to run 100 instances of script 2 when the user clicks the link (with different arguments)... i dont want to have all 100 processes running at the same time... what I would like to do is run 10 or so at once, and once those 10 are completed, run another 10...
View Replies !
-d Max_execution_time
I'm writing a shell script under Red Hat 9 that will process some thousand records from a database so it'll normally take several minutes. According to manual I can override the max_execution_time directive using the -d switch. However, that switch seems to be ignored: #!/usr/bin/php -d max_execution_time=1 -q <? ........ ?> No matter what value I write (0, 1, 9999...) the script stops after 30 seconds: Maximum execution time of 30 seconds exceeded The scripts runs as root and PHP is not using safe mode. I'm probably missing something but I can't figure out what it is.
View Replies !
Max_execution_time 20
I noticed that my max_execution_time is set to 20 seconds. I do have a script that needs to run for more then 20 sec. Its messing with big files..
View Replies !
Max_execution_time And Fork
I use recursive readdir as the engine for a numerous file processing routines, including generating thumbnails, using getimagesize imagecreatetruecolor and imagejpeg, etc. where each resize operation involves instantiating a new resizer class instance. .....but my (shared host) website is large, so I run past max_execution_time if I try to make all thumbnails at once, from the top of my document_root. My virtual file system includes a php.ini which I can edit, but bumping max_execution-time (although the file saves) seems to have no effect, and I do not have permission to run /usr/sbin/apachectl restart Perhaps the php.ini change will start to work the next time the server reboots. In the mean time, is there some way to fork a new process, for instantiating the resizer? I could try to use exec to run command line php. But there must be a more elegant way to do this. I'd use perl and imagemagick, but my shared host server doesn't have the right perl libs installed, and that's another can of worms.
View Replies !
Max_execution_time Work Around
I have had occassion to send out mass emails, NOT SPAM. A few times the lists were so large that they blew out the max_execution_time. Besides changing that value in php.ini is there a way to work around it? I know sleep(); doesn't do anything, does flush(); have any effect?
View Replies !
Sleep And Max_Execution_Time
I have the following code: $i=0; while($i++<15) { mail("rantsh@hotmail.com",date("d m Y H:i:s"),"This is email # $i "); echo "mandado $i <br>"; sleep(60); } Now, I know my server has a 30 second max_execution_time setting... nonetheless, this code runs successfully!!!. Now, this is actually better for me (for the application I need to run)... Yet I'm concerned of why it's being allowed to run for 15 minutes if max_execution_time is set to 30. Code:
View Replies !
Microseconds And Max_execution_time
Does anyone know the relationship between microseconds and max_execution_time. My php.ini is set to 30 seconds for max_execution_time and one of my scripts just ran at 108 mircoseconds. What is the conversional relationship?
View Replies !
Apache And Multiple Site Developments
I have a number of sites using apache and php. Problems start to occur when I wish to do full development stuff with databases, includes etc. Fine, I can set one site to root so that all the includes and paths work OK. But how do you do with multiple sites. Subdomains sound a possibility but not on my local development machine (windows running apache) Code:
View Replies !
Apache/2.0.54 (Win32) PHP/5.0.5 Multiple Output
With the config mentioned in the topic, all on localhost, Win xpsp2, i created a caledar-table. The output should be a daily calendar for half a year with about 15 cols. So everything works fine on the console, output is as it should be. But when calling the script via apache, the table is either truncated or it comes twice or three times or i get an 404-Error with the table appended.
View Replies !
Alias In Apache, Require Across Multiple Websites
I've set up the following using an Alias in Apache... Alias /phpdocs/ "C:/Apache/htdocs/common/docs/php/" <Directory "C:/Apache/htdocs/common/docs/php"> Options Indexes FollowSymlinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> It works well for HTML, all sites have access to the information. I want to extend that to PHP require() and include() functions, however the following maps out to an incorrect folder. Okay, that's fine. My questions include, does PHP provide something that maps out to the Apache Alias directive? The common folder currently sits up two folders (../..) to the VirtualHost folders. I realize that possibly a PHP "include_path" directive could work. So the next question, anyone know of another way to accomplish this?
View Replies !
PHP Processes
I have a cronjob triggering a php script that takes several minutes to accomplish. I need to prevent multiple triggering by the cronjob mulfunctioning. So I would like a clean way to know how many instances of a certain php are currently working on the server. is there a server variable for that? if not, how do I know (via php) how many concurrent accesses are there to a certain php page? for example in mysql (the "SHOW PROCESSLIST" command), but I need a similar function for the php page iself.
View Replies !
Background Processes
I'd like to know how to send an external process to the background, so that I can run multiple instances of the same process at one time. Any tips, links.. etc?
View Replies !
Listing Processes In PHP
Using PHP, is it possible to return and display a list of currently running processes on the client's machine? In fact, is it possible to run a system command on a client's machine?
View Replies !
Automated Processes
Customers post 'projects' to my site. These 'projects' are closed after 10 days. I could run a script on the default.php page that detects this, but it seems a waste of resources to run it everytime someone visits the site. Is there a way around this, for example the first visitor to the site in any, say, 3 hour period, runs the script & switches the most recently outdated projects from open to closed?
View Replies !
Max Number Of Processes
how can i determine what the maximum number of processes i should open with popen (or proc_open) is? i assume it'd depend on the hardware of the computer in question, but if that were teh case, then is there a way to get info. about it, and some general method to determine a good number of processes to open from that info?
View Replies !
Stranded PHP Processes And ProcessExplorer
Does anyone know what it means if I see PHP processes in the process tree at the base level, instead of under the IIS worker process? I do nothing but web serving off of the box. These processes that are not under the IIS worker process seem to be stranded/hung. They are never cleaned up by any garbage collection and I have to kill them manually. They also always have a fairly low memory usage, potentially indicating that they fail before loading completely. Could it be that the execution of the process fails early enough that ProcessExplorer doesn't see them as being executed by IIS?
View Replies !
Handling Long Processes
I am building web app, that will run a long processs (image processing) that can porbably take 15-30 minutes to complete) in respond to a user request (the user clicks a "process" button on a php web form). The ideal situation that I see is once the user's request was recevied, a reply that says "you request is being processed. we will send you email once finished", will be sent to the user, while the other process will take place. When it's finished, a callback function will be called that sends email to the user notifying him the process outcome. What are the options to implement that? multithreading?
View Replies !
Shared Memory Between 2 Processes?
I have two running php processes (they have infinite loops) and I need them to pass some data to eachother. Writing and reading shared memory in one process works just fine but when I try to save var in process1 and read in process2 I get error: "Variable key 555 doesn't exist". What I'm doing wrong? //PROCESS 1 (saving var) $key = 'My Key' $value = 'My Value' $app = 'lovelyapp' $key = $key . 'a' $segment_key = abs(crc32($app . $key)); $segment_size = 1024; $segment_perms = 0600; $shm_id = shm_attach($segment_key, $segment_size, $segment_perms); shm_put_var($shm_id, 555, $value); shm_detach($shm_id); // PROCESS 2 (reading var) $key = 'My Key' $app = 'lovelyapp' $key = $key . 'a' $segment_key = abs(crc32($app . $key)); $segment_size = 1024; $segment_perms = 0600; $shm_id = shm_attach($segment_key, $segment_size, $segment_perms); $value = shm_get_var($shm_id, 555); shm_detach($shm_id);
View Replies !
Insert Processes Before Form Is Submitted
I am trying to stop using Macromedia as my crutch and you guys have been a big help. I need some assistance with submitting a form. I have a form on my page and need to do an insert. I have the action posting it back to the same page I am on versus sending it to an insert page. The problem I am having is it trys to do the insert as soon as I pull up the page instead of waiting till the form is submitted. I believe I need to do something with isset, but can't really find a tutorial that goes over it really well. Code:
View Replies !
Large Data Transfer Between 2 Processes
fist the context: I have a web server which query a mySql database. but as the number of parralel queries increase, the server slows down too much. I got 2 ideas, one of which is to run N deamons which effectively execute requests. the PHP uses message queuing(1) to queue queries request to the daemons. but the answer may be quite large, larger than messages the message queueing service can handle. I thought to open back a communication link between the current daemon and the waiting PHP to tranfer/process the result, using the message queueing service to send back info regarding the opened link. I thought to open a pipe between the current daemon and the PHP. is this possible? and if so, how? if not, is an IP link to localhost be as fast as a pipe?
View Replies !
Keeping Users Informed In Lengthy PHP Processes
Often PHP processes take a long time, such as wildcard searching a PostgreSQL database, or generating thumbnails. The PHP host page does not display until the script is complete, so you can not effectively use code such as echo "Converting file ".$Infile; exec(convert $Infile $O8utfile); for realtime feedback to the user. How have others implemented a "progress meter" in PHP processes , one thought I had was to use Javascript redirection to call a PHP page with differing parameters each time .
View Replies !
Sending Signals To Processes As A Different User Than Owner Using Php
i know, it seems more to be a problem according to unix but i got it while developing software with php: i have 2 different users on a hp-ux machine that execute php scripts. they are both in the same group. these php scripts start background processes, i can communicate with using signals (sending with posix_kill, starting background processes via pcntl_fork). so i got severel background processes owned by my 2 users. the problem is i want to send signals as one of my 2 users to all my php background processes no matter who of my 2 users is the owner. is it possible other than using external tools like sudo? i'm using: PHP 4.3.4 (cgi) (built: Aug 18 2004 15:37:46) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies compiled with: ../configure' '--prefix=/usr/local/php-cgi-saprfc' '--enable-calendar' '--enable-filepro' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-zlib-dir=/usr/local' '--without-mysql' '--enable-sysvsem' '--enable-sysvshm' '--with-pgsql=/usr/local/pgsql' '--enable-trans-sid' '--with-cpdflib=/usr/local' '--enable-sockets' '--with-ncurses=/usr/local' '--disable-shared' '--with-tsrm-pthreads' '--with-saprfc=/usr/local/rfcsdk' '--enable-pcntl
View Replies !
Checkboxes - Loop That Takes The Values And Processes And Writes The Changes To The Database.
I generate a form page from my MySQL database. let's say the table structure is: Table A > ID, title, active the number of rows generated by the query is dynamic. If a field's value is 1, then the form output appears as <input type=checkbox name=$ID checked> $title and if not <input type=checkbox name=$ID> $title At the bottom of the form there is a submit button. The visitor can check/uncheck rows and then submit the form. I need to write a loop (possibly foreach) that takes the values and processes them and writes the changes to the database.
View Replies !
Build A Page That Takes Form Data, Processes It In A Second Page
I'm trying to build a page that takes form data, processes it in a second page, then sends the user to a third,depending on data processing. On the second page, I am trying to get the page to have some sort of "Loading" message while the backend processes the data, but I can't seem to get anything to work. Does anyone know how I can get that Loading message to display?
View Replies !
Can You Pull Multiple Pages Somehow Using Multiple Curl_exec's Before Calling Curl_close?
so after mulling over some way to use keep-alives with fsockopen I figured it would be easier to just switch to CURL which happens to support a ton of stuff including persistent connections. I did some reading and all I could find was to take advantage of persistent connections one only has to specify multiple URLS with setopt before calling exec: curl_setopt($ch, CURLOPT_URL, "http://www.example/"); curl_setopt($ch, CURLOPT_URL, "http://www.example.com/anotherpage.html"); and so on... I put together a test script to see how the output would look but all I found was the last URL being displayed where I expected to see all specified pages spit out one after another in one page. Am I doing this wrong, or maybe my home wamp setup isn't configured properly? Perhaps the persistent connection thing is for the same curl session.. can you pull multiple pages somehow using multiple curl_exec's before calling curl_close? or are you supposed to call curl_close once the page is downloaded and before doing functions on the output?
View Replies !
Selecting Multiple Values From Multiple Tables Using Checkboxes
I've been struggling with this for a bit but cannot seem to find a simpler, cleaner way of doing this. a. I have a Table A - Customers , Table B - Contacts . b. I have a form where a user types the first few alphabets of a customer name and then gets a list of contacts, cities. c. The user is supposed to select multiple options from this list and then send that data to another form for processing. I'm able to only pass data from Table A, not from B . Could someone please have a look at the 2 snippets of code and advise? And is there a way both these php scripts could be combined in a single one ? Code:
View Replies !
Grabbing Data From Multiple Tables For Multiple Requests
Here's what I'm trying to get at. A table that displays all the Process Server's name, the number of summons's he has out within 7 days, 7-14 days and 15+ days...pretty simple, it's just a report so management can stay on top of how many papers are out. I've got the server_information table with the server name and ID. and a case_information table with the serverID. I've got a while loop that displays all the server's name, the problem is when I try to get the # of cases....here's what i've got so far. Code:
View Replies !
Multiple-combo - Multiple Mail Recipients
I am new to scripting but trying to create a page that lets users create an e-mail (mailto after having chosen from two drop-down menus (arrays). I have managed to do so in HTML by using a Java script borrowed from Randall Wald (http://www.rwald.com). However, I don't want the e-mail addresses to appear in the page to avoid spam. Is there a way to do so by using PHP? P.S.: The first array contains (University A, University B) and the second array (Faculty, Staff, Students), i.e. 6 different e-mail addresses
View Replies !
Multiple Users, Multiple Tables, One Form
I have a small group of users that will submit their 'goals' via one form (placed in a postnuke block). I have created one table (mysql) for each user to collect collect their goals. I need some direction in writing the php that will submit the form data to the correct table based upon the users Postnuke login.
View Replies !
Multiple Row Inserst From Multiple Line Textbox
I've been search for some help with this because I know someone has done it before. I'm trying to have a textbox and insert into a table one entry from each line of the textbox. So if the textbox contained: This info That info It would insert into the table ---------------- |1|This info| |2|That info| ---------------
View Replies !
Multiple Multiple Select Boxes
I'm looking to have multiple multiple-select-boxes on a page. But I can only get the contents from the last selected value within a box, via PHP. I've tried numerous methods. What am I doing wrong? You can see ALL the values present in the url: http://myserver/test.php?notify_use..._updcats=Update e.g.......
View Replies !
Multiple Forms/Multiple Submit
I have a form consisting of five pages. I don't want to program all five pages in one script because it's too much scrolling. So, I'm creating five form scripts, one for each page. When I reach page 2, I would like to show a button which will bring people back to Page 1 and a second button which will bring them to Page 3.
View Replies !
Multiple IIS Sites / Multiple Php.ini
I am running an IIS6 webserver hosting multiple sites using host headers. The multiple sites are working fine, but I am getting to a point now where I want to configure the sites to act differently with regards to php, such as reporting levels, smtp config, etc. How should I go about achieving this? I found some postings on the net to do this regarding apache, but not IIS. Do I alter the php.ini file somehow, or do I install multiple copies of php to different directories and make sure each one has its own .ini file in the local directory while removing the one from %systemroot% ? Am I just not even close to the right direction?
View Replies !
Apache 2.0 And Php
I was wondering if anyone has had any luck getting php to compile and work with apache 2.0. i use apache tool box to compile it but they dont have support for it yet. if anyone has compiled and tested it with the previouse beta's or rc's any info would be awesome!!!
View Replies !
CGI Vs Apache
Is there any difference on how PHP is wrote based on the server type? I have been using PHP on an Apache module and I just started using a CGI module but I am getting a lot of errors, mainly "Variable undefined" and when I tried to add records to a MYSQL database, I received this error: "CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers.
View Replies !
Php 4.2.0 And Apache 1.3.24
Why can't I run apps like phpnuke, postnuke, xoops, phpwebsite, etc.? I have tried them all seriously and always get the same effects. When I try to install either of them the pages never change even with register_globals On. Was I suppose to upgrade apache to 2.0.35 for compatibility issues?
View Replies !
Php 5.04 With Apache 2.0.54
I can build php 5.04 with apache 1.33 statically with the apache configuration option: --activate-module=src/modules/php5 How can I build php 5.04 with apache 2.0.54 statically? It seems that the information I have only shows how to build php as a dynamical module of apache.
View Replies !
PHP And Apache 2.0
I am installing Apache 2.0 with PHP. On top of PHP I plan on installing netjuke. I am having problems and have a strange issue: the following works: <? phpinfo(); ?> but the following does not worl. the source code appears on the page as if it is not being processed. <?php phpinfo(); ?>
View Replies !
Apache In Win Xp
I already installed Apache, Mysql and PHP (last version for each one) into my system running Win Xp. “All running ok” When I run scrip “A” my data lost; it didn’t print. Code:
View Replies !
Apache + PHP
I have installed Apache apache_2.0.52-win32-x86-no_ssl.msi and PHP php-4.3.10-Win32 on windows 2000 professional . I also get success in installeing both of them , but when i am trying to run apache C:/localhost on my mozilla or internet explorer browser , i am not able to get the default page, i don't know why its not working. I am a new learner of PHP and for the learning process i want to download it as soon as possible.
View Replies !
Anyone Using HP-UX With Apache, PHP And OCI?
I'm searching for someone who's using HP-UX 11.x with Apache and PHP with the OCI8 extension (for accessing Oracle). I'm having some issues while running this and would like to exchange some information. my environment is: HP-UX 11.11 Apache/2.0.49 from the hpuxwsApache package PHP 4.3.4 as included in that package OCI8 as included in that package (I also tried Apache 2.0.52 with PHP 4.3.8 but that didn't make a difference) when I'm enabling OCI8, Apache works fine, but the commandline PHP fails (and I need that as I have background processes, generating some reports). The error is: PHP Warning: Unknown(): Unable to load dynamic library '/opt/hpws/apache/php/lib/php/extensions/oci8.sl' - Can't find path for shared library: libclntsh.sl.8.0 in Unknown on line 0 after finding http://bugs.php.net/bug.php?id=13151 I managed to solve this by setting: export LD_PRELOAD=$ORACLE_HOME/JRE/lib/PA_RISC/native_threads/libjava.sl and now also PHP from the commandline works fine as well. but I've no clue if this is a good solution or there's a better way. but now I'm running into an issue with LDAP: ldap_bind() fails from a PHP script run from the commandline, while exactly the same code works perfectly fine through Apache - and it also works fine from the commandline when removing the LD_PRELOAD setting - but that removes the OCI8 functionality again... so I'm feeling stuck having the choice between LDAP and OCI8 - but my scripts uses both... (FUP to comp.sys.hp.hpux)
View Replies !
|