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 3rd October 2006, 19:29
pimvh pimvh is offline
Junior Member
 
Join Date: Oct 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default php files not showing properly (as text)

php files showing not properly.

Installing ubuntu ans ISPconfig all seems to be ok the install was right out the box (with the help file)
But there is a little problem.
After set php in ispconfig the files do not showing properly, in fact they are showing up as ordinary text files in the browser.

Wat goes here wrong?
Reply With Quote
Sponsored Links
  #2  
Old 3rd October 2006, 19:52
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

Sounds like the php interpreter module is not correctly installed on the apache serving you websites.

What happens if you run
aptitude install libapache2-mod-php4
In case of you have apache2 running?
Reply With Quote
  #3  
Old 3rd October 2006, 20:40
pimvh pimvh is offline
Junior Member
 
Join Date: Oct 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, thanks for your quick response.


root@server1:~# aptitude install libapache2-mod-php4 Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
The following packages have been kept back:
linux-image-k7 linux-restricted-modules-k7
0 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
root@server1:~#

After restarting ispconfig nothing changed.


Quote:
Originally Posted by Ben
Sounds like the php interpreter module is not correctly installed on the apache serving you websites.

What happens if you run
aptitude install libapache2-mod-php4
In case of you have apache2 running?
Reply With Quote
  #4  
Old 3rd October 2006, 21:11
TheRudy TheRudy is offline
Senior Member
 
Join Date: Dec 2005
Posts: 216
Thanks: 1
Thanked 7 Times in 5 Posts
Default

Did you actualy install php? ISPConfig uses its own apache/php..

If you installed php, did you enable it in apache config file?
Reply With Quote
  #5  
Old 3rd October 2006, 21:49
pimvh pimvh is offline
Junior Member
 
Join Date: Oct 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I do exactly what was in the help file `The Perfect Setup - Fedora Core 4`
It runs without any problem compiled without any error.

Make a new Reseller in ispconfig, a client, and a site enable everything.
Upload the files (in the right dir) with FTP and everything seems to be ok except showing php.

Where do I enable php in the Apache config file?
Reply With Quote
  #6  
Old 4th October 2006, 08:44
pimvh pimvh is offline
Junior Member
 
Join Date: Oct 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Mistake its not Fedora but Ubuntu I'm installing!!!!
So I used of course also the ISP-Server Setup - Ubuntu 5.10 "Breezy Badger" guide and not the Fedora!

I see that several people having the same error but I'm found no solution.


Quote:
Originally Posted by pimvh
I do exactly what was in the help file `The Perfect Setup - Fedora Core 4`
It runs without any problem compiled without any error.

Make a new Reseller in ispconfig, a client, and a site enable everything.
Upload the files (in the right dir) with FTP and everything seems to be ok except showing php.

Where do I enable php in the Apache config file?
Reply With Quote
  #7  
Old 4th October 2006, 09:42
pimvh pimvh is offline
Junior Member
 
Join Date: Oct 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Found something...
In /etc/apache2/mods-enabled/php4.conf

Changed this:

<IfModule mod_php4.c>
# AddType application/x-httpd-php .php .phtml .php3
# AddType application/x-httpd-php-source .phps
</IfModule>

In this:

<IfModule mod_php4.c>
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
</IfModule>

And php seems to run now.

But the helpfile says; "comment out these lines"
Reply With Quote
  #8  
Old 4th October 2006, 10:39
TheRudy TheRudy is offline
Senior Member
 
Join Date: Dec 2005
Posts: 216
Thanks: 1
Thanked 7 Times in 5 Posts
Default

If you uncomment those PHP will work for every site you have on your server even if you disable PHP in ISPConfig.

Check the apache vhost file (can't remember the name) and see if you have php definition in there for a domain.
Reply With Quote
  #9  
Old 4th October 2006, 11:20
pimvh pimvh is offline
Junior Member
 
Join Date: Oct 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm not sure...is this ok?
Change the domainname in IP adress I'm testing this with a server at home.


# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
NameVirtualHost 192.168.2.130:80
<VirtualHost 192.168.2.130:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.localdomain:80
######################################
#
#
<VirtualHost 192.168.2.130:80>
ServerName 192.168.2.130:80
ServerAdmin webmaster@localdomain
DocumentRoot /var/www/web1/web
ServerAlias localdomain
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.j
ScriptAlias /cgi-bin/ /var/www/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web1/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
Reply With Quote
  #10  
Old 4th October 2006, 18:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Quote:
Originally Posted by pimvh
Found something...
In /etc/apache2/mods-enabled/php4.conf

Changed this:

<IfModule mod_php4.c>
# AddType application/x-httpd-php .php .phtml .php3
# AddType application/x-httpd-php-source .phps
</IfModule>

In this:

<IfModule mod_php4.c>
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
</IfModule>

And php seems to run now.

But the helpfile says; "comment out these lines"
Have a look here: http://www.howtoforge.com/forums/sho...e+php+globally
http://www.howtoforge.com/forums/sho...e+php+globally
__________________
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
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
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 09:29
Slightly Confused (DNS & Server Help) JohnnyBGoode Installation/Configuration 26 14th August 2007 09:54
VirtualHosts marra87 General 9 12th September 2006 04:09
php script injections Grizzly General 21 18th July 2006 08:55
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 13th March 2006 23:58


All times are GMT +2. The time now is 06:27.


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