Leopard Install... Can connect but not through PHP.
I installed the package Mysql 5.045 on leopard os 10.5.
Heres what I did so far:
Copied file /private/etc/php.ini.default to create file /private/etc/php.ini
Edited all instances of the following in /private/etc/php.ini:
mysql.default_socket =
--to--
mysql.default_socket = /private/tmp/mysql.sock
--and--
mysqli.default_socket =
--to--
mysqli.default_socket = /private/tmp/mysql.sock
I started mysql. I can connect to the database using the terminal or say the mysql admin or query browser. All beginning databases are there.
When I try to connect to it using a php page (is enabled), it does not work. The following is the code I tried to access one of my databases I recovered.
<?php
@ $db = new mysqli('localhost', 'keil', 'password', 'keilmiller');
if (mysqli_connect_errno()) {
echo '<p>Error: Could not connect to database.</p>';
exit;
}
else {
echo '<p>Connected to database</p>';
}
?>
Any help would be appreciated. I would hate to have to revert back to tiger for my job.
Macbook running the stock Apache and PHP build, and kinda running mysql 5.045.
Subject
Written By
Posted
Leopard Install... Can connect but not through PHP.
November 08, 2007 08:35PM
November 09, 2007 01:20PM
November 09, 2007 04:05PM
November 09, 2007 10:25PM
November 09, 2007 11:37PM
November 11, 2007 01:49AM
November 11, 2007 03:22PM
November 12, 2007 06:54PM
November 14, 2007 11:09PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.