since your here, i''ll assume you''v read the title and are almost aware of my situation...
i suppose this post has something to do with general programming, because it''s a problem preventing me from learning (and using)cgi / perl efficiently... currently i have to go to the only computer with the internet on it, upload them to a web server (which uses winNT, if thats a problem...), and view them with my browser in order to see if they worked or not...
I have a linux computer (beside my windows one)....
It has apache, which was automatically installed with linux-mandrake...
It has a little option in the ''Defaults'' tab (in DrakConf) that says something like ''allow cgi?''. (its checked)
When i upload a .cgi file, such as a simple hello world program (that displays in in html format with colors and such), it says either ''Forbidden'', or ''Error 500: Internal Server Error...''
(it says forbidded when i told the server to allow scripts from "/wwwroot/cgi-bin/"... otherwise, it says internal server error)
Possible problems:
httpd.conf is not configured correctly...
Because drakconf doesnt really seem to work as well as it should, i think that maybe the httpd.conf should be hand - edited instead... (then i might understand what i''m doing...)
the stupid cgi interpreter thing isnt working...
Just a thought... perl works fine from the command line, but doesnt using the web
I''v told it to use the wrong user for cgi
There was an option that set the user(and group) for cgi, and i''v tried most of them...
- I made a new account called httpdtheaccount...
- I''v also tried ''nobody'' but later found in the config file it says dont...
- I tried "webpages", which i use only to edit and make webpages work...
Its not finding /usr/bin/perl...
the reason i say this is, in /usr/bin/, there is no actual "executable" called perl, its called something like perl5.4.3 (i dont remember the numbers...), but there is a shortcut to it called perl...
I also thought it might be looking in /usr/local/bin/ for perl... which is not there...
Can anybody here tell me what i need to do to get it to work?
what user do i use?
what should my httpd.conf look like?
is there a tutorial or faq about this?
do i need to download any special interpreter - plugin thing?
_________
Tsutomegi
My web server is broken...
This could be caused by a whole load of problems, and i dont have the time to go through the whole of your setup and check whats right and what isnt. If you need apache help, check www.apache.org and the linux howto''s at www.linuxdoc.org .
I''ve never used mandrake before but try running linuxconf. If apache was installed by default when you set up your box the apache settings should be in there. Perl should have also been installed by default and hence should have the appropriate modules in apache.
Type ''whereis perl'' and that''ll tell you where perl is. It will work fine if there is a symbolic link in /usr/bin/.
Make sure the scripts are ''chmod''ded to 755. Type "chmod 755 scriptname.pl".
Also make sure the scripts are owned by the right person too. If suexec is running (which i doubt it, but it might) that might cause some trouble too.
When outputing html- make sure your first line is:
Content-type: text/html\n\n
Um... cant think of anything else right at the moment. Tell me how you get on with them.
I''ve never used mandrake before but try running linuxconf. If apache was installed by default when you set up your box the apache settings should be in there. Perl should have also been installed by default and hence should have the appropriate modules in apache.
Type ''whereis perl'' and that''ll tell you where perl is. It will work fine if there is a symbolic link in /usr/bin/.
Make sure the scripts are ''chmod''ded to 755. Type "chmod 755 scriptname.pl".
Also make sure the scripts are owned by the right person too. If suexec is running (which i doubt it, but it might) that might cause some trouble too.
When outputing html- make sure your first line is:
Content-type: text/html\n\n
Um... cant think of anything else right at the moment. Tell me how you get on with them.
jumble-----------
if you havent used mandrake, i suggest dont... its basically a crap-ified (well, simplified) version of red hat... (i own it because my town sucks and they overwrote linuxconf with their stupid gui version (drakconf), which get annoying because it takes about 5 min to load a menu screen... (and i have a celeron 500mhz running it...)
yes, all my files are ''chmod''ed to 755 (i did it about 3 times to make sure...)
(talking about the "cgi set user id: " category in my "Drakconf" apache menu)
What user to use? i''m guessing that ''nobody'' isnt a good idea... but i dunno... does this user have to match the owners of the files? or does this user do something else?
what username does the browser on my other computer use to access the web? i assume "nobody"... but i wonder...
i made sure all my files printed "Content-type: text/html\n\n" at the top...
i went to linuxdoc.org, and i couldnt find anything that would help tremendously... just a description of the apache project and stuff...
i think if nothing else works, i''ll try re-installing it... i have a feeling mandrake killed it when it was installed... its done that a few times before...
i''ll try some stuff and come back later...
yes, all my files are ''chmod''ed to 755 (i did it about 3 times to make sure...)
(talking about the "cgi set user id: " category in my "Drakconf" apache menu)
What user to use? i''m guessing that ''nobody'' isnt a good idea... but i dunno... does this user have to match the owners of the files? or does this user do something else?
what username does the browser on my other computer use to access the web? i assume "nobody"... but i wonder...
i made sure all my files printed "Content-type: text/html\n\n" at the top...
i went to linuxdoc.org, and i couldnt find anything that would help tremendously... just a description of the apache project and stuff...
i think if nothing else works, i''ll try re-installing it... i have a feeling mandrake killed it when it was installed... its done that a few times before...
i''ll try some stuff and come back later...
ok, i tried alot of things in the past few hours, and none of them worked... i went to the modules directory for httpd, and found that there was no mod_perl... since i''m not that fluent with how this server and stuff works, i assume that in order to use perl on a webpage, there has to be a mod_perl n the directory. i also get the impression that mod_[anything] arent used to run things like perl from a webpage, but used to make apache modules (or something like that anyway)..
do i need a mod_perl? (i have a mod_cgi?)
i decided against re-installing it because i already have the latest version and dont want to compile anything that badly...
do i need a mod_perl? (i have a mod_cgi?)
i decided against re-installing it because i already have the latest version and dont want to compile anything that badly...
look inside your httpd.conf : (which on my redhat box is in /etc/httpd/conf/ by default) and inside that theres a list of modules configured to be used by apache. Check perl''s one of them.
As to the owner of the files, anyone''ll do for it to execute. It doesnt have to match the one inside the apache settings.
If you''re at the end of your tether, post your whole httpd.conf on the internet somewhere so i can d/l it and take a look (it''ll be too big for putting on these forums).
As to the owner of the files, anyone''ll do for it to execute. It doesnt have to match the one inside the apache settings.
If you''re at the end of your tether, post your whole httpd.conf on the internet somewhere so i can d/l it and take a look (it''ll be too big for putting on these forums).
jumble-----------
i did a search for "perl" and found 2 matches.
one was in the word "properly"...
the other was a block of text talking about the Addlanguage function... i''m guessing i have to do some downloading then?
(just encase you wanted, you can get my httpd.conf:
here (its not compressed or anything...))
(i really hope this is the problem... i''v been trying to get this thing to work for a while...)
one was in the word "properly"...
the other was a block of text talking about the Addlanguage function... i''m guessing i have to do some downloading then?
(just encase you wanted, you can get my httpd.conf:
here (its not compressed or anything...))
(i really hope this is the problem... i''v been trying to get this thing to work for a while...)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement