By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,377 Members | 3,052 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,377 IT Pros & Developers. It's quick & easy.

php docs not working on Apache

P: n/a
Hi, I've installed php4.0.4 on a linux machine running apache 1.3.19 but the
php is not working properly. When I try to open a php doc all i get is the
actual code - not the output eg. <? echo "This isn't working" ?>

These line have been added to my httpd.conf file:

AddModule mod_php.c
AddModule mod_php3.c
AddModule mod_perl.c
LoadModule php_module modules/mod_php.so
LoadModule php3_module modules/libphp3.so
LoadModule php4_module modules/libphp4.so
LoadModule perl_module modules/libperl.so
AddType application/x-httpd-php3 .php
AddType application/x-httpd-php .php

Does anyone know what I am missing?

Jul 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Thus spoke gwerk:
Hi, I've installed php4.0.4 on a linux machine running apache 1.3.19 but
the
php is not working properly. When I try to open a php doc all i get is
the actual code - not the output eg. <? echo "This isn't working" ?>

These line have been added to my httpd.conf file:

AddModule mod_php.c
AddModule mod_php3.c
AddModule mod_perl.c
LoadModule php_module modules/mod_php.so
LoadModule php3_module modules/libphp3.so
LoadModule php4_module modules/libphp4.so
LoadModule perl_module modules/libperl.so
AddType application/x-httpd-php3 .php
AddType application/x-httpd-php .php

Does anyone know what I am missing?


Take a look at the logifles. Usually you'll find something about "no such
file" or "unable to open"...
--
arkascha
Jul 17 '05 #2

P: n/a
gwerk wrote:
Hi, I've installed php4.0.4 on a linux machine running apache 1.3.19 but
the
php is not working properly. When I try to open a php doc all i get is
the actual code - not the output eg. <? echo "This isn't working" ?>

These line have been added to my httpd.conf file:

AddModule mod_php.c
AddModule mod_php3.c
AddModule mod_perl.c
LoadModule php_module modules/mod_php.so
LoadModule php3_module modules/libphp3.so
LoadModule php4_module modules/libphp4.so
LoadModule perl_module modules/libperl.so
AddType application/x-httpd-php3 .php
AddType application/x-httpd-php .php

Does anyone know what I am missing?


Check your php.ini file for short_tags. If it says no, either change it to
yes or use <?php instead.

/Andreas
--
Registeret Linux user #292411
Jul 17 '05 #3

P: n/a
the short tags is set to ON but I've also noticed that when I write the php
code it is no longer colour coded - which is strange because it was before I
installed Apache...
"Andreas Paasch" <An*****@Paasch.Net> wrote in message
news:Kw*********************@news000.worldonline.d k...
gwerk wrote:
Hi, I've installed php4.0.4 on a linux machine running apache 1.3.19 but
the
php is not working properly. When I try to open a php doc all i get is
the actual code - not the output eg. <? echo "This isn't working" ?>

These line have been added to my httpd.conf file:

AddModule mod_php.c
AddModule mod_php3.c
AddModule mod_perl.c
LoadModule php_module modules/mod_php.so
LoadModule php3_module modules/libphp3.so
LoadModule php4_module modules/libphp4.so
LoadModule perl_module modules/libperl.so
AddType application/x-httpd-php3 .php
AddType application/x-httpd-php .php

Does anyone know what I am missing?


Check your php.ini file for short_tags. If it says no, either change it to
yes or use <?php instead.

/Andreas
--
Registeret Linux user #292411

Jul 17 '05 #4

P: n/a
gwerk wrote:
the short tags is set to ON but I've also noticed that when I write the
php code it is no longer colour coded - which is strange because it was
before I installed Apache...


The color coding of your code is not in any way related to Apache, that's a
program issue of the program you use for your coding of php pages.

What I just saw, what about your index.php page? is that among your index
extensions in your apache configuration file?

Quick search for index.htm should give you the line you need.

/Andreas
"Andreas Paasch" <An*****@Paasch.Net> wrote in message
news:Kw*********************@news000.worldonline.d k...
gwerk wrote:
> Hi, I've installed php4.0.4 on a linux machine running apache 1.3.19
> but the
> php is not working properly. When I try to open a php doc all i get is
> the actual code - not the output eg. <? echo "This isn't working" ?>
>
> These line have been added to my httpd.conf file:
>
> AddModule mod_php.c
> AddModule mod_php3.c
> AddModule mod_perl.c
> LoadModule php_module modules/mod_php.so
> LoadModule php3_module modules/libphp3.so
> LoadModule php4_module modules/libphp4.so
> LoadModule perl_module modules/libperl.so
> AddType application/x-httpd-php3 .php
> AddType application/x-httpd-php .php
>
> Does anyone know what I am missing?


Check your php.ini file for short_tags. If it says no, either change it
to yes or use <?php instead.

/Andreas
--
Registeret Linux user #292411


--
Registeret Linux user #292411
Jul 17 '05 #5

P: n/a
Yes, index.php is included. Does the ScriptAlias have to be set for php
running on Linux? I have seen it set for Windows machines but I thought
that AddType takes care of it for linux machines.

"Andreas Paasch" <An*****@Paasch.Net> wrote in message
news:Ke*********************@news000.worldonline.d k...
gwerk wrote:
the short tags is set to ON but I've also noticed that when I write the
php code it is no longer colour coded - which is strange because it was
before I installed Apache...
The color coding of your code is not in any way related to Apache, that's

a program issue of the program you use for your coding of php pages.

What I just saw, what about your index.php page? is that among your index
extensions in your apache configuration file?

Quick search for index.htm should give you the line you need.

/Andreas
"Andreas Paasch" <An*****@Paasch.Net> wrote in message
news:Kw*********************@news000.worldonline.d k...
gwerk wrote:

> Hi, I've installed php4.0.4 on a linux machine running apache 1.3.19
> but the
> php is not working properly. When I try to open a php doc all i get is > the actual code - not the output eg. <? echo "This isn't working" ?>
>
> These line have been added to my httpd.conf file:
>
> AddModule mod_php.c
> AddModule mod_php3.c
> AddModule mod_perl.c
> LoadModule php_module modules/mod_php.so
> LoadModule php3_module modules/libphp3.so
> LoadModule php4_module modules/libphp4.so
> LoadModule perl_module modules/libperl.so
> AddType application/x-httpd-php3 .php
> AddType application/x-httpd-php .php
>
> Does anyone know what I am missing?

Check your php.ini file for short_tags. If it says no, either change it
to yes or use <?php instead.

/Andreas
--
Registeret Linux user #292411


--
Registeret Linux user #292411

Jul 17 '05 #6

P: n/a
gwerk wrote:
Yes, index.php is included. Does the ScriptAlias have to be set for php
running on Linux? I have seen it set for Windows machines but I thought
that AddType takes care of it for linux machines.


<IfModule mod_dir.c>
DirectoryIndex index.php index.shtml index.html index.htm
</IfModule>

is needed in commonhttpd.conf (Apache 2.x)

And

application/x-php php php3 php4

in apache-mime-types

That's what I've got, and my php code runs just smooth on Mandrake 9.2

/Andreas
--
Registeret Linux user #292411
Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.