[PHP] Command line has no network access
OK I probably know how to do this 10 years ago, but I'm not finding any prompts to remind me. Windows 2000, PHP5.2.10 cli ... I'm trying to set up a simple dump to run from scheduler. The code runs perfectly via the browser so I'm manually having to log in each day to run it. I've got an entry in the scheduler to run it, but I simply can't get it running from the command line prompt. It can't find even 'localhost' so will not connect to the database :( It's picking up the same ini file, and the same modules are loading, so it is just the network access from the command prompt ... ( changes from W2k are simply not possible since the main text to speech engine used on the site will not run on anything later and the supplier no longer exists :( ) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line has no network access
On Apr 1, 2012 12:11 PM, Lester Caine les...@lsces.co.uk wrote: OK I probably know how to do this 10 years ago, but I'm not finding any prompts to remind me. Windows 2000, PHP5.2.10 cli ... I'm trying to set up a simple dump to run from scheduler. The code runs perfectly via the browser so I'm manually having to log in each day to run it. I've got an entry in the scheduler to run it, but I simply can't get it running from the command line prompt. It can't find even 'localhost' so will not connect to the database :( It's picking up the same ini file, and the same modules are loading, so it is just the network access from the command prompt ... ( changes from W2k are simply not possible since the main text to speech engine used on the site will not run on anything later and the supplier no longer exists :( ) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Find wget for windows and call that with the script in a batch file wget http://localhost/script.php Will be like a browser hit it
Re: [PHP] Command line has no network access
On Sun, Apr 1, 2012 at 6:10 PM, Lester Caine les...@lsces.co.uk wrote: OK I probably know how to do this 10 years ago, but I'm not finding any prompts to remind me. Windows 2000, PHP5.2.10 cli ... I'm trying to set up a simple dump to run from scheduler. The code runs perfectly via the browser so I'm manually having to log in each day to run it. I've got an entry in the scheduler to run it, but I simply can't get it running from the command line prompt. It can't find even 'localhost' so will not connect to the database :( It's picking up the same ini file, and the same modules are loading, so it is just the network access from the command prompt ... ( changes from W2k are simply not possible since the main text to speech engine used on the site will not run on anything later and the supplier no longer exists :( ) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php This is usually because of security settings. You might want to check under which user the scheduler starts the php script. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line has no network access
Matijn Woudt wrote: This is usually because of security settings. You might want to check under which user the scheduler starts the php script. Runs as administrator, it's on a secure internal network so it's not locked down. There aren't any other users on the machine anyway. wget has solved the problem ... running nicely now! Thanks David ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php