Edit report at http://bugs.php.net/bug.php?id=51342&edit=1

 ID:               51342
 User updated by:  jon dot halling at bilnavet dot com
 Reported by:      jon dot halling at bilnavet dot com
 Summary:          Access Violation with MySQL comand
 Status:           Bogus
 Type:             Bug
 Package:          Reproducible crash
 Operating System: Win XP SP3
 PHP Version:      5.2.13

 New Comment:

Got it working, thank you! Having /ext added to PATH was a mistake by
me!



Some thoughts of mine though:

- If the order of PATH entries for PHP and MySQL is important that could
be better documented. The documentation
(http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath)
clearly states that the information shall be added to the end (placing
it after MySQL entries if it already exists).

- The default extension dir in php.ini could be changed to

extension_dir = "./ext"

Since this corresponds with the file structure in the .zip installation
file. This will make it work on first try rather then having to change
it manually.



Thanks again for the support!


Previous Comments:
------------------------------------------------------------------------
[2010-03-21 15:23:40] paj...@php.net

'C:\Program\MySQL\Server\bin;C:\Program\PHP\ext' is totally wrong.



You have to put C:\Program\PHP\ in your PATH, not the extension_dir.
Then it is exactly what you should not do, having mysql dir first in
your PATH.



Do:

'C:\Program\PHP\;C:\Program\MySQL\Server\bin;'...

------------------------------------------------------------------------
[2010-03-21 15:18:50] jon dot halling at bilnavet dot com

I already have added the dir to PATH according to instructions on
http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath
(linked from http://php.net/manual/en/mysql.installation.php)



This is what my PATH looks like:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program\QuickTime\QTSystem\;C:\Program\MySQL\Server\bin;C:\Program\PHP\ext;C:\Program\Delade
filer\DivX Shared\;C:\Program\Delade filer\Acronis\SnapAPI\



The file php_mysql.dll in folder ext has version 5.2.13.13 (all files
are from the installation package, I have not changed anything).



Is there anything more I have to do? What have I missed? Please explain.

------------------------------------------------------------------------
[2010-03-21 13:59:53] paj...@php.net

Don't use libmysql from MySQL installation but the one we provide. See
the countless reports here to find how to fix it (PATH).

------------------------------------------------------------------------
[2010-03-21 12:30:59] jon dot halling at bilnavet dot com

Description:
------------
I get the error message "PHP has encountered an Access Violation at
[some address]" when I execute mysql_connect() in a php-file accessed by
web browsers. Same result even if the MySQL-server is shut down.



Running Win XP SP3 and all the latest patches, and running Windows built
in IIS webserver, has tested multiple browsers. The php.ini is standard
except for extension php_mysql.dll activated. PHP installation dir is
C:\Program\PHP\ and file is located in
C:\Inetpub\wwwroot\work\db_test.php (http://localhost/work/db_test.php).
Have checked that all files and folders have write access.



The same file accessed from command prompt is not experiencing any
problems, so I have problem generating backtrace according to your
instructions. Please instruct how I can gather more information if
necessary.

Test script:
---------------
echo "BOO ";

$open = mysql_connect($host, $user, $pwd);

echo "FOO";

Expected result:
----------------
BOO FOO

Actual result:
--------------
BOO PHP has encountered an Access Violation at 0183AC6A


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51342&edit=1

Reply via email to