HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   php files not showing properly (as text) (http://www.howtoforge.com/forums/showthread.php?t=7237)

pimvh 3rd October 2006 19:29

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?

Ben 3rd October 2006 19:52

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?

pimvh 3rd October 2006 20:40

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. :confused:


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?


TheRudy 3rd October 2006 21:11

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

If you installed php, did you enable it in apache config file?

pimvh 3rd October 2006 21:49

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?

pimvh 4th October 2006 08:44

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?


pimvh 4th October 2006 09:42

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" :confused:

TheRudy 4th October 2006 10:39

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.

pimvh 4th October 2006 11:20

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>

falko 4th October 2006 18:10

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" :confused:

Have a look here: http://www.howtoforge.com/forums/sho...e+php+globally
http://www.howtoforge.com/forums/sho...e+php+globally


All times are GMT +2. The time now is 03:37.

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