Another CGI problem…

Another CGI problem…

Well, first of all, this is my first post in this forum. Sorry if my english is not the best, but I’m trying it. :P.

Well, now, my problem.

I wrote a php script, and in that, I need to execute a cgi program, it works like this:

cgi_program.cgi param.file

When execute the php file using web browser, the exec command in php file returns false, but, when execute the same script using CLI, it returns true (true and false are random values. The real values are others. :P.)

I look for some missing configuration in the DirecAdmin manager, and the ‚CGI Access’ option is enabled.

I think that cgi program can’t read the "param.file", but I don’t understand why.

Can somebody help me?

Beforehand, thanks for the help.

Greetings! 🙂

This is my test script:

PHP Code:

$filename "/home/someuser/public_html/cgi-bin/file_20120503001201.txt";

$cmdline "/home/someuser/public_html/cgi-bin/check_file.cgi $filename";

$prueba_exec exec($cmdline,$result,$retint);

"prueba_exec: " $prueba_exec."\n

result: $result\n




Comments are closed.