php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8616 mysql.default_socket not initialized properly -> crash with access violation
Submitted: 2001-01-09 10:14 UTC Modified: 2001-06-02 21:45 UTC
From: marc at guidance dot nl Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.4 OS: WinNT4
Private report: No CVE-ID: None
 [2001-01-09 10:14 UTC] marc at guidance dot nl
After an unmodified (debug) build (using VC6.0) of PHP4.04 and running the following script 

<?php
$link = mysql_connect ("localhost", "username", "pw");
?>

PHP crashes with an access violation. I tracked this down to an uninitialized mysql.default_socket pointer.

I can solve this problem by setting the STD_PHP_INI_ENTRY (in php_mysql.c) from OnUpdateStringUnempty to OnUpdateString (see below), even though I think this setting was not put there by accident... so I don't know if there are any side-effects (esp for *nix builds)

PHP_INI_BEGIN()
    [...]
    STD_PHP_INI_ENTRY("mysql.default_socket", NULL, PHP_INI_ALL, OnUpdateString, default_socket, zend_mysql_globals, mysql_globals)
PHP_INI_END()

Cheerio, Marc.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-02 21:45 UTC] sniper@php.net
This should be fixed with PHP 4.0.6, please try the 
latest release candidate:

http://www.php.net/~andi/php-4.0.6RC2.tar.gz

-Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 02:01:32 2024 UTC