LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Php4 acting strange (https://www.linuxquestions.org/questions/linux-software-2/php4-acting-strange-288664/)

Sevoma 02-10-2005 05:20 PM

Php4 acting strange
 
My server used to execute php files fine (but not perl or cgi), but now it just serves the script (the browser trys to open it). How could I correct this?

david_ross 02-11-2005 01:31 PM

Is the php module being loaded?

Have you changed/installed anything recently?

Can you post a copy of httpd.conf.

bcal 02-11-2005 01:39 PM

are you loading the page properly, i.e. with the http:// prefix? Otherwise the browser may just open the file.

Sevoma 02-11-2005 02:40 PM

My httpd.conf is:

ScriptAlias /cgi-bin "/var/www/cgi-bin"

CGI does not work either.
I am acessing it with http://
I think I will just try reinstalling php.

Can someone help me get cgi/perl working?

Sevoma 02-11-2005 02:44 PM

reinstalling it did not work

EDIT: I restarted apache too.

Sevoma 02-12-2005 04:28 PM

please help me correct this

havelino 02-12-2005 04:46 PM

Howto make shore that apache is loading php properly

[root]# apache(2)ctl
or
http://localhost/nonexistingpage

1) If you have apache with show version module you can see which types of modules are being loaded. (php4 should be there)

2) You get an error witch apachectl try using an non existing page. You see an error code but also apache information with the loaded modules.

and dpkg-reconfigure the packages in question.

Sevoma 02-14-2005 04:25 PM

I tryed what you said and php4 was not there. libapache2-mod-php4 was installed, I reinstalled it and not luck. I checked php4 in webmin's apache2 module and reastarted apache2, still no luck. I will now try reinstalling apache2.

Sevoma 02-14-2005 08:09 PM

I fixed the problem. I ended up reinstalling the OS because I messed it up.

havelino 02-15-2005 03:11 AM

Yeah sometimes that happens :D I hoop you recovered you're data first with knoppix for example.

Sevoma 02-15-2005 03:07 PM

Yeah, I had a automated backup system to a second hdd. I have everything up and running. One question though.

How do I extract the tar file from /mnt/backup/files/backup_date.tar.gz to /var/www? That would be very helpful if you could tell me how to do that.

Oh. Cgi still does not work properly. You can access the man pages by
<url>/cgi-bin/man/man2html, but when I try to put a cgi file in /var/www/cgi-bin (with correct permissions), I get a 404. Mabey there is a cgi-bin outside of /var/www?

Thanks, Sevoma

Sevoma 02-15-2005 03:39 PM

Ok, now I'm getting a forbidden when trying to access the cgi file.

Sevoma 02-15-2005 05:13 PM

I found out that the cgi-bin is located in /usr/lib/cgi-bin. I put the file in there and I get 403 forbidden again. What do I have to do to get it to work?

Sevoma 02-15-2005 05:44 PM

Problem solved. Other cgi scripts work, but cgi-poxy wont.


All times are GMT -5. The time now is 08:15 PM.