Re: Performance of PHP

From: Date: Tue, 06 Nov 2007 13:35:00 +0000
Subject: Re: Performance of PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-264104@lists.php.net to get a copy of this message
Merlin wrote: > Hi there, > > I am doing some image cropping of about 40.000 files with php. > To do this I wrote a PHP file that does what I want and I did disable > the timeout so I can call it via webbrowser and fire the script. > > There are two down sides I see: > 1. One image takes about 0.25 s, so the whole process would take about 3 > hours. > 2. During that time a spider could come along and find that file and > fire it again. > > Is it faster if I would issue this by command line on the linux server? > php filename.php > > Thank you for any help, Regardless of speed etc. (cmdline will have less overhead but probably isn't any faster or slower), I'd say that if you *can* run it via a command line, then why not? You seem to just be using apache as a trigger to start it going which doesn't seem to warrant any real need for a webserver at all. If you don't have access to the cmd line then make the page work with a simple POSTed form or behind a password protected page to stop spiders or other unauthorised people getting to it. Col

« previous php.general (#264104) next »