PDA

View Full Version : PHP 5.2.7 - wait with update?


hbokh
December 8th, 2008, 10:26
FYI: After cvsupdate php5 needs updating (port has 5.2.7), but on www.php.net it says:

Due to unfortunate regressions installing 5.2.7 is highly discouraged
For those who already have installed 5.2.7 can workaround the MQ bug by setting "filter.default_flags=0" in php.ini
A new release fixing this regression is expected shortly.

Was the port-update released before the above issue was known?

mfaridi
December 8th, 2008, 10:40
I do not know after I upgrade php5 today , right now my phpBB and galley2 dose not work .and other thing like joomla dose not work.

hbokh
December 8th, 2008, 11:00
Some more info:

PHP 5.2.7 has been removed from distribution

[07-Dec-2008] Due to a security bug found in the PHP 5.2.7 release, it has been removed from distribution. The bug affects configurations where magic_quotes_gpc is enabled, because it remains off even when set to on. In the meantime, use PHP 5.2.6 until PHP 5.2.8 is later released.

URL: http://www.php.net/archive/2008.php#id2008-12-07-1

CrazyFingers
December 8th, 2008, 17:08
After a cvsup, I now see php5-5.2.8 as the current port.

mfaridi
December 8th, 2008, 17:33
after upgrade to 5-5.2.8 , gallery 2 and joomla work good but phpbb dose not work

hbokh
December 8th, 2008, 21:08
After a cvsup, I now see php5-5.2.8 as the current port.

Indeed. About to start "portupgrade" here... :)

jleal2003
December 9th, 2008, 02:46
After a cvsup -g -L 2 ,
note that php5-5.2.8 is the current port

fraenki
December 18th, 2008, 10:38
after upgrade to 5-5.2.8 , gallery 2 and joomla work good but phpbb dose not work

Does this problem still exist? I'm experiencing similar issues here and would appreciate any hint on how to solve problems with the new PHP 5.2.8.

Typo3 dies...

[Thu Dec 18 09:58:06 2008] [error] [client XXX.XXX.XXX.XXX] PHP Warning: xml_parser_set_option() [<a href='function.xml-parser-set-option'>function.xml-parser-set-option</a>]: Unknown option in typo3_src-4.2.2/t3lib/class.t3lib_div.php on line 2308
[Thu Dec 18 09:58:06 2008] [notice] child pid 75225 exit signal Segmentation fault (11)


And php-spl causes trouble (segfaults), but without this module, some other modules won't load...

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20060613/mysqli.so' - /usr/local/lib/php/20060613/mysqli.so: Undefined symbol &quot;spl_ce_RuntimeException&quot; in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20060613/sqlite.so' - /usr/local/lib/php/20060613/sqlite.so: Undefined symbol &quot;spl_ce_Countable&quot; in Unknown on line 0
PHP Warning: Cannot load module 'PDO' because required module 'spl' is not loaded in Unknown on line 0


Running 7.0-RELEASE-p6 on i386.


Bye
- fraenki

gilinko
December 18th, 2008, 11:52
Most problems from any upgrade of php5 using ports stems from one single point.

The modules haven't been recompiled with the new 5.2.8 source, but are "left" from the old php version. Do a make reinstall on the affected modules with the new source from ports, but in essence ALL modules need to be recompiled. It's a drawback from splitting the modules from the core in ports.

fraenki
December 18th, 2008, 12:40
Do a make reinstall on the affected modules [...]

Well, I actually did this while upgrading with portupgrade -vf php5\*...

But I think I found the problem. During today's portupgrade session I found some new warnings:


** Port marked as IGNORE: security/pecl-hash:
cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 5)
** Port marked as IGNORE: devel/pecl-json:
cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 5)
** Port marked as IGNORE: archivers/pecl-zip:
cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 5)


These ports are currently installed, so I guess it's related to them. I'll remove them as soon as portupgrade finishes...


Bye
- fraenki

DutchDaemon
December 18th, 2008, 13:19
Well, that information was already in /usr/ports/UPDATING ..

20081211:
AFFECTS: users of lang/php5
AUTHOR: pav@FreeBSD.org, itetcu@FreeBSD.org, ale@FreeBSD.org

As of php 5.2.7, pcre extension is distributed with the core php5 package,
and not as a standalone module anymore. Follow these steps to update your
installation:

Portupgrade users:
pkg_delete -f php5-pcre-5.2.6
pkgdb -F
portupgrade as usual

Portmaster users:
pkg_delete -f php5-pcre\*
portmaster php5\*

If you are using pecl ports you might need to force an update on them, ie.:
portupgrade -f pecl\*
or
portmaster pecl\*
If you have the pecl hash, json and/or zip extensions you need to replace
them with the php5 bundled ones, ie.:
portmaster/portupgrade -o archivers/php5-zip archivers/pecl-zip
portmaster/portupgrade -o devel/php5-json devel/pecl-json
portmaster/portupgrade -o security/php5-hash security/pecl-hash

If you build your INDEX locally and you tried to build it after the php
update commit, you need to rebuild it _after_ you updated lang/php5:
cd /usr/ports && make index
or (if you use ports-mgmt/p5-FreeBSD-Portindex):
cd /usr/ports && cache-init && portindex -o `make -V INDEXFILE`

fraenki
December 18th, 2008, 17:06
Well, that information was already in /usr/ports/UPDATING ..

Doh! Actually I read UPDATING more than once... but those 5 lines that would have saved me some headache couldn't catch my attention.

Thanks anyway.

- fraenki

gilinko
December 18th, 2008, 17:08
Well, I actually did this while upgrading with portupgrade -vf php5\*...

But I think I found the problem. During today's portupgrade session I found some new warnings:

These ports are currently installed, so I guess it's related to them. I'll remove them as soon as portupgrade finishes...


Bye
- fraenki

Made the assumption that you had already taken care of that, my bad. However the mysqli and sqlite extensions will need a recompilation, and they should be found by portupgrade/portmanager etc. If not, do the make install yourself and it will be fixed.

It's a helpfull reminder when reinstalling php through the ports tree, that every extension should be checked and if necessary be recompiled. I myself force a recompilation every time php core is updated, just to be on the safe side.