View Full Version : scheduled PHP exec
Halide
09-16-2002, 01:55 PM
I wanted to know if there's a way to schedule it... I figured out you could use windows "scheduler" to do it... that's nifty
imported_Gryphon
09-16-2002, 05:43 PM
cron job?
Uranium-235
09-16-2002, 06:16 PM
scheduler for Win
Cron Job for unix
iDxMan
09-16-2002, 10:02 PM
if you use the cgi version, yes.
Halide
09-19-2002, 07:03 PM
Originally posted by iDxMan
if you use the cgi version, yes.
how do you know if you have the cgi version? I got a php.exe which I can call with the script name as parameter
roninblade
09-19-2002, 10:51 PM
Originally posted by Halide
how do you know if you have the cgi version? I got a php.exe which I can call with the script name as parameter
using php as a cgi or module is just a matter of configuring your web server. for apache, in windows, the the CGI setup for php is to add these three lines to your httpd.conf :
- ScriptAlias /php/ "c:/php/"
- AddType application/x-httpd-php .php .phtml
- Action application/x-httpd-php "/php/php.exe"
if you want to use it as an apache module you need to add the lines :
- LoadModule php4_module c:/php/sapi/php4apache.dll
- AddType application/x-httpd-php .php .phtml
and copy the file php4ts.dll to your windows/system or winnt/system32 directory whichever version of windows you're using.
but note that php has a warning for using the CGI setup. read more about it here (http://www.php.net/manual/en/security.cgi-bin.php)
^BuGs^
09-20-2002, 12:43 PM
Umm. I am creating a PHP script that is going to be able to read the directory that as images and one text file with lines for what the caption would be for a piticular image because my camera holds 600 digital images and I when I submit the pictures to the school paper. So can php.exe on a CD excute the php script so it will read the cd and display all the images at a reduced. Anyone have any suggestions?
Grizzly
09-20-2002, 02:28 PM
You can't put php.exe on a CD and expect it to work. It has libraries it needs to access, and therefore needs to be actually "installed" on a system to function.
^BuGs^
09-20-2002, 03:57 PM
Even running as a CGI?
I think I could just make an HTML document and add:
#!/php
and then add:
<script type="PHP>
<?php echo "code here"; ?>
</script>
I might be wrong.. or.. I might be right.
Uranium-235
09-20-2002, 05:15 PM
with php.exe on a cd? no.
Maybe you could have apache on the cd and execute that. that would work.
then have your stuff in htdocs with your picture thing (index.php)
so all you would have to do is go into the local browser and type 'localhost'...
but other then that no
roninblade
09-20-2002, 11:48 PM
Originally posted by Grizzly
You can't put php.exe on a CD and expect it to work. It has libraries it needs to access, and therefore needs to be actually "installed" on a system to function.
actually if you copy all the php binary files on the cd, you can still parse your php files with it using php -f <filename>. i haven't tried it on an actual cd, though, but i sometimes test my scripts this way. ;)
Uranium-235
09-21-2002, 12:12 AM
Originally posted by ^BuGs^
it will read the cd and display all the images at a reduced. Anyone have any suggestions?
display as like display in a browser? cause you need apache for that. Unless you want to generate the html files in a temp dir and open that in IE
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.