|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-06 13:25 UTC] kalle@php.net
[2009-02-06 13:46 UTC] pajoye@php.net
[2009-02-06 22:44 UTC] darren at misterdoom dot com
[2009-02-10 10:44 UTC] tony2001@php.net
[2009-02-10 18:40 UTC] pajoye@php.net
[2009-02-11 09:20 UTC] darren at misterdoom dot com
[2009-02-11 09:26 UTC] pajoye@php.net
[2009-02-11 10:28 UTC] darren at misterdoom dot com
[2009-02-11 10:37 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 03:00:02 2025 UTC |
Description: ------------ I have a really strange problem. I've recently re-installed my computer and set up IIS7, PHP and MySQL so that I could carry on working on my website. I did a quick test with phpinfo(); and everything seemed to be working fine. Then set up 2 blank documents and started working on opening a connection to a database, which is when all the trouble started. On viewing the page, I would get the following message "PHP has encountered an Access Violation at 01FCAC5A" and windows would also produce an error message stating that IIS had been stopped. If I comment out the mysql_connect line it worked fine. I read some things about a possible problem with the php5isapi.dll, so I installed Apache 2.2.1.1 web server, set up PHP, but got exactly the same result. Reproduce code: --------------- file 1 (index.php) <?php require("farq.php"); ?> <html> <head> <title>Site Administration</title> <?php // If cookie, redirect ?> </head> <body> <!-- If no cookie, show form. --> <form action="index.php" method="post"> <input name="username" maxlength="255"> <input name="password" maxlength="255"> <input type="submit"> </form> </body> </html> File 2 (farq.php) <?php $conn = mysql_connect('localhost', 'dbuser', 'dbpass') or die ('Error connecting to mysql'); echo "conncected"; mysql_select_db("dbname", $conn) or die ("Could not select to main database"); ?> Expected result: ---------------- I would expect to see connected followed by a form. Actual result: -------------- in the browser: Internet Explorer cannot display the webpage Windows also pops up the alert box: Apache HTTP Server stopped working and was closed If I comment out the line "$conn = mysql_connect('localhost', 'dbuser', 'dbpass') or die ('Error connecting to mysql');" The page displays correctly.