Version Conflicts with PHP Port Upgrade & MySQL DB Extensions

EDIT NOTES (blue typeface):

This four year old paragraph is related to my current post below. Problem now is with installation of php5.6.

There were several exacerbating situations that compounded the difficulty of identifying and solving the problems. I have generated about nineteen pages of notes in a WordPerfect text file. After I decompress, I will summarize the solution and post updates for your information.


===============

I have updated my ports (all) trying both cvsup and portsnap.

I'm having difficulty synchronizing the make of php52 and php52-extensions. At one point, phpinfo() revealed that php v5.3+ was installed . . .how I don't know unless it had something to do with a recent port install of Samba and OpenLDAP (it was spooky to watch changes ported regarding both MySQL and PHP). Regardless, once Apache v2.2.11 was eventually restarted, things like phpMyAdmin, ZenPhoto, and WebCalendar . . .all dependent on the MySQL backend engine, now fail with numerous messages similar to the following:

Code:
Unknown(0) : Warning - PHP Startup: openssl: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=1, thread-safety=0
These options need to match

Unknown(0) : Warning - PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=1, thread-safety=0
These options need to match

. . .[I]and notice the diffirent API dates regarding the following:[/I]

Unknown(0) : Warning - PHP Startup: SimpleXML: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match

First Question: In consideration that I'm running FreeBSD v7.2, is that precluding the port download of php53 . . .I can only download php52 and the php52-extensions. I cannot find php53 in the ports tree. (see http://www.freebsd.org/ports/master-index.html) This should have nothing to do with the FreeBSD OS version.

I've deinstalled and remade (numerous times) both php52 and php52-extensions, but the problem persists. (See URL in following Second Question.)

Second Question: Are the messages suggesting that the debug level, i.e., options, need to be the same? If that is the case, then perhaps I can recompile one or the other to the same debug level, but what about the second scenario where the API dates are different? Yes, the debug levels were part of the problem; however, the out-of-sysc versions needed to be resolved; see this thread: http://forums.freebsd.org/showthread.php?t=25082 regarding php53 Port Status.

Third Question Otherwise, why does my updated ports tree not include php53? (See URL in preceding Second Question.)

In conclusion (for now), I know that there is a lot of lobbying (see http://forums.freebsd.org/showthread.php?t=15799)to use the ports upgrade allscenario, yet, the thought of trusting the process to cover all bases just leaves me uncomfortable. What about an upgrade/all that has no knowledge of a non-FreeBSD port application? (rhetorical question); never-the-less, perhaps I shall read up on the process.
 
Last edited:
. . .back again, four years later and similar problem yet again.
The current OS is FreeBSD 10.1-RELEASE-p10

The following are installed:
Code:
php56-5.6.10  PHP Scripting Language
/usr/local/lib/php/20131226
php56-mysql-5.6.10  The mysql shared extension for php
php56-pdo-5.6.10  The pdo shared extension for php
php56-pdo_mysql-5.6.10  The pdo_mysql shared extension for php

I have used pkg delete php56 to (I assume) completely remove the php56 port and followed with portmaster to reinstall the port and the associated php56-pdo_mysql-5.6.10. Apparently the extension modules are compiled with API=20131226 while the core of php56 is stuck at API=20060613.

From the httpd-error.log:

Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/pdo.so' - /usr/local/lib/php/20131226/pdo.so: Undefined symbol "zend_new_interned_string" in Unknown on line 0
PHP Warning:  PHP Startup: mysql: Unable to initialize module\nModule compiled with module API=20131226, debug=0, thread-safety=0\nPHP  compiled with module API=20060613, debug=0, thread-safety=0\n[B]These options need to match[/B]\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/pdo_mysql.so' - /usr/local/lib/php/20131226/pdo_mysql.so: Undefined symbol "mysqlnd_allocator" in Unknown on line 0

So, how do I recompile to bring the core php56 up to "date" with API=20131226. Is there an obscure MAKEFILE argument somewhere that will accomplish this?

Also, what's with the "undefined symbol" complaints???

How do I re-run make to prompt for the config arguments?
 
Please read /usr/ports/UPDATING:
Code:
20150220:
  AFFECTS: users of PHP

  The default PHP version has been updated from 5.4 to 5.6.

  If you use binary packages you should make a list of php packages
  before running 'pkg upgrade':

  # pkg info php5\* > ~/installed-php-ports-list

  After the upgrade, check with such list if all your php extensions
  are still installed, and reinstall them if needed.
 
Please read /usr/ports/UPDATING:
Code:
20150220:
  AFFECTS: users of PHP

  The default PHP version has been updated from 5.4 to 5.6.

  # pkg info php5\* > ~/installed-php-ports-list

. . .have already read /usr/ports/UPDATING. Perhaps there is confusion because I've reused a four year old similar post that I started. I have currently installed php5.6 but for some reason, the version as install seems to think that it was . . .
compiled with module API=20060613

This from pkg info:
Code:
php56-5.6.10  PHP Scripting Language
php56-bz2-5.6.10  The bz2 shared extension for php
php56-mysql-5.6.10  The mysql shared extension for php
php56-pdo-5.6.10  The pdo shared extension for php
php56-pdo_mysql-5.6.10  The pdo_mysql shared extension for php

. . .so, where does the API=20060613 come from?
 
Back
Top