RE: [PHP] p-s-e-x-e-c
When I run the command on the server itself, it works just fine. When I run the same command via a webpage, the text file does not generate. I also have a similar problem but reversed. It works in a webpage but not on the command line. mysql_connect, mssql_connect, and a non-db function. A command line script calling file() to call the web page works however. And it just stopped working about 2 months ago (from the command line). one word: permissions ... also perhaps the php.ini settings are different for either one, and there's a different ini file for shell vs. web. Even though the build date was before the time the problem started, I scrutinized both the phpinfo's which pointed to the same php.ini, but I noticed that the ./configure switches did not match up and finally the admin admitted that his yum update must have overwritten the formerly manually compiled version. My issue is resolved. Sorry for the partial hijacking of this thread but as you can see, it can be beneficial. _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
[PHP] p-s-e-x-e-c
Hi. I'm wanting to run an executable that generates a text file, and I'm having some issues. When I run the command on the server itself, it works just fine. When I run the same command via a webpage, the text file does not generate. My first impression was that the permissions were wrong. So, I gave the web user and the user making the call the necessary permissions... no luck. Here's what I'm doing... ?php $command = psexec.exe -i -w C:/Folder -u user -p pass -e C:/Folder/executable.exe 21; exec ($command); ? This should generate this file but doesn't: C:/Folder/printer_list.txt Again, when this exact statement is run in the terminal on the Win2k3 server, it works fine. Any thoughts? Thanks in advance, ~Philip PS... Side note: the list rejected my original email b/c of the subject: 'Psexec'. Odd.
RE: [PHP] p-s-e-x-e-c
Hi. I'm wanting to run an executable that generates a text file, and I'm having some issues. When I run the command on the server itself, it works just fine. When I run the same command via a webpage, the text file does not generate. My first impression was that the permissions were wrong. So, I gave the web user and the user making the call the necessary permissions... no luck. Here's what I'm doing... $command = psexec.exe -i -w C:/Folder -u user -p pass -e C:/Folder/executable.exe 21; exec ($command); ? This should generate this file but doesn't: C:/Folder/printer_list.txt Again, when this exact statement is run in the terminal on the Win2k3 server, it works fine. Any thoughts? Thanks in advance, ~Philip PS... Side note: the list rejected my original email b/c of the subject: 'Psexec'. Odd. Maybe you need the full path to psexec.exe Or the web server isn't allowed to use exec due to safemode http://php.he.net/manual/en/features.safe-mode.functions.php or disable_functions in php.ini. _ Peek-a-boo FREE Tricks Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHMloc=us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] p-s-e-x-e-c
On 10/18/07, Instruct ICC [EMAIL PROTECTED] wrote: Hi. I'm wanting to run an executable that generates a text file, and I'm having some issues. When I run the command on the server itself, it works just fine. When I run the same command via a webpage, the text file does not generate. My first impression was that the permissions were wrong. So, I gave the web user and the user making the call the necessary permissions... no luck. Here's what I'm doing... $command = psexec.exe -i -w C:/Folder -u user -p pass -e C:/Folder/executable.exe 21; exec ($command); ? This should generate this file but doesn't: C:/Folder/printer_list.txt Again, when this exact statement is run in the terminal on the Win2k3 server, it works fine. Any thoughts? Thanks in advance, ~Philip PS... Side note: the list rejected my original email b/c of the subject: 'Psexec'. Odd. Maybe you need the full path to psexec.exe Or the web server isn't allowed to use exec due to safemode http://php.he.net/manual/en/features.safe-mode.functions.php or disable_functions in php.ini. Those are good suggestions. Unfortunately, I did try the full path to psexec.exe, safe_mode is NOT enabled and there are no functions listed as disabled. I have Google'd, but haven't been successful finding a solution. Anything else? =/ Thanks, ~Philip
Re: [PHP] p-s-e-x-e-c
On 10/18/07, Philip Thompson [EMAIL PROTECTED] wrote: On 10/18/07, Instruct ICC [EMAIL PROTECTED] wrote: Hi. I'm wanting to run an executable that generates a text file, and I'm having some issues. When I run the command on the server itself, it works just fine. When I run the same command via a webpage, the text file does not generate. My first impression was that the permissions were wrong. So, I gave the web user and the user making the call the necessary permissions... no luck. Here's what I'm doing... $command = psexec.exe -i -w C:/Folder -u user -p pass -e C:/Folder/executable.exe 21; exec ($command); ? This should generate this file but doesn't: C:/Folder/printer_list.txt Again, when this exact statement is run in the terminal on the Win2k3 server, it works fine. Any thoughts? Thanks in advance, ~Philip PS... Side note: the list rejected my original email b/c of the subject: 'Psexec'. Odd. Maybe you need the full path to psexec.exe Or the web server isn't allowed to use exec due to safemode http://php.he.net/manual/en/features.safe-mode.functions.php or disable_functions in php.ini. Those are good suggestions. Unfortunately, I did try the full path to psexec.exe, safe_mode is NOT enabled and there are no functions listed as disabled. I have Google'd, but haven't been successful finding a solution. Anything else? =/ Maybe try the command with the backtick operator instead of exec... David
Re: [PHP] p-s-e-x-e-c
On 10/18/07, Instruct ICC [EMAIL PROTECTED] wrote: When I run the command on the server itself, it works just fine. When I run the same command via a webpage, the text file does not generate. I also have a similar problem but reversed. It works in a webpage but not on the command line. mysql_connect, mssql_connect, and a non-db function. A command line script calling file() to call the web page works however. And it just stopped working about 2 months ago (from the command line). one word: permissions i had issues with db stuff working on web vs. not on shell (or vice versa) - turns out the mysql.sock file couldn't be read from one but could from the other. this would be the first thing i check for the db issues, and the ps aux issues. perhaps the webuser doesn't have access, or it isn't in $PATH. try full /bin/ps aux and see if that works. also perhaps the php.ini settings are different for either one, and there's a different ini file for shell vs. web. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] p-s-e-x-e-c
When I run the command on the server itself, it works just fine. When I run the same command via a webpage, the text file does not generate. I also have a similar problem but reversed. It works in a webpage but not on the command line. mysql_connect, mssql_connect, and a non-db function. A command line script calling file() to call the web page works however. And it just stopped working about 2 months ago (from the command line). _ Help yourself to FREE treats served up daily at the Messenger Café. Stop by today. http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline