[RESOLVED] /cgi-bin/ script don't run and return 500 Internal Server Error

10 posts / 0 new
Last post
#1 Fri, 06/14/2013 - 12:02

[RESOLVED] /cgi-bin/ script don't run and return 500 Internal Server Error


i've migrate plesk website to virtualmin on a test server. All is running, but i cannot execute script on /home/site_name/cgi-bin/

The script name is : request

is a paiement script place on php page :
$result=exec("$bin_request $parm");
the $bin_request = /home/site_name/cgi-bin/request

if you test :
you have a "500 Internal Server Error"

in suexec log :  uid: (517/magasin) gid: (504/magasin) cmd: request

in apache error log :
[Fri Jun 14 01:29:33 2013] [error] [client] suexec failure: could not open log file
[Fri Jun 14 01:29:33 2013] [error] [client] fopen: Permission denied
[Fri Jun 14 01:29:33 2013] [error] [client] Premature end of script headers: request

suexec -V :
-D AP_DOC_ROOT="/home"
-D AP_HTTPD_USER="apache"
-D AP_LOG_EXEC="/var/log/httpd/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_USERDIR_SUFFIX="public_html"

Can you help me !! :)

i've forgot a configuration ?


Fri, 06/14/2013 - 14:05


Hmm, if you rename the script from "request" to "request.cgi" -- and then access /cgi-bin/request.cgi -- does that work? Or does that throw the same error?


Fri, 06/14/2013 - 16:12 (Reply to #2)

Same Error,

and i see that is a file on this dir, and same error...

Fri, 06/14/2013 - 19:23

Well, the php5.cgi script isn't meant to be called directly, and will throw an error when that happens.

Out of curiosity, do you see a different error if you go into Server Configuration -> Website Options, and change the PHP Execution Mode to "CGI"?

When you try that, check the Apache logs in $HOME/logs/error_log to see what error(s) it's throwing.


Sat, 06/15/2013 - 03:03 (Reply to #4)


i've try on mod_php (but on this mode, my php page not execute but show...) : (2)No such file or directory: exec of '/home/magasin/cgi-bin/request' failed Premature end of script headers: request

i've try on CGI : suexec failure: could not open log file fopen: Permission denied Premature end of script headers: request

in suexec log : uid: (517/magasin) gid: (504/magasin) cmd: request

i don't know if request (ATOS script for bank payment) can be call in direct.

on my php page, i've : exec("/home/magasin/cgi-bin/request blablabla") that always return a string 0; if i test on plesk server, the result is : string(2753) "!0!!<INPUT TYPE=HIDDEN NAME=DATA VALUE=" .......

I don't understand why the script don't run into virtualmin... i will try to install a new centos 6.x and restore server...

Sat, 06/15/2013 - 03:15 (Reply to #5)

Other information, i don't know what is the langage of the request script (cgi, perl !??) if i do a nano i've : ^?ELF^A^A^A^@^@^@^@^@^@^@^@ etc... and end of file is : ...on_start__^@strcpy@@GLIBC_2.0^@

Sat, 06/15/2013 - 04:41

i've install a new centos 6.3, and same problem...

Sat, 06/15/2013 - 05:33

In CGI mode error_log present a new message : sh: /home/magasin/cgi-bin/request: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory, referer: http://webserver.greendev.fr/magasin-de-mode/commander.html?checkout_las...

if i do ls -la /home/magasin/cgi-bin/request result : -rwxr-xr-x. 1 magasin magasin 117257 7 juil. 2005 /home/magasin/cgi-bin/request

an idea ??

why php don't see my request file ?

Sat, 06/15/2013 - 05:44


the request is a GLIBC file.

juste i've do : yum install glibc.i686 and install

now all run


Sat, 06/15/2013 - 08:55

Ah, that's great, I'm glad you got it working... thanks for letting us know how you fixed it!


Topic locked