WebServer configuring

How many computers are yours (you own)

  • 1

  • 2

  • 3

  • more


Results are only viewable after voting.

Abakadoosh

Smiling 'till death
Well, i've been trying to figure out and read/learn this damn thing for a couple days now, but i cant get it to do what i want. I can start and view my webpage off my comp from my friends house's and everything, so the webserver is working. But my problem is that no matter how i edit the config files, i cant get the hole cgi thing to work, or the include tags.

so first off, if i did happen to set up the httpd.conf file up right, whats the include command? i use to use <!--#include virtual="header.html" --> on my dads website, where it was previously hosted (before i started using my comp), but now wether i try "include virtual" or "include file", it doesnt work. so im guessing its in the config. but anyway, whats the command!?

second, how do i setup a cgi-bin and be able to access/run the scripts inside? in the manual it tells me to add the <Directory> options in the httpd.conf file, but even after that and restarting the webserver, still no luck. in dire need of help... please!
 
what errors do you get and when, are you putting your perl scripts in /Libarary/WebServer/CGI-Executables ? are they chmoded to 755? or something like that. are you shure they don't have mac line breacks at the end i know i had endless pain with this line breack problem.. (use BBEdit and save them as unix linebreack files. or author your codes in the comnd line.) cgi should be by default enabled in the config file but i may be wrong in this since, i haven't configed it in a while :)

anyw ay that's all i can doo for now...
 
ah well if he's not gonna aswer i might as well throw this in: SUCK ON MY BIG CANADIAN DICK!
 
It sounds like you're confusing 2 technologies. Includes are server side includes, not CGIs. You can configure Apache for CGI, but not server side includes. Pretty certain there are instructions on how to set up SSI on these forums if you do a search.
 
ok, first off, JESUS CHRIST! i posted this freaken topic before i left for work. i just got home about an hour and a half ago, had some dinner, watched some tv, then went on my computer and came to see if my post had any reply's. all of the sudden i find out people hate me.

wtf are you talking about i dont reply. i've replied to about 90% of my posts. that other 10% i cant find the god damn topic. and i posted a poll because im cureous as to how many people have more than one computer cause i just came from my friends house where he has like 7 computers in his room alone. not to mention his dads, brothers, and garage computers. so if you dont like me not watching a god damn website forum and refreshing a god damn web page until i see a result about something insignificant and missing out on going to work where i f**king get paid for doing something useful.

now back to the question. the kind of problem that occurs is an error message when trying it from my local machine, but i think thats why im getting that. says i cant open it. understandable. but when i try it from a webpage like hidme.com or from another computer in the house, it says it cant POST to it, which i thought i enabled.

and to the second good reply. no, im not confusing CGI and server-side-includes. i know perfectly the distinction between the two, and was simply asking two different questions. if the include command was "include file" or "include virtual".

so SUCH ON MY BIG AMERICAN DI*K!
 
i'm sorry i should have cussed in the appropriate place :) we all know where that is! anyway. is your script trying to crate file or write to an existing file,? did you chmod the diresctory and/or file to the right permissions that would allow it to be writtento by guests?
 
whatever. think what you want. i genuenly do not care what some prick on a bbs who has nothing better to do than sit in his underwear, watch Opera, jack off, and chat on a web page thinkin he's livin the sweet life thinks about me. explaining to you would be a waste of my time.

vic, what do you mean crate file? and i dont think its trying to write to it, but i could be mistaken. its a form cgi to mail what's entered in the text box's to an email address. and yes, i chmod'd and made it read and writeable by everyone.
 
Originally posted by Abakadoosh
whatever. think what you want. i genuenly do not care what some prick on a bbs who has nothing better to do than sit in his underwear...
On this site are some very helpful people, who give up their time and use their expertise constructively in helping others.

OK, so I can forgive you for not replying once your post is solved - it would have been common courtesy, but I guess you didn't know how we do things here. However, cussing the people who come here to help others is puerile (even if vic started it...) - grow up

On the plus side, people here are either forgiving or forgetfull (or both ;o), and I'm sure if you participate in the debates and posts, you'll lose the reputation in no time (here, have a cookie: I promise by the time you finish eating it, everything will be right as rain :eek:)

Bernie :eek:)
 
one thing you can try, (i saw u mentioned you can't access or run your cgi scripts from your local machine, you should be able though) in the browsers adress field type localhost/~MyName if your website is located in your users folder (Sites) or localhost to access the files located in the :Library:WebServer: Documents. if you want to access the cgi's in the :Library:WebServer:CGI-Executables you either provide a link in your source code to point to 4 example: "/cgi-bin/mailApp.cgi" or you trype the adress in your browser "localhost/cgi-bin/mailApp.cgi". you can also find out your IP number and replace localhost with your IP number.

second, unles ths form cgi has sme private thing nobody should know about wh don't you post it here so that i can downloaded it and give it a run?

third, i don't know how much this matters or if it should, but are u using a server or plain os x?
 
Abakadoosh, because you are 18 and really don't have an understanding of how life works outside your tiny world and perhaps your parents were a bit lacking in teaching you the basics of interacting with others, I won't give you the spanking you so rightly deserve. But keep this in mind... testuser, bighairydog and myself are not the only ones that feel this way and I suggest you listen carefully and think.
 
lol, whatever. as i said i do not care and wont explain. and i insult those who have the answer but dont help because i didnt take the time to post a thank-you note.

vic: well, i tried what you said and still no luck. and im using plain osx but only on the basis that its my home computer and im using it until i can find a replacement service (and to test my files). think that would be the problem?
 
oh, sorry vic, forgot to post the cgi. Here it is. and i dont really know anything about cgi code. its just something i found out through my dads site, went and found it on the authors site and got it. think i got a bad version or somethin? oh, and on the subject of the SSI, i just looked back at my initial post and realized that what i typed wasnt shown. i typed in the SSI that i was talking about, its < ! - - #include virtual="header.html" - - > (without the spaces inbetween the dashes and marks of course). lol, it thought that what i wrote was part of the code of the page and was never shown. vic, thanks for you help.

oh, and vic, the file is actually a .sit file, i had to rename it to zip in order to get it uploaded 'cause .sit isnt supported. Stuffit might act weird when trying to unzip it. so just rename it then unstuff it.
 

Attachments

  • form.cgi.zip
    13.8 KB · Views: 9
I haven't taken a look at the script you're using yet. I think we need to narrow down that CGI is actually working alright first. Have you tried running a simple script through the browser to confirm it works? If not, save this as a text file, and pop it in to /Library/WebServer/CGI-Executables chmod it 755 then call it from http://localhost/cgi-bin/scriptname.pl


#!/usr/bin/perl

print "Content-type: text/html\n\n";

print "Hello, world!\n";


Regarding testuser... testuser is one of the most knowledgeable people on these forums. He could easily help you with your problem and making him feel unappreciated for his donated time is not the best strategy. I suggest, Abakadoosh, you kiss (above the belt) and make up ;)
 
well, closer than i was before, but still not there. i didnt really know how to access the cgi-bin before, so now that i know how to access it, its better, but now i get the Internal Server Error each time i try to run something. so i think somethings gone afoul. i tried it on the cgi again and now i dont get the error message popping up saying that it cant open it, i get the same page as when i try to run the script you told me to. heres a link to the screenshot i took of the error i get when trying to run anything.

error.abakadoosh.com
 
in the apache config make shure apache can process .cgi and .pl files.

and in the begining of each perl script there is a path that points to where perl is in your system, go to the terminal and type "wichperl" and then copy and paste it in the begining of your perl script. make sure it has a # in fron of it, and make sure that it's the first line of your script and make sure that there are no other similar scripts like include blah blah, or something like that that means that the script needs other scripts in order to work or somethng like that, i,can't remember.



and this is beside the point, but get to know php and mysql thy are much easier to setup and learn the language and can do on the web waht pewrl does much easier. that is just my opinion.
 
this is waht is saw and though of a sa pottential problem:

$mailprog = '/usr/lib/sendmail';
This variable must define the location to your server's sendmail
program. If this is incorrect, form results will not be mailed to you.

have you set this? i do't know much a bout this but if you don't know how t use sendmail you probalby won't get this script to work. and i also say the information i sent you in the above post missing from your script.
 
Now that you've got that error generated, check your Apache server logs. Bring up a terminal and type:

cd /var/log/httpd

there's 2 logs in there. error_log is what will help you. You can open this file in any text editor, or to see the very end of this file type:

tail error_log

copy/paste what it says here. Sounds to me like Vic is right, your Apache isn't properly configured to run CGIs. Which instructions did you follow to set it up?
 
a little bit of confusion here, the pers script does have, i thionk the right header, but the script needs your sendmail server to work also, so the script might be ok, the apache cofig might me ok, but now we have the sendamil sewerver variable to worry about also. if i were you i'd give up. but that's just cuz i'm lazy and i like php better than perl.
 
well vic and jadey, thanks for you help and everything, but i think im ganna go with Vic on this one and just ditch the thing :rolleyes: . Its literally becoming more trouble than its worth :mad: . I have other important matters to attend to than a stupid mail form. Thanks anyways guys. Btw, i tried the "wichperl" command and it came up emtpy, the command doesnt exist, so it must not be installed. Know of where i could get it and install it?
 
Back
Top