Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375745 - PHP segfaults when mysqli.connect_charset is set
Summary: PHP segfaults when mysqli.connect_charset is set
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-20 09:48 UTC by Dries Harnie
Modified: 2011-09-07 11:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dries Harnie 2011-07-20 09:48:26 UTC
Given the following test script:

<?php $mysqli = new mysqli("localhost", "test", "test", "test"); ?>

and the following settings in /etc/php/apache2-php5.3/php.ini:

mysqli.connect_charset = latin1

Accessing the test script using apache with mod_php enabled with crash the apache child.

It is caused by lines 134--136 accessing mysql->mysql even though this value is a nullpointer being allocated at line 102.

I can provide a GDB backtrace if necessary.
Comment 1 Ole Markus With (RETIRED) gentoo-dev 2011-07-21 07:51:51 UTC
(In reply to comment #0)
> Given the following test script:
> 
> <?php $mysqli = new mysqli("localhost", "test", "test", "test"); ?>
> 
> and the following settings in /etc/php/apache2-php5.3/php.ini:
> 
> mysqli.connect_charset = latin1
> 
> Accessing the test script using apache with mod_php enabled with crash the
> apache child.
> 
> It is caused by lines 134--136 accessing mysql->mysql even though this value is
> a nullpointer being allocated at line 102.
> 
> I can provide a GDB backtrace if necessary.

Just need to confirm one thing. You are using the connect_charset ini setting that is added through the Gentoo patchset?
Comment 2 Dries Harnie 2011-07-21 10:08:02 UTC
(In reply to comment #1)
> Just need to confirm one thing. You are using the connect_charset ini setting
> that is added through the Gentoo patchset?

Yes.
Comment 3 Ole Markus With (RETIRED) gentoo-dev 2011-07-21 10:38:42 UTC
The solution to this one is quite easy. Do not use it. Those patches have already been removed for the 5.4 patchset and as they apparantly cause segfaults, I will most likely remove the patches from the 5.3 patchset as well.
Comment 4 Dries Harnie 2011-07-25 11:56:06 UTC
Okay, thanks for the reply.
Can you close this bug when you remove the patches from the repo? That way I know when to update my php installation again.
Comment 5 Ole Markus With (RETIRED) gentoo-dev 2011-07-25 12:00:29 UTC
Sure. The patches has been removed from 5.4 alpha2 and 5.3.7_rc3. Unless something unexpected happens, stable version of the latter will be released on the same day as upstream.
Comment 6 Ole Markus With (RETIRED) gentoo-dev 2011-09-07 11:21:56 UTC
Patch has been  removed from latest stable ebuild