[PHP] Exec, system, passthru didn't work
Hi, I tried to execute the following command from the web interface using a system call /usr/bin/play a_wave_file.wav I tried exec, system, passthru, and shell_exec. None of them worked, that is I didn't hear any sound played. Note that I'm sitting here on the server itself, and tried it with a web browser in the server. The command is executed fine when I just copy it and run it in terminal. I also made sure that nothing blocked the sound card, that is, the sound card was not in use. However, if I tried to run the same file using php as command line, it works find. exec, system, passthru returns the value 2, which I don't know what it means. Any help on this will be appreciated. Thanks in advance. Reuben D. Budiardja -- 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]
Re: [PHP] Exec, system, passthru didn't work
I tried to execute the following command from the web interface using a system call /usr/bin/play a_wave_file.wav I tried exec, system, passthru, and shell_exec. None of them worked, that is I didn't hear any sound played. Note that I'm sitting here on the server itself, and tried it with a web browser in the server. The command is executed fine when I just copy it and run it in terminal. I also made sure that nothing blocked the sound card, that is, the sound card was not in use. Does it work from the shell if you su to the web server user id and try to run it? 99% of shell exec issues are permission-related. -Rasmus -- 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]
RE: [PHP] Exec, system, passthru didn't work
did you try and capture error messages from the system calls? webserver probably doesnt have permission to do what you want it to do. -Original Message- From: Reuben D Budiardja [mailto:[EMAIL PROTECTED]] Subject: [PHP] Exec, system, passthru didn't work Hi, I tried to execute the following command from the web interface using a system call /usr/bin/play a_wave_file.wav I tried exec, system, passthru, and shell_exec. None of them worked, that is I didn't hear any sound played. Note that I'm sitting here on the server itself, and tried it with a web browser in the server. The command is executed fine when I just copy it and run it in terminal. I also made sure that nothing blocked the sound card, that is, the sound card was not in use. However, if I tried to run the same file using php as command line, it works find. exec, system, passthru returns the value 2, which I don't know what it means. Any help on this will be appreciated. Thanks in advance. Reuben D. Budiardja -- 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]
Re: [PHP] Exec, system, passthru didn't work
On Monday 16 July 2001 10:37 am, you wrote: On Monday 16 July 2001 09:42 am, you wrote: I tried to execute the following command from the web interface using a system call /usr/bin/play a_wave_file.wav I tried exec, system, passthru, and shell_exec. None of them worked, that is I didn't hear any sound played. ... Does it work from the shell if you su to the web server user id and try to run it? 99% of shell exec issues are permission-related. -Rasmus Yes, I su as root and then su as the web server user id, it worked. I also check the permission is already 755. Ok, and does this play program actually work without a controlling tty? I can only guess what you mean here, but I think that's a good point. Maybe the play program wouldn't work withough a controlling tty. Do you know how to check, or any work around? Thanks. Reuben D. Budiardja -- 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] Exec, system, passthru didn't work
Hi, I tried to execute the following command from the web interface using a system call /usr/bin/play a_wave_file.wav I tried exec, system, passthru, and shell_exec. None of them worked, that is I didn't hear any sound played. Note that I'm sitting here on the server itself, and tried it with a web browser in the server. The command is executed fine when I just copy it and run it in terminal. I also made sure that nothing blocked the sound card, that is, the sound card was not in use. exec, system, passthru returns the value 2, which I don't know what it means. Any help on this will be appreciated. Thanks in advance. Reuben D. Budiardja -- 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]