# PHP not working after recent update



## Lido (Jul 2, 2012)

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:

```
# 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:

```
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.


----------



## Anonymous (Jul 2, 2012)

Lido said:
			
		

> ...
> I've got this in httpd.conf:
> 
> 
> ...



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


----------



## Lido (Jul 2, 2012)

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.


----------



## Lido (Jul 3, 2012)

This helped:

```
<IfModule php5_module>
  DirectoryIndex index.php
 </IfModule>
```
as noted here:
http://forums.freebsd.org/showthread.php?t=32906


----------

