Re: Re: httpd not interpreting a php file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 25, 2014 at 4:00 AM, Gergely Buday <gbuday@xxxxxxxxx> wrote:

> >> 1) As asked by francis, does your httpd.conf file have a statement
> >> like: AddType application/x-httpd-php .php
> >>
> >> 2) Does your httpd.conf file have a statement like:    LoadModule
> >> php5_module /usr/libexec/apache2/libphp5.so (with the appropriate
> >> path)
>
> > So, ... in the /etc/httpd/conf.d directory do you have a "php.conf"
> > file? There should be:
> >
> >     SetHandler application/x-httpd-php
> >
> >     AddType text/html .php
> >
> > lines. Are they there, uncommented? Note that the "SetHandler" is
> > within a "<FilesMatch \.php$>" construct, so the extension on your
> > php files matters.
> >
> > Additionally, do you have an /etc/httpd/conf.modules.d directory
> > that contains the file "10-php.conf"? If so, it should have the
> > "LoadModule php5_module modules/libphp5.so" line.
>
> Yes I have 10-php.conf and the LoadModule inside it. And I have php.conf:
>
> #
> # Cause the PHP interpreter to handle files with a .php extension.
> #
> <FilesMatch \.php$>
>     SetHandler application/x-httpd-php
> </FilesMatch>
>
> #
> # Allow php to handle Multiviews
> #
> AddType text/html .php
>
> #
> # Add index.php to the list of files that will be served as directory
> # indexes.
> #
> DirectoryIndex index.php
>
> #
> # Uncomment the following lines to allow PHP to pretty-print .phps
> # files as PHP source code:
> #
> #<FilesMatch \.phps$>
> #    SetHandler application/x-httpd-php-source
> #</FilesMatch>
>
> #
> # Apache specific PHP configuration options
> # those can be override in each configured vhost
> #
> php_value session.save_handler "files"
> php_value session.save_path    "/var/lib/php/session"
>
> As I said simple index.php works but this real world code not. I now
> guess this is not a httpd configuration problem but a php programming
> one.
>
> - Gergely
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Insure that all of the PHP files that are not working start with "<?php",
it could be that shortag disabled and you are using it.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux