new server won't run CGI files

General ShopSite user discussion

new server won't run CGI files

Postby Gorgeous537 » Tue Nov 26, 2013 4:37 pm

We've had ShopSite running on our site for a year and a half, but our ISP is moving our website a new server. When we try to login we get the following error:
[error] Unrecognized character \\x7F in column 281 at /var/www/websitename.com/httpdocs/cgi-bin/sd/settings.cgi line 1.\n

We get a similar error for any compiled binary CGI we try to run. The new server is trying to run the CGI binary as a perl script. Does anyone know any htaccess directives or Apache server httpd config directives we could insert to resolve this problem?
Gorgeous537
 
Posts: 9
Joined: Tue Nov 08, 2011 11:10 am

Re: new server won't run CGI files

Postby robm » Wed Nov 27, 2013 7:09 am

Sounds like your new server is not set up to run .cgi files as Executable. It's trying to run them as perl as you noted.

In your httpd.conf file, your provider should have code like this:

Code: Select all
<Directory "/var/www/*/httpdocs/cgi-bin">
Options +ExecCGI
AddHandler cgi-script .cgi

...
</Directory>

That should allow it to run. You could also try a .htaccess line of:
Code: Select all
AddHandler cgi-script .cgi


and see if that does the trick.

Rob
robm
 
Posts: 463
Joined: Fri Aug 04, 2006 5:46 pm
Location: Connecticut

Re: new server won't run CGI files

Postby Gorgeous537 » Wed Nov 27, 2013 3:03 pm

robm,
Thanks for your help. We tried both of your suggestions, but it didn't seem to fix anything.
Gorgeous537
 
Posts: 9
Joined: Tue Nov 08, 2011 11:10 am

Re: new server won't run CGI files

Postby robm » Wed Nov 27, 2013 3:32 pm

Something must be overriding your settings then to force Perl to run files ending in .cgi. Also make sure you restarted the web server after editing the httpd.conf file. You could also try putting the .htaccess file line in the cgi-bin directory.

Rob
robm
 
Posts: 463
Joined: Fri Aug 04, 2006 5:46 pm
Location: Connecticut

Re: new server won't run CGI files

Postby MorrisWood » Sat Nov 30, 2013 11:56 am

Rob:
I am a co-worker of Gorgeous537. The ISP did not insert the <Directory> code you suggested (to my knowledge) in the httpd.conf file - I had emailed the admin on Wednesday about this but he didn't respond. Just now (Saturday) called ISP and the tech (admins not there on weekend) checked the server httpd.conf file and no directive like that in there. There IS a CGI Wrapper entry that is global for all accounts though.
Are there any differences or edits needed to a server account running a CGI Wrapper for binary .cgi files?
MorrisWood
 
Posts: 8
Joined: Sat Nov 30, 2013 11:12 am


Return to User Forum

Who is online

Users browsing this forum: No registered users and 104 guests

cron