[PHP] PHP called recursively?
Hi PHP users, I have a couple of PHP scripts that generate dynamic content for a website. Now the admin of this website should be able to burn a CD of its pages, so I wrote another PHP script which calls the CGI PHP executable to get the content and write it down, like this: $content = `/usr/lib/httpd/cgi-bin/php4 /home/httpd/html/project/foo.php4`; But with this line, the server seems to call many many instances of PHP ... and I don't get the "content" I want ... The server engine for PHP is CGI. I tried to call "my" PHP4 with another path, e. g. $content = `/tmp/php4 ...` , but it's useless. I changed the "foo.php4" - and really easy scripts don't work at all, e. g. scripts that only contain phpinfo() or die() or something like that. Does anybody know why so many PHP instances are called? Yes, another possibility for my problem is to do it with fopen(http://localserver/...), but this is not very good I think because I have loops in my script, so for every loop an HTTP request is called ... very heavy for the webserver ... Thanks a lot, Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP called recursively?
Hi Chris, > if he wants to burn a cd why dont you just copy the php dir onto a cd? why > do you have to parse everything? as an admin I would rather the entire dir > then the content of the executed script. plus on your side parseing every > url recursivly and getting all the images etc, what a hasle, just copy the > dir .. But the PHP scripts generate HTML content out of a database - and as far as I know it is not very easy to run a database and a webserver on a CD ;-> Yes, it is possible, I know, but these CD's are given to his customers, so it must be easy to use ... And yes, at this time, I am parsing the content for substituting image paths, CSS paths and so on ... In the meantime, I had to solve the problem, so I did it via fopen(http://server/php-script.php4), but I am interested why it doesn't work with an "embedded" PHP script. Thanks! Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]