Hi all. Newbie here to PHP (V4.3.3).
I run a Bash script to check if CD has been inserted into drive:
and read the "echo" result in Flash.
I can see/read "&result=" but nothing else, ($restoreit always a NULL?), WHATEVER I try ..e.g. passthru(); ???_exec();...
If I run "cd2db1" from a command line it works fine and returns the line:
cp: cannot stat "/mnt/cdrom/db.sql" : No medium found
What I need to see/read is the "No medium found" when no CD present ..using stristr() (?,etc..) eventually.
I have also tried ...
.. and that doesn't work either. All I see is "&result="
Are we looking at a permission thing here? Or what?
Peter
I run a Bash script to check if CD has been inserted into drive:
Code:
$restoreit = system(`/var/[URL unfurl="true"]www/html/cd2db1`,[/URL] $retval);
echo "&result=$restoreit";
break;
and read the "echo" result in Flash.
I can see/read "&result=" but nothing else, ($restoreit always a NULL?), WHATEVER I try ..e.g. passthru(); ???_exec();...
If I run "cd2db1" from a command line it works fine and returns the line:
cp: cannot stat "/mnt/cdrom/db.sql" : No medium found
What I need to see/read is the "No medium found" when no CD present ..using stristr() (?,etc..) eventually.
I have also tried ...
Code:
$restoreit = system('cp /mnt/cdrom/db.sql /var/[URL unfurl="true"]www/html/ALMETER-RESTORE',[/URL] $retval);
echo "&result=$restoreit";
break;
.. and that doesn't work either. All I see is "&result="
Are we looking at a permission thing here? Or what?
Peter