PHP not working after recent update

I updated ports and system the other day and now I can't get PHP working at all.

[cmd=]<? echo phpinfo(); ?>[/cmd] gives no output (blank screen). Any plain HTML file in that directory works fine.

I've got this in php.conf:
Code:
# more php.conf
PHP_VER=5
PHP_VERSION=5.4.4
PHP_SAPI=cli cgi mod
PHP_EXT_INC=pcre spl

I've got this in httpd.conf:
Code:
LoadModule php5_module        libexec/apache22/libphp5.so

    <IfModule mod_php5.c>
        DirectoryIndex index.php index.html
    </IfModule>
    <IfModule mod_php5.c>
        AddType application/x-httpd-php .php .html
        AddType application/x-httpd-php-source .phps
    </IfModule>

It seemed to be working ok even after the update, but when I restarted Apache, that's when it stopped working.
 
Lido said:
...
I've got this in httpd.conf:
Code:
LoadModule php5_module        libexec/apache22/libphp5.so

    <IfModule mod_php5.c>
        DirectoryIndex index.php index.html
    </IfModule>
    <IfModule mod_php5.c>
        AddType application/x-httpd-php .php .html
        AddType application/x-httpd-php-source .phps
    </IfModule>

It seemed to be working ok even after the update, but when I restarted apache, that's when it stopped working.

Take the same name in the <IfModule ...> directive as you used in the LoadModule ...directive, i.e. php5_module. mod_php5.c does not exist anymore, and I even don't know if it ever existed. This one has bitten already many people here on the list.

Make also sure, that the setting short_open_tag is set to On in file /usr/local/etc/php.ini.

Best regards

Rolf
 
Thanks. I don't actually use the short tags on this site and I had already duplicated those lines inside the IfModule tags outside the tags. Still not getting any action.
 
Back
Top