executing cgi programs in solaris(B89) needed urgent help,pls!


 
Thread Tools Search this Thread
Operating Systems Solaris executing cgi programs in solaris(B89) needed urgent help,pls!
# 1  
Old 01-21-2009
executing cgi programs in solaris(B89) needed urgent help,pls!

Hi all,

I am trying to execute cgi scripts on solaris, but everytime i get a internal server error...
The syntax of my .cgi script is correct as ive checked..
Steps i followed
1.started apache
2.The UNIX and Linux Forums - Learn UNIX and Linux from Experts (in opera)
3.places my cgi scripts in /var/apache2/2.2/cgi-bin
4.in the browser, localhost/cgi-bin/file.cgi
(this gives me an internal server error)

I read about cgiwrap, but unable to compile it on solaris...
If anyone has any idea where im going wrong please help..
Its kind of urgent that i figure this out..
Am using B89

Thanks
# 2  
Old 01-21-2009
Hi,

check the user rights, apache runs under user nobody, is this
user able to start your scripts?

cu
lowbyte
# 3  
Old 01-21-2009
what have you specified as your cgi-bin directory (ScriptAlias) in httpd.conf. A typical setup might be:
Code:
ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/

you may also want to add permissions like `chmod a+x <file>`

Last edited by pupp; 01-21-2009 at 11:39 AM..
# 4  
Old 01-22-2009
The ScriptAlias has been set right..
corresponding cgi files are also placed in the appropriate dirs.
But from what i could read on the web, i found out that solaris requires a cgiwrap for cgi prgms to run, but im having compiling issues with cgiwrap..

If anyone has tried cgi prgms in solaris...Could you please guide me,step by step to resolve this issue?

PS: The apache issue has been sorted out...I had not included the hostname in /etc/hosts and thats the reason for not being able to resolve it Smilie
# 5  
Old 01-22-2009
Well...
What's the error you are getting?
Solaris 10 has a built-in user webservd for Apache. Are you mixing webservd and nobody/www ownerships of files/directories?
Do the cgi-bin scripts run on the command line when you su to the web user?
Are the cgi scripts php, asp, shell, perl?

AFAIK, Solaris doesn't require anything to run cgi scripts, other than the Apache server be properly configured.
# 6  
Old 01-22-2009
Code:
Do the cgi-bin scripts run on the command line when you su to the web user?

yes they do.My machine is a single node.(I have root access as well,always)

Code:
Are the cgi scripts php, asp, shell, perl?

perl

Code:
    ScriptAlias /cgi-bin/ "/var/apache2/2.2/cgi-bin/"

This is what my httpd.conf reads.
So i placed the a test file in /var/apache2/2.2/cgi-bin (gave it "x" permission)
But when i run it in the browser i get a "internal server error"

Apache though is running fine!!!

Please help
# 7  
Old 01-22-2009
So no error number or text other than "internal server error"?

I see that your cgi-bin alias is "/var/apache2/2.2/cgi-bin/
In the http.conf file, about 10 lines down from ScriptAlias, you should find the code.
Does the bold entry match ScriptAlias ?
Code:
# "/var/apache2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/apache2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help Me Pls Its Urgent!!!!!!!!!!!!!!!!

Hi, These are the text file I have //input1.txt// cd dir1/dir2/pg1.txt cd dir3/dir4/pg2.txt cd dir88/dir5/pg4.txt cd dir7/dir6/pg5.txt cd dir8/dir9/pg7.txt And each text file has some text. Now I have to write a shell script which reads input1.txt and changes the directory as shown... (1 Reply)
Discussion started by: bhavanabahety
1 Replies

2. Shell Programming and Scripting

Urgent..Help please....expect programs under while loop

Hello.... I'm developing a script; the first step is to create a file (its name is IP) which contains several lines. The second step is to create and execute expect programs using the data in the (IP) file. Unfortunately, the loop is not executed properly....sometimes, the 2nd expect file is... (2 Replies)
Discussion started by: Hossam_Nox
2 Replies

3. Solaris

how to install xen on solaris?, urgent help needed, pls

Hi , I wanted to know how to install XEN on solaris? I have looked at virutal box but the latest release is not supporting many OS, and for my development work i need some sort of virtual systems..... and older versions of virtual box dont run on my build of solaris (b83)!!! so please help ... (3 Replies)
Discussion started by: wrapster
3 Replies

4. Solaris

oracle on solaris, needed urgent help, require it for exams?

Hi all, I wanted to know how to install oracle on solaris (b83).. I also would like to know of a link that i can download oracle from? please reply fast.. I need it for my exams day after tomorrow... please reply (1 Reply)
Discussion started by: wrapster
1 Replies

5. UNIX for Advanced & Expert Users

urgent help needed!!in copying files to /tmp at boot time,pls help!

Hi all, I am trying to boot a an OS from RAM...(its a opensolaris based distro) For this i have picked up 2 key lib files that when copied to /tmp and mounted to respective places will do the job.. The sizes of these files combined comes upto 600mb.(i have 2gb ram) Now i have also located the... (0 Replies)
Discussion started by: wrapster
0 Replies

6. Shell Programming and Scripting

unable to log into gdm, urgent help needed!!!pls

Hi all, I was playing around with some scripts and spoilt solaris completely .. So i reinstalled and thought of giving the password once i log in... However i forgot all about it and went ahead installing all my drivers and particularly KDE 3.5.8 on my system.. But for kde to show up at the... (0 Replies)
Discussion started by: wrapster
0 Replies

7. Solaris

lex on solaris??? (urgent, pls!!!)

Hi everyone, I would like to know how to compile and run lex programs on solaris 10. the conventional way is $ lex <name.l> $ cc lex.yy.c -ll $ ./a.out but while trying to execute the 2nd command :i get a reference saying that the command is old or that main is not supported... Hence... (1 Reply)
Discussion started by: wrapster
1 Replies

8. Shell Programming and Scripting

Pls Help.. Really Urgent

Hi, I am creating a pipe in a directory $HOME/pipes. The pipename should be L${PROGNAME}. Whenever i embed these lines in shell script, i get an error mkfifo: No such file or directory. I am creating a pipe with the key word mkfifo $HOME/pipes/L${PROGNAME}. Please help me how to get... (5 Replies)
Discussion started by: raghavan.aero
5 Replies

9. Shell Programming and Scripting

Executing ksh script from cgi

Hi all, I'm developing a system which requires me to run a ksh script from within a cgi script. What sort of syntax will I need to do this, I'm sure it's simple but can't find out how anywhere! Thanks. (1 Reply)
Discussion started by: hodges
1 Replies
Login or Register to Ask a Question