Subject fail to exec an SQL script thru PHP
Author Peppe Polpo
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