LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-10-2005, 05:20 PM   #1
Sevoma
Member
 
Registered: Jul 2004
Distribution: Debian x86_64
Posts: 61

Rep: Reputation: 15
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?
 
Old 02-11-2005, 01:31 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Is the php module being loaded?

Have you changed/installed anything recently?

Can you post a copy of httpd.conf.
 
Old 02-11-2005, 01:39 PM   #3
bcal
Member
 
Registered: Nov 2004
Distribution: FC3/winXP dual-boot
Posts: 61

Rep: Reputation: 15
are you loading the page properly, i.e. with the http:// prefix? Otherwise the browser may just open the file.
 
Old 02-11-2005, 02:40 PM   #4
Sevoma
Member
 
Registered: Jul 2004
Distribution: Debian x86_64
Posts: 61

Original Poster
Rep: Reputation: 15
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?
 
Old 02-11-2005, 02:44 PM   #5
Sevoma
Member
 
Registered: Jul 2004
Distribution: Debian x86_64
Posts: 61

Original Poster
Rep: Reputation: 15
reinstalling it did not work

EDIT: I restarted apache too.
 
Old 02-12-2005, 04:28 PM   #6
Sevoma
Member
 
Registered: Jul 2004
Distribution: Debian x86_64
Posts: 61

Original Poster
Rep: Reputation: 15
please help me correct this
 
Old 02-12-2005, 04:46 PM   #7
havelino
LQ Newbie
 
Registered: Jan 2005
Location: The Netherlands
Distribution: Debian 3.0 Sarge
Posts: 29

Rep: Reputation: 15
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.

Last edited by havelino; 02-12-2005 at 04:48 PM.
 
Old 02-14-2005, 04:25 PM   #8
Sevoma
Member
 
Registered: Jul 2004
Distribution: Debian x86_64
Posts: 61

Original Poster
Rep: Reputation: 15
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.
 
Old 02-14-2005, 08:09 PM   #9
Sevoma
Member
 
Registered: Jul 2004
Distribution: Debian x86_64
Posts: 61

Original Poster
Rep: Reputation: 15
I fixed the problem. I ended up reinstalling the OS because I messed it up.
 
Old 02-15-2005, 03:11 AM   #10
havelino
LQ Newbie
 
Registered: Jan 2005
Location: The Netherlands
Distribution: Debian 3.0 Sarge
Posts: 29

Rep: Reputation: 15
Yeah sometimes that happens I hoop you recovered you're data first with knoppix for example.
 
Old 02-15-2005, 03:07 PM   #11
Sevoma
Member
 
Registered: Jul 2004
Distribution: Debian x86_64
Posts: 61

Original Poster
Rep: Reputation: 15
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

Last edited by Sevoma; 02-15-2005 at 03:10 PM.
 
Old 02-15-2005, 03:39 PM   #12
Sevoma
Member
 
Registered: Jul 2004
Distribution: Debian x86_64
Posts: 61

Original Poster
Rep: Reputation: 15
Ok, now I'm getting a forbidden when trying to access the cgi file.
 
Old 02-15-2005, 05:13 PM   #13
Sevoma
Member
 
Registered: Jul 2004
Distribution: Debian x86_64
Posts: 61

Original Poster
Rep: Reputation: 15
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?
 
Old 02-15-2005, 05:44 PM   #14
Sevoma
Member
 
Registered: Jul 2004
Distribution: Debian x86_64
Posts: 61

Original Poster
Rep: Reputation: 15
Problem solved. Other cgi scripts work, but cgi-poxy wont.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Avidemux2 acting strange alitrix Linux - Software 0 12-15-2004 10:55 AM
grep acting strange in script fredgt Programming 2 12-14-2004 11:15 AM
vim acting strange littlemidget Debian 6 09-17-2004 11:52 AM
suse 9.1 acting strange ozzytx Linux - General 1 08-29-2004 09:41 PM
radeon 9200se ==> tv out acting strange wimbo Linux - Hardware 1 02-05-2004 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration