Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: php5ts.dll killing Apache after trying to connect to MySQL |
|
Author |
|
Snakum
Joined: 04 Feb 2010 Posts: 4
|
Posted: Sun 14 Feb '10 18:57 Post subject: php5ts.dll killing Apache after trying to connect to MySQL |
|
|
I am using Windows XP and the MSI installers for all three packages (Apache, Php, MySQL) and I have gone thru this exercise seven times in two days and am going insane. I have searched the net and tried a thousand things and I'm smoked. Here's what's happening:
I install and configure Apache as localhost and to listen on 8080, I test the server, runs like a champ. I can start and stop the server all day. Works great.
Then I install and configure Php. I set it up on C:/Php via the MSI installer, add any necessary lines to Htdoc.conf and php.ini that the installer missed ... test Php and it works perfectly. I even did a small Hello World type app to run and check it.
Then I install MySQL. It installs perfectly and i can start and stop the server, and from the comand line interface I can create, populate, and retrieve data just fine.
Now ... when I follow the instructions (five different sets of instructions from five different sites) for making MySQL work with Php, I can never get the test file I made (a simple database quesry inside a php file) to run. the broswer just cranks and cranks and never resolves.
Then, I stop and restart Apache, or it is stopped and restarted via a PC reboot, and Apache will no longer start. The error suddenly appearing is:
"Faulting application httpd.exe, version 2.2.14.0, faulting module php5ts.dll, version 5.2.12.12, fault address 0x000f34bc."
The instructions I am following for making MySQL run with Php are:
---------------------------
Configuring PHP to work with MySQL:
Now that both PHP and MySQL are installed, we have to configure them to work together.
1. Open up your php.ini file (C:/WINDOWS/php.ini) and find the line:
;extension=php_mysql.dll
To enable the MySQL extension, delete the semi-colon at the beginning of that line.
2. Next we must add the PHP directory to the Windows PATH. To do this, click: Start > My Computer > Properties > Advanced > Environment Variables. Under the second list (System Variables), there will be a variable called "Path". Select it and click "Edit". Add ";C:\php" to the very end of the string and click "OK".
3. Restart your computer for the changes to take effect.
4. Create a new file in your "htdocs" directory called "mysql_test.php".
5. Copy the following code into "mysql_test.php" and click save. (Make sure to replace the MYSQL_PASS constant with the MySQL Password you specified during the MySQL installation).
<?php
# Define MySQL Settings
define("MYSQL_HOST", "localhost");
define("MYSQL_USER", "root");
define("MYSQL_PASS", "password");
define("MYSQL_DB", "test");
$conn = mysql_connect("".MYSQL_HOST."", "".MYSQL_USER."", "".MYSQL_PASS."") or die(mysql_error());
mysql_select_db("".MYSQL_DB."",$conn) or die(mysql_error());
$sql = "SELECT * FROM test";
$res = mysql_query($sql);
while ($field = mysql_fetch_array($res))
{
$id = $field['id'];
$name = $field['name'];
echo 'ID: ' . $field['id'] . '<br />';
echo 'Name: ' . $field['name'] . '<br /><br />';
}
?>
6. Open up Internet Explorer and type in "http://localhost/mysql_test.php";. If the "mysql_test.php" page returns something similiar to:
ID: 1
Name: John
-----------------------------------------------
At this point the URL never resolves and doesn't work, and Apache also now no longer starts up. Any ideas? I'm going nuts here.
Thanks all! |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7298 Location: Germany, Next to Hamburg
|
|
Back to top |
|
motzi
Joined: 26 Feb 2010 Posts: 1
|
Posted: Fri 26 Feb '10 1:04 Post subject: |
|
|
Hello, i just installed apache_2.2.14-win32-x86-openssl-0.9.8k + php-5.2.12-win32-installer, and i have same error when starting apache with LoadModule php5_module "C:/PHP/php5apache2_2.dll" .
Event manager of windows:
Error: Apache service:
Code: | Faulting application httpd.exe, version 2.2.14.0, faulting module php5ts.dll, version 5.2.12.12, fault address 0x000f34bc. |
Drwatson:
Code: | The application, C:\Program Files\Apache2.2\bin\httpd.exe, generated an application error The error occurred on 02/25/2010 @ 22:48:17.953 The exception generated was c0000005 at address 008734BC (php5ts!php_com_wrapper_export) |
|
|
Back to top |
|
|
|
|
|
|