Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Links 2.01 - jump.cgi not working

Quote Reply
Links 2.01 - jump.cgi not working
click this link to see my problem:

http://www.outdoorns.com/...ctory/jump.cgi?ID=14

was working before switching hosts

any ideas why jump.cgi isn't working?

if more info is needed just let me know

also would be nice if there was a manual for 2.01 floating around somewhere

Last edited by:

Johnny23: Jan 18, 2012, 11:19 AM
Quote Reply
Re: [Johnny23] Links 2.01 - jump.cgi not working In reply to
Hi,

The most likely thing, is that you can't run cgi scripts outside of your cgi-bin. Some hosts will allow you to create a file called .htaccess, which would have something like:

Code:
AddHandler cgi-script .cgi

( http://www.gsp.com/...ort/virtual/web/cgi/ )

Failing that, you probably need to move your Links2 installation (the .cgi scripts and the /cgi-bin/admin/ stuff) into your /cgi-bin

Hope that helps

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Links 2.01 - jump.cgi not working In reply to
thanks for the reply Andy

I had to uncomment AddHandler cgi-script .cgi in httpd.conf and made sure the outdoorns.com entry had Options ExecCGI. Now when I click a link I get:

Forbidden
You don't have permission to access /outdoordirectory/jump.cgi on this server.

I know the permissions are fine for the file/folder, is this because I can't run .cgi scripts outside of my cgi-bin?
Quote Reply
Re: [Johnny23] Links 2.01 - jump.cgi not working In reply to
Are your cgi scripts CHMOD 755?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Links 2.01 - jump.cgi not working In reply to
they are, I even tried changing them to CHMOD 777, no luck
Quote Reply
Re: [Johnny23] Links 2.01 - jump.cgi not working In reply to
777 wont work - .cgi / .pl has to be 755 :)

Check the CHMOD on the outdoordirectory directory... that should be 755 too really

Hope that helps

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Links 2.01 - jump.cgi not working In reply to
...also , try am very basic script:

hello.cgi

Code:
#!/usr/local/bin/perl

print "Content-Type: text/html \n\n";
print "hello!"

...chmod that to 755 and try running it from your browser.

If that doesn't work, try changing it to hello.pl and doing the same test

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Links 2.01 - jump.cgi not working In reply to
thanks again

outdoordirectory is 755
all .cgi and .pl files in outdoordirectory are 755

still getting the

Forbidden
You don't have permission to access /outdoordirectory/jump.cgi on this server.
should I add AddHandler cgi-script .pl to httpd.conf?(no idea if this will help)
Quote Reply
Re: [Johnny23] Links 2.01 - jump.cgi not working In reply to
Mmm ok - its a bit hard to test really. You need to just get that "hello" script working first. I could get it fixed up for you as a paid job, but can't really spend any more time helping you to troubleshoot I'm afraid Angelic

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Links 2.01 - jump.cgi not working In reply to
for both hello.cgi and hello.pl I get the same forbidden message
Quote Reply
Re: [Johnny23] Links 2.01 - jump.cgi not working In reply to
Ok, and if you put it in your /cgi-bin and run it fromt here?

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Links 2.01 - jump.cgi not working In reply to
ok, I added

<Directory /home/outdoorn/www/outdoorns.com/>
Options +ExecCGI
</Directory>

to httpd.conf and restarted apache

now I'm getting an Internal Server Error, which translates to Premature end of script headers: hello.pl in my error log

the script is what you gave me:

#!/usr/local/bin/perl

print "Content-Type: text/html \n\n";
print "hello!"


Also getting the Premature end of script headers: for jump.cgi
Quote Reply
Re: [Johnny23] Links 2.01 - jump.cgi not working In reply to
Try running this in telnet/ssh to see where perl is located on your server:

Code:
whereis perl

It could be that you need it as #!/usr/bin/perl or something else

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Links 2.01 - jump.cgi not working In reply to
I'm about to give up

for Premature end of script headers it says to check suexec.log, I check it and even though the cgi-bin folder, the outdoorns.com folder and the hello.pl file are all owned by outdoorn:apache, suexec.log is reporting target uid/gid (508/508) mismatch with directory (508/48) or program (508/48)

this is beyond rediculous
Quote Reply
Re: [Johnny23] Links 2.01 - jump.cgi not working In reply to
You probably need to CHOWN them:
Code:
cd /path/to/outdoordirectory
chown -R outdoorn:outdoorn *

This should change ownership to uid/gid as outdoorn

Hope that helps

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Links 2.01 - jump.cgi not working In reply to
that worked, thanks for all your help Andy
Quote Reply
Re: [Johnny23] Links 2.01 - jump.cgi not working In reply to
Hi,

Glad to hear it Angelic

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!