Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th August 2008, 13:01
Kev King Kev King is offline
Member
 
Join Date: May 2008
Location: Glos, UK
Posts: 43
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via ICQ to Kev King
Question Apache/php web page loading problem

Running Debian etch server with apache2, php5 installed.

Having problems loading web sites in localhost or external using ip address.

Basically when I try to open the site the php script is displayed in the explorer window and not the site as it should be.

Am I missing something in apache config file.

Will try and post relevent log files if required.

===========Edited==============

Have re-installed following the tut here the pefect setup-debian, and using php4/php5 with apache. But something always seems to be goig wrong.

I think there might be something wrong with my /etc/apache2/apache2.conf file but I cant seem to figure out where to put the commands that are missing.

There doesnt seem to be a Directory listing:

DirectoryIndex index.html index.htm index.shtml index.cgi index.pl index.php index.php4 index.xhtml



and these 2 too:

AddHandler php-script .php4
Action php-script /cgi-bin/php4

Can some one please shed some light???

Have attached my /etc/apache2/apache2.conf file for info

Last edited by Kev King; 8th August 2008 at 12:45. Reason: added info
Reply With Quote
Sponsored Links
  #2  
Old 8th August 2008, 16:24
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

The PErfect Setup for Debian contains a chapter where PHP gets disabled globally (this is needed by ISPConfig). If you don't use ISPConfig, please undo that chapter.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
Kev King (8th August 2008)
  #3  
Old 8th August 2008, 22:54
Kev King Kev King is offline
Member
 
Join Date: May 2008
Location: Glos, UK
Posts: 43
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via ICQ to Kev King
Default

What a bloody plonker, I thought I had skipped that bit because I wasnt going to be installing ISPconfig. Just goes to show when you are concentrating so hard you dont always read the instructions properly.

Just spent nearly the whole week trying to figure that problem out, un-installing and re-installing software, going round and round in circles.

Just gettin an internal server error now, so am getting somewhere. Will re-install the apache bit of the tut.

Once again many thanks falko, its easy when you know what your doing!!!
Reply With Quote
  #4  
Old 8th August 2008, 23:41
Kev King Kev King is offline
Member
 
Join Date: May 2008
Location: Glos, UK
Posts: 43
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via ICQ to Kev King
Default Extra question

Would it do any harm to remove the files I have installed relating to apache and php? As I cant fully remember what I have tinkered with. And do a clean install of that part of the tutorial?

apt-get remove ................... should do the trick right?
Reply With Quote
  #5  
Old 9th August 2008, 11:58
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

I'd use
Code:
apt-get remove --purge ...
to also remove the config files that came with the packages.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
Kev King (10th August 2008)
  #6  
Old 10th August 2008, 14:44
Kev King Kev King is offline
Member
 
Join Date: May 2008
Location: Glos, UK
Posts: 43
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via ICQ to Kev King
Default

Um, still not able to view some web pages, it just displays the .php script.

falko thanks for the above tip, done that a re-installed apache and php, followed the instructions in the tutorial without the ISPconfig bit.

Is there something still that I have not installed or set up.

The default apache test page displays ok

Following extract that I have had a look at from PHP FAQ:

I have followed all the steps to install the Apache module version on Unix, and my PHP scripts show up in my browser or I am being asked to save the file.

This means that the PHP module is not getting invoked for some reason. Three things to check before asking for further help:

Make sure that the httpd binary you are running is the actual new httpd binary you just built. To do this, try running: /path/to/binary/httpd -l If you don't see mod_php4.c listed then you are not running the right binary. Find and install the correct binary.
Make sure you have added the correct Mime Type to one of your Apache .conf files. It should be: AddType application/x-httpd-php .php Also make sure that this AddType line is not hidden away inside a <Virtualhost> or <Directory> block which would prevent it from applying to the location of your test script.
Finally, the default location of the Apache configuration files changed between Apache 1.2 and Apache 1.3. You should check to make sure that the configuration file you are adding the AddType line to is actually being read. You can put an obvious syntax error into your httpd.conf file or some other obvious change that will tell you if the file is being read correctly.

mod_php4.c is not listed but I am at a loss as to were to find it or what will install it? enable it.

Everything is installed as it should be from the tutorial.

When I run php -i it displays alot of code so I am taking it that php is ok it must be something to do with apache?
Reply With Quote
  #7  
Old 11th August 2008, 11:55
Kev King Kev King is offline
Member
 
Join Date: May 2008
Location: Glos, UK
Posts: 43
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via ICQ to Kev King
 
Talking Problem Solved

Um, the problem was the naming of a file or its .xxx

The file I was trying to access was not saved in the right format, now it has been it loads in explorer window fine.

Let that be a lesson to anyone, check what your doing, even if your following some one else's idiot proof quide. It's what you input that will ultimately work or not which ever the case maybe.

Thx falko for your replies.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
changes in /web do not affect the page damaltor Installation/Configuration 2 16th March 2008 12:33
Problems with the virtual email system with postfix, courier,mysql Greg Parker HOWTO-Related Questions 3 3rd January 2007 17:59
Mail using postfix receive but cannot send garfabian Installation/Configuration 17 2nd September 2006 13:55
help with a web page dragos Server Operation 5 14th June 2006 00:17
Problem with page 2/4 in the Howtos linuxfast HOWTO-Related Questions 4 21st September 2005 16:02


All times are GMT +2. The time now is 20:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.