# Web image library (gallery3) not working after PHP upgrade



## beesatmsu (Dec 23, 2014)

This is a bit strange. I upgraded PHP5.3 to PHP5.4 yesterday. I checked all WordPress sites were working but did not check my Gallery3 sites (they stopped supporting this software).

Right now most paths are not recognized by the computer. For sample:

bad site  <--nothing works, not even "Log in". 
good site [not upgraded yet]

The strangest thing is that the final image will work ok (so my blogs are not affected, at least). In other words the last link to a photo works:

good photo on bad site

The only other thing I changed was upgrading Apache24 to the newest.

I thought it would have something to do with the .htaccess file (I thought Gallery3 need access to it but perhaps Apache2.4 was not allowing it), but changing settings in Apache24's httpd.conf did not help.

Right now the good site also has updated Apache24, so I know it is not the problem. But I am running out of ideas -- something related to PHP, but what?


----------



## junovitch@ (Dec 28, 2014)

PHP does introduce changes that are not backwards compatible between releases. Reviewing the upstream documentation would be a good place to start.

http://php.net/manual/en/migration54.incompatible.php


----------



## beesatmsu (Jan 6, 2015)

Thanks, junovitch.
It appears that the newer PHP5.4 did not use my ../gallery/php.ini file, because right away I got an error that "short_open_tag" should be on, even thought in the main php.ini file (under /usr/local/etc/) specified it was on. 

/var/log/ gave a few warnings but no error.


```
rror log:

/var/log/httpd-error.log:

Unknown(0) : Warning - PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525-zts-debug/sqlite.so' - Cannot open "/usr/local/lib/php/20100525-zts-debug/sqlite.so"
Unknown(0) : Warning - PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525-zts-debug/apc.so' - Cannot open "/usr/local/lib/php/20100525-zts-debug/apc.so"
Unknown(0) : Warning - Module 'PDFlib' already loaded
```
This would be the same errors if I do `php -v` or `php`.  There was no sqlite or apc under "php5-extensions" (I installed from /usr/ports/lang/php5-extensions). I installed apc from math but it does not get rid of the error.

I also googled and found others had a blank page with gallery3.

http://galleryproject.org/node/105568

I tried both commenting out the line with ob_end_clean() and also changing the code ob_end_clean() to ob_flush(), neither worked.


----------



## beesatmsu (Jan 18, 2015)

I installed the newest released (FreeBSD 10.1) over the weekend and used Apache2.4, PHP5.6, and MySQL 5.6. But still the gallery is broken.  I had to copy my old httpd.conf to it to get it to work, otherwise it says "servers not found".

I then copied the gallery3/php.ini options, into the /usr/local/etc/php.ini, still no go!

So I am running out of ideas.


----------

