Running PHP on Desktop/Command Line
Posted 08 June 2006 - 10:13 PM
...the problem, however, is getting this script to run off the desktop/command line. From what I've read about the PHP SAPI CLI/CGI I am able to just prepend my file with:
However...it doesn't seem to be working...
Posted 08 June 2006 - 10:53 PM
What error messages are you getting when you try to run the command?
My Linux computer runs PHP fine from the command line if I put #!/usr/bin/php but your must make sure it has executable permissions before you can run it eg:
chmod +x /path/to/your/script.php
Of course, you may not be using Linux (or a Mac) in which case putting #!/usr/bin/php will not work and you'll have to write a batch file for it. Instructions for doing that can be found [a href=\"http://uk2.php.net/manual/en/features.commandline.php\" target=\"_blank\"]here[/a]
Don't worry, the printer fairies will sort it out.
Posted 12 June 2006 - 05:54 PM
I actually am not using a Linux system. Our server is a Win2000 server...and the PHP script is pulling MSAccess databases from one server location to antoher and redistributing a main table through to other tables. In other words...I'm workin' with the worst I can get (Win2000 + MSAccess)!
There are no error messages that come up...simply a failure to run. I'll look into the batch file more closely. Thank you for the link...though I think I've read over that page a couple of times with no luck for myself. I think I might need to read very slowly and take very careful notes this time.
The chmod settings, however, are definitely correct I had that part figured.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users