Apache doesn't render php pages

Hi there. I've a problem with Apache. When I point to a php page, this
is not renderized. I.e. in the source code of page, I see all php
code!

I'm using LAMP (opensuse 10.3)
I don't know if could be useful but some day ago I installed tomcat
too...
Any idea?
tnx in advance, Giovanni
Giovanni [ Mi, 16 Januar 2008 14:43 ] [ ID #1909555 ]

Re: Apache doesn't render php pages

Post removed (X-No-Archive: yes)
Notifier Deamon [ Mi, 16 Januar 2008 14:54 ] [ ID #1909556 ]

Re: Apache doesn't render php pages

I have run into this many times. It appears that your php.conf did not get
created or does not exist. Take a look in your /etc/httpd/conf.d folder. You
should have a few conf files there. perl.conf, python.conf php.conf etc...If
the php.conf is not listed, let me know what version of php you installed
and I can past it here for you. What OS is this?

To get the version of php just do this from shell

php -v


Jim


"Davide Bianchi" <davideyeahsure [at] onlyforfun.net> wrote in message
news:slrnfos37e.385.davideyeahsure [at] fogg.onlyforfun.net...
> On 2008-01-16, Giovanni <blastingproton [at] gmail.com> wrote:
>> Hi there. I've a problem with Apache. When I point to a php page, this
>> is not renderized. I.e. in the source code of page, I see all php
>> code!
>
> Obviously your php installation isn't correct, you missed to load the
> php module in apache.
> Check if you have a 'LoadModule phpsomething' in your httpd.conf file.
>
> Davide
>
> --
> Windows 95: Proof that P. T. Barnum was right.
Jim G [ Mi, 16 Januar 2008 15:33 ] [ ID #1909557 ]

Re: Apache doesn't render php pages

Tnx you all.
So...the grep for php in httpd.conf is this:
# |-- sysconfig.d/loadmodule.conf . . . . . [*] load these modules
# | |--mod_userdir.conf . . . . . . . . enable UserDir (if
mod_userdir is loaded)
# | `-- loadmodule.conf
Include /etc/apache2/sysconfig.d/loadmodule.conf


In the folder there only is php5.conf...
Now I'd search where apache should load it, is not?
Giovanni [ Mi, 16 Januar 2008 19:55 ] [ ID #1909561 ]

Re: Apache doesn't render php pages

Post removed (X-No-Archive: yes)
Notifier Deamon [ Mi, 16 Januar 2008 20:09 ] [ ID #1909562 ]

Re: Apache doesn't render php pages

Ok, I found the problem. I had to replace "<?" with "<?php" tag...
But now I don't remember where change this setting... do you?
Giovanni [ Mi, 16 Januar 2008 21:55 ] [ ID #1909563 ]

Re: Apache doesn't render php pages

On 16 Gen, 21:55, Giovanni <blastingpro... [at] gmail.com> wrote:
> Ok, I found the problem. I had to replace "<?" with "<?php" tag...
> But now I don't remember where change this setting... do you?

It's all right!
For opensuse 10.3 users:

edit:
/etc/php5/apache2/php.ini

and change
short_open_tag = Off

to
short_open_tag = On

obviously restart apache
/etc/init.d/apache2 restart

Greetings...
Giovanni [ Mi, 16 Januar 2008 22:08 ] [ ID #1909564 ]
Webserver » alt.apache.configuration » Apache doesn't render php pages

Vorheriges Thema: Multiple Instances/Installs of Apache
Nächstes Thema: USEFUL perl SCRIPT: NTP verifier