Subject | Re: [firebird-support] fail to exec an SQL script thru PHP |
---|---|
Author | Almond |
Post date | 2004-02-03T03:56:38Z |
I do have problem to execute shell script with php. The one I found work is
as follow.
$cmd = "/usr/bin/ps2pdf $document > /dev/null ";
system($cmd);
The "/dev/null" pipe looks required.
Hope this help.
At 00:36 04/02/03 +0000, you wrote:
as follow.
$cmd = "/usr/bin/ps2pdf $document > /dev/null ";
system($cmd);
The "/dev/null" pipe looks required.
Hope this help.
At 00:36 04/02/03 +0000, you wrote:
>I am wetting my feet in PHP, so this is almost surely a PHP issue.
>Only I thought that it could be of interest to many FB users.
>
>I have a Linux server with RH9 and FB 1.0 .
>
>I wrote 2 PHP forms.
>
>In the first one, the user inputs some data.
>
>Data is passed to the second form, where it is massaged and used to
>build a SQL script, then the script is executed.
>
>The script is called script.sql and its current containt is
>
>set term !! ;
>select * from autoshift(1,'2004-3-1','2004-3-31',1) !!
>commit !!
>set term ; !!
>
>The script should be launched by a second shell script. The script is
>called start.sh and its containt is
>
>/opt/interbase/bin/isql e -u "SYSDBA" -p "masterkey" -
>i "/root/test/script.sql" /root/test/auto.gdb
>
>When I run the script from my SSH client as
>
>/root/test/start.sh
>
>it runs ok.
>
>However, when I launch the script from a browser, the normal program
>flow stops at the line
>
>exec("/root/test/start.sh")
>
>I mean that the code that follows that line is never executed.
>
>I am aware of the permissions issue, but even if I gave 777 mode to
>all directories and files involved, I could not fix the problem.
>
>It must be a very stupid mistake I am doing.
>
>Any hint ?
>
>Regards
>
>Peppe Polpo
>
>
>
>
>
>Yahoo! Groups Links
>
>To visit your group on the web, go to:
> http://groups.yahoo.com/group/firebird-support/
>
>To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/