ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
#44958 [Com]: Installer does not correctly configure MySQL support
by Sudakadam At Gmail Dot Com other posts by this author
May 14 2008 12:25AM messages near this date
#44958 [Asn->Bgs]: Installer does not correctly configure MySQL support | #44958 [Opn->Asn]: Installer does not correctly configure MySQL support
ID:               44958
 Comment by:       sudakadam at gmail dot com
 Reported By:      Zian dot Choy at gmail dot com
 Status:           Assigned
 Bug Type:         *General Issues
 Operating System: Windows XP SP3
 PHP Version:      5.2.6
 Assigned To:      jmertic
 New Comment:

Here is another test case.
1. Installed IIS first.
2. Installed MySql second.
3. used installer php-5.2.5-win32-installer.msi to install and chose to
configure IIS. (And selected extra and additional things too)
4. Tried all known options to enable mysql support (edit php.ini,
environment variables, php_mysql.dll etc)

Tested with simple phpMyAdmin installation. It shows clearly that PHP
is not configured with MySql support.


Previous Comments:
------------------------------------------------------------------------

[2008-05-10 22:57:46] jani@[...].net

Assigned to the installer maintainer.

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

[2008-05-10 05:04:15] Zian dot Choy at gmail dot com

Description:
------------
Viewing a PHP file that attempts to connect to MySQL results in a HTTP
500.

Reproduce code:
---------------
1. Install the latest version of Apache using the Windows installer
with Open SSL, using all defaults
2. Stop Apache
3. Install the latest version of PHP using the MSI.

In the configuration of the PHP install...
1. Pick "Apache 2.2"
2. Point the installer at Apache's conf directory
3. Under "Extensions," select MySQL and MySQLi

4. Start Apache
5. Start MySQL
6. Run the following code inside a file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html> 
<head> 
    <title> SQL Test</title>
</head> 
<body> 
    <?php
        $dbServer='localhost';
        // username and password
        $dbUser='[root username]';
        $dbPass='[password]';
        // name of database
        $dbName='test';  
        $link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or
die("Could not connect");
        print "Connected successfully<br> ";   
        mysql_select_db("$dbName") or die("Could not select
database");
        print "Database selected successfully<br> ";
        mysql_close($link);
    ?> 
</body> 
</html> 

Expected result:
----------------
I expected to see:
Connected successfully
Database selected successfully

Actual result:
--------------
The IE7 HTTP 500 error screen and the following entry in the Apache
error.log file:
[Fri May 09 22:03:08 2008] [error] [client 127.0.0.1] PHP Fatal error: 
Call to undefined function mysql_connect() in C:\\Program Files\\Apache
Software Foundation\\Apache2.2\\htdocs\\sql.php on line 14


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


-- 
Edit this bug report at http://bugs.php.net/?id=44958&edit=1
Thread:
Zian dot Choy at gmail dot com
Zian dot Choy at gmail dot com
jmertic
Sudakadam At Gmail Dot Com
jani

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved