Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prob with apache & cgi & php

Status
Not open for further replies.

unicorn11

Programmer
Jun 10, 2000
392
IN
Hi everybody

i have a linux box with apache 1.3.19 installed on it.
i created a perl file and execute it in my terminal it is executing properly. when i place the same in the cgi-bin box and try to access it via my browser it gives me 500 internal server error

I also have some PHP pages that are to run of the same apache server. it also gives me a similar problem it is executing all the files properly using the command line

php xyz.php

but the same 500 internal server error in the browser

I also need to know how do i find which modules are installed in my apache server and how to add a module

Thanks to everybody ! Unicorn11
unicorn11@mailcity.com

[red]Luck is not chance, it's toil; fortune's expensive smile is earned.[red]
 
Hi,

For cgi, make sure you have the line 'AddHandler cgi-script .cgi' in your http.conf file (or uncommented - its probably there already with a # in front).

On PHP, you need some lines in http.conf like these (in the relevant sections ) :

LoadModule php4_module libexec/libphp4.so

AddModule mod_php4.c

AddType application/x-httpd-php .php .php4

A trivial test php file is as follows :

<!- test.php -->
<html>
<body>
<?php
phpinfo();
?>
</body>
</html>

Save that in your DocumentRoot dierctory (not cgi-bin!) and test via
Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top