Bug 109917

Summary: php5-mysqli not functional with php5-5.2.1_3
Product: Ports & Packages Reporter: neil
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description neil 2007-03-05 12:20:04 UTC
Following an update to phpMyAdmin-2.10.0.1_1, I noticed an error to
the effect that phpMyAdmin could not load the mysqli extension. Performing a phpinfo
showed no information relating to the mysqli extension.

How-To-Repeat: Install mysql-*-5.0.33 and php-5-5.2.1_3 with mysqli enabled.
Comment 1 Rong-En Fan freebsd_committer freebsd_triage 2007-03-05 15:03:43 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to our php maintainer.
Comment 2 John Fox Maule 2007-03-07 15:06:39 UTC
I had the same problem several times before cause php5-mysqli was =
segfaulting after portupgrade to latest php5 even though i did upgrade =
MySQL first.=20

Solution after portupgrade finishes to build all installed php5 modules
cd /usr/ports/databases/php5-mysqli && make deinstall clean && make =
install clean=20
Restart apache if php5 is loaded as a module.
=20
Best regards,
John Fox Maule
=20
Comment 3 neil 2007-03-07 21:02:51 UTC
John Fox Maule wrote:
> Solution after portupgrade finishes to build all installed php5 modules
> cd /usr/ports/databases/php5-mysqli && make deinstall clean && make install clean 
> Restart apache if php5 is loaded as a module.

I don't think that is the problem in this case. php5 and all modules
were rebuilt before this arose and I routinely restart apache after any
php5 or module update.

Regards,
Neil Darlow
Comment 4 neil 2007-03-07 22:57:59 UTC
John Fox Maule wrote:
> You could try the following to give you a clue whats go wrong
>  
> fox# mount -t procfs proc /proc (if not already mounted)
> 
> create a file test.php in your homedir like this
> 
> <?php
> 
>         $mysqli = new mysqli('localhost', 'yourusername', 'yourpassword', 'mysql');
>         $mysqli->close();
> ?>
> 
> fox#script /tmp/problem.log
> fox#truss /usr/local/bin/php test.php
> fox#exit
> 
> Look in /tmp/problem.log

I have errors logged to file for php so the error was actually present
in the log.

[07-Mar-2007 22:49:51] 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
"spl_ce_RuntimeException" in Unknown on line 0
[07-Mar-2007 22:49:52] PHP Fatal error:  Class 'mysqli' not found in
/home/users/neil/test.php on line 2

Of course, mysqli.so does exist in the referenced location.

Regards,
Neil Darlow
Comment 5 Alex Dupre freebsd_committer freebsd_triage 2007-03-08 07:18:41 UTC
State Changed
From-To: open->closed

Move mysqli.so after spl.so in extensions.ini. 
Fixed for next update.
Comment 6 neil 2007-03-08 09:54:16 UTC
Thanks Alex.

I discovered this myself just before you posted.