shell_exec
Posted: Wed Oct 18, 2006 5:27 pm
Hi everyone!
I have compile.php witch containes:
This returns:
If i do this command directly on linux console it returns:
Apache has rights to write/execute on fpc
Any idea?
I have compile.php witch containes:
Code: Select all
<?php
$shell_return=shell_exec("/usr/local/bin/fpc -Xs /var/www/localhost/htdocs/prog/BAZA2.PAS");
echo nl2br($shell_return);
?>Code: Select all
Free Pascal Compiler version 2.0.4 [2006/08/20] for i386
Copyright © 1993-2006 by Florian Klaempfl
Target OS: Linux for i386
Compiling /var/www/localhost/htdocs/prog/BAZA2.PAS
BAZA2.PAS(5,4) Warning: Variable "i" does not seem to be initialized
BAZA2.PAS(1,6) Note: Local variable "n" is assigned but never used
Linking /var/www/localhost/htdocs/prog/BAZA2
BAZA2.PAS(6,1) Error: Error while linking
Error: /usr/local/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)Code: Select all
/usr/local/bin/fpc -Xs /var/www/localhost/htdocs/prog/BAZA2.PAS
Free Pascal Compiler version 2.0.4 [2006/08/20] for i386
Copyright © 1993-2006 by Florian Klaempfl
Target OS: Linux for i386
Compiling /var/www/localhost/htdocs/prog/BAZA2.PAS
BAZA2.PAS(5,4) Warning: Variable "i" does not seem to be initialized
BAZA2.PAS(1,6) Note: Local variable "n" is assigned but never used
Linking /var/www/localhost/htdocs/prog/BAZA2
5 Lines compiled, 0.1 secApache has rights to write/execute on fpc
Any idea?