# Upgrading PHP 5.2 -> PHP 5.3



## DutchDaemon (Apr 9, 2010)

PHP 5.3.2 is being rolled out now.


----------



## DutchDaemon (Apr 9, 2010)

*NOTE:*


```
These upgrade notes are taken from /usr/ports/UPDATING

    * 2010-04-09

      Affects: users of lang/php5

      Author: ale@FreeBSD.org

      Reason: 
        As of php 5.3, a few extensions were removed from or included into the core
        php5 package.  Follow the steps below to update your installation.

[B]        1) Delete the following packages (if installed):
           - php5-dbase
           - php5-ncurses
           - php5-pcre
           - php5-spl
           - php5-ming
           - php5-mhash

        2) Rebuild php5 and all ports depending on it.
[/B]
```

You have been warned!

Point #2 should be covered by [cmd=]portmaster -Rr php5-5\*[/cmd] or [cmd=]portupgrade -r php5-5\*[/cmd].


----------



## hellevil (Apr 9, 2010)

update port eaccelerator please, don't build with php5.3


----------



## rambetter (Apr 9, 2010)

*www/pecl-APC can't build w/ php5-5.3.2*

pecl-APC 3.0.19 won't compile anymore after the upgrade of PHP to 5.3.2.  When I do ``make install'' I get this:


```
cc -I. -I/usr/ports/www/pecl-APC/work/APC-3.0.19 -DPHP_ATOM_INC -I/usr/ports/www/pecl-APC/work/APC-3.0.19/include -I/usr/ports/www/pecl-
APC/work/APC-3.0.19/main -I/usr/ports/www/pecl-APC/work/APC-3.0.19 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include
/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -fno-strict-
aliasing -pipe -march=prescott -c /usr/ports/www/pecl-APC/work/APC-3.0.19/php_apc.c  -fPIC -DPIC -o .libs/php_apc.o
/usr/ports/www/pecl-APC/work/APC-3.0.19/php_apc.c:959: error: duplicate 'static'
*** Error code 1
```


----------



## ColorPrint (Apr 10, 2010)

ZendOptimizer (/usr/ports/deve/ZendOptimizer) not works now 
It works only with php 5.2. (and I see that ZendOptimizer port now works only with php4...)
How is it possible to downgrade back to php5.2 ?
I think it should be supporte in /usr/ports/lang/php52 , like php4 is still supported....


----------



## aurora (Apr 10, 2010)

*Updating specifically  the php5 port*

I think I have updated my php5 port by

`# csup /root/cvs-supfile`

but `# cd /lang/php5 && make`

still attempts to fetch php-5.2.11.tar.bz2 and not php-5.3.x.

How to update it properly?


----------



## gilinko (Apr 10, 2010)

ColorPrint said:
			
		

> ZendOptimizer (/usr/ports/deve/ZendOptimizer) not works now
> It works only with php 5.2. (and I see that ZendOptimizer port now works only with php4...)
> How is it possible to downgrade back to php5.2 ?
> I think it should be supporte in /usr/ports/lang/php52 , like php4 is still supported....



Support for Zend has been dropped for FreeBSD by Zend, so on that you have to contact them. And php4 isn't supported, it's just not removed from the ports tree and support for the 5.2 line is soon to be dropped as well from upstream.

You can always install an earlier pre compiled package found in the -STABLE directories


----------



## DutchDaemon (Apr 10, 2010)

aurora72 said:
			
		

> I think I have updated my php5 port by
> 
> `# csup /root/cvs-supfile`
> 
> ...



Either use portsnap(8) (`# portsnap fetch extract` the first time, and `# portsnap fetch update` after that) or use a ports-specific cvs-file, like the ports-supfile in /usr/share/examples/cvsup.


----------



## DutchDaemon (Apr 11, 2010)

hellevil said:
			
		

> update port eaccelerator please, don't build with php5.3



The new version of eaccelerator made it into the ports tree today: www/eaccelerator (Update to 0.9.6 release: - add support for php 5.3 - drop support for php4).


----------



## DutchDaemon (Apr 12, 2010)

rambetter said:
			
		

> pecl-APC 3.0.19 won't compile anymore after the upgrade of PHP to 5.3.2.



The new version is in the ports tree -> www/pecl-APC v3.0.19 ("Unbreak after recent PHP 5.3.2 update").


----------

