Linux execute file using PHP (XAMPP) -
this way harder looks like, think encountering kind of permission problems, not know do. testing purposes i'm using 777 permissions files.
i want start executable file using php.
i tried:
<?php echo system('./fieldtheory'); echo shell_exec('./fieldtheory'); echo exec('./fieldtheory'); ?>
but none of them execute file. tried executing simple shell script using system('./script.sh');
:
#!/bin/sh echo "hello" /fieldtheory ./fieldtheory /opt/lampp/htdocs/fieldtheory ./opt/lampp/htdocs/fieldtheory
i see "hello message" file not being executed.
if execute file using terminal command: php testfile.php
program being started without difficulties.
edit: tried absolute paths no effect.
double check php.ini , make sure exec functions not disabled:
may have line this:
disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
Comments
Post a Comment