I have switched my OS from Mandrake 10.0CE to Ubuntu 5.10 (Breezy) and now cannot get even a simple php script to run even with exec()..
<?php
`sudo /sbin/halt`;
?>
Trying to execute the script from Opera,(I need for kiosk), I get the following:
Code:
Warning...
OK. I tried:
$restoreit = `cp -v /mnt/cdrom/db.sql var/www/html/ALMETER-RESTORE`;
Sorry. Still get &result=
However. I can get a result from:
`sudo /usr/bin/eject`;
`sudo /bin/sleep 20`;
$handle = opendir("/mnt/cdrom/");
echo "&result=";
if( false === ($file =...
Eric TY.
OK. Humour me. Try this:
Make sure no CD in drive.
s2(~)$ cp /mnt/cdrom/* .
and see what comes back.
Meanwhile I'll try your other suggestions.
Problem is when I do use backticks I get the error message:
Warning: system(): cannot execute a blank command in ... line 760
759 $restoreit = "Test Result";
760 $restoreit = system('cp /mnt/cdrom/db.sql var/www/html/ALMETER-RESTORE', $retval);
761 echo "&result=$restoreit";
Secondly, cp...
Hi Eric(?) ty for your input:
'ticks' are 'forward' ticks and I am not attempting to run/execute the output. Flash MX2004 'reads' the "echo..." line. Flash just never gets a result from PHP $restoreit unless I specifically write something to it myself. e.g.
$restoreit = "Test Result";
echo...
Hi all. Newbie here to PHP (V4.3.3).
I run a Bash script to check if CD has been inserted into drive:
$restoreit = system(`/var/www/html/cd2db1`, $retval);
echo "&result=$restoreit";
break;
and read the "echo" result in Flash.
I can see/read "&result=" but nothing else, ($restoreit always a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.