Need Help With PHPMyAdmin!

Hi,

I'm following along with this tutorial for installing PHPMyAdmin:

http://www.adobe.com/devnet/dreamweaver/articles/settingup_php04.html

Per Step 8, when I go to

http://localhost/phpmyadmin/setup/index.php

I get this:

Bzip2
Bzip2 compression and decompression requires functions (bzopen, bzcompress) which are unavailable on this system.

ZIP
Zip decompression requires functions (zip_open) which are unavailable on this system.
Insecure connection

Force SSL connection
This option should be enabled if your web server supports it

Servers
There are no configured servers

Anyone have any idea what the heck I'm doing wrong?

Thank you.

MacBook Pro, Mac OS X (10.5.8)

Posted on Feb 7, 2010 12:51 PM

Reply
61 replies

Feb 8, 2010 12:22 PM in response to Charles Minow

Found this on the net. Does this look right?

II. To change the location where PHP looks for the socket file, follow these steps:

1. In terminal type:
*sudo cp /etc/php.ini.default /etc/php.ini*

2. Open /etc/php.ini in your preferred text editor.

3. Find the [MySQL] section, and change the mysql.default_socket directive:

*; Default socket name for local MySQL connects. If empty, uses the built-in*
*; MySQL defaults.*
*mysql.default_socket = /var/mysql/mysql.sock*

4. Change the permissions on /var/mysql so that www can read the socket, by executing this in Terminal:
*sudo chmod 775 /var/mysql*

Feb 8, 2010 12:44 PM in response to MJN1812

MJN1812 wrote:
Is there a special command to find the location of the MySQL socket?


If the MySQL daemon is running:

/usr/local/mysql/bin/mysql -e 'SHOW VARIABLES LIKE "%sock%"'


Gives me this on my laptop:

---------------+-----------------
| Variable_name | Value |
---------------+-----------------
| socket | /tmp/mysql.sock |
---------------+-----------------


charlie

Feb 8, 2010 1:41 PM in response to Charles Minow

Came across this in support:

Summary
Mac OS X Server 10.4.4 resolves two issues with the default interaction between the versions of PHP and MySQL that are pre-installed on Mac OS X Server:

PHP's MySQL client libraries are updated so that it recognizes the more secure authentication mechanism available in recent versions of MySQL. Therefore it's no longer necessary to start MySQL with the --old-passwords option or force MySQL passwords to the old format, though old format passwords will still be recognized.
*The default socket location for PHP and MySQL is now the same (/var/mysql/mysql.sock).* If you modified your MySQL configuration to revert to using /tmp/mysql.sock, the update process will detect that condition and create a symlink in /var/mysql so that the socket can be accessed by PHP. This is done to prevent disruption, and should be considered a temporary measure. At your earliest convenience, you should remove any socket directives from the [mysqld] and [client] sections of your MySQL config files, and allow MySQL to use its default socket location. Then you can restart MySQL; it will remove the symlink from /var/mysql, replace it with the socket, and PHP will continue to have access.
In addition, to remove a barrier to seamless interaction with the Apache web server:

The MySQL Manager application now creates the /var/mysql directory (which contains the MySQL socket) with permissions that allow the web server to access it.
If that directory already exists, the update process sets the correct permissions.

*Didn't know if it would apply to me, since it specifies 10.4.4, but thought I'd give it a try. Thing is, I can't shut down MySQL.*

Feb 8, 2010 5:38 PM in response to MJN1812

MJN1812 wrote:
When I did this terminal command:

*/usr/local/mysql/bin/mysql -e 'SHOW VARIABLES LIKE "%sock%"'*

I got this:

*ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)*


Are you sure the MySQL daemon is running? What you're seeing there would indicate to me that it't not running at all. I'm going to post instructions in another reply that should get you up and running.

charlie

Feb 8, 2010 5:50 PM in response to MJN1812

MJN1812 wrote:
When I search in that file, php.ini.default is not there.

Am I missing something here?


Yeah, I think you are getting the various uses of "default" confused.

There is no " php.ini.default" in that file. That's an actual file name. Quite a few of the Unix utilities that Apple ships with OS X (Apache, PHP, Postfix, etc.) have several configuration files included. In the case of Apache and Postfix, not only are there config files that are used by those programs, but there are also files included that you can go back to if you somehow mess up the one that it's using. Apache is one example.

On the other hand, it appears that PHP has some of its defaults compiled in when it's built. So it doesn't necessarily require a php.ini file to work. So Apple has place a default file in the /etc directory called " php.ini.default". So, it's that file that you copy and then edit so PHP will be set up right.

charlie

Feb 8, 2010 6:46 PM in response to MJN1812

MJN1812 wrote:
Came across this in support:

Summary
Mac OS X Server 10.4.4 resolves two issues with the default interaction between the versions of PHP and MySQL that are pre-installed on Mac OS X Server:


Just ignore this for now. Before you go any further, though, do this: open BBEdit and make sure the command line tools are installed. Look under the "BBEdit" menu item and choose "Install Command Line Tools..." from there. Having those installed will make editing some of the configuration files a lot easier.

These instructions should get you up and running:

1. First, determine if MySQL is actually running or not. Open the Terminal application and execute this command:

ps aux | grep mysqld | grep -v grep


If it's running, you should get a couple of lines of output starting with " _mysql". If it's not running then don't worry about stopping it. If it is running, then stop here and post the two lines you get, along with the results of this command:

sudo launchctl list | grep mysql


2. Assuming the daemon isn't running, let's use BBEdit to create a MySQL configuration file that makes sure the socket is where we want it. From Terminal, run this command:

bbedit -** /etc/my.cnf


Assuming you haven't already created a configuration file for MySQL, you should get a blank file. If the file isn't blank, copy and paste the contents in a reply.

Enter these lines into this file, save, and close it:

[mysqld]
socket=/tmp/mysql.sock
[client]
socket=/tmp/mysql.sock


The first line tells MySQL that the following lines are for the MySQL daemon. Then the socket line tells it where to put the socket file. The next section is the client section and just tells the MySQL command line client application to look in the same place for the socket file.

3. Now, let's create a launchd plist for MySQL. Back in Terminal, type this command:

bbedit -** /Library/LaunchDaemons/com.mysql.mysqld.plist


If you don't have an empty file, stop here and post the contents in a reply. If you do have an empty file, copy and paste this content into it, then save and close it"

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.mysql.mysqld</string>
<key>Program</key>
<string>/usr/local/mysql/bin/mysqld_safe</string>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>_mysql</string>
<key>WorkingDirectory</key>
<string>/usr/local/mysql</string>
</dict>
</plist>


4. Now, try to start MySQL. In Terminal, enter and run this command:

sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysqld.plist


Use the Console app from your Utilities folder to look at the system log. You should see a message that it's started up. If not, post any errors that come up in either the Terminal app or the system log. If MySQl starts up successfully, you should just get the Terminal prompt back, and there should be a line in your system log a little like this:

com.mysql.mysqld[73594]: Starting mysqld daemon with databases from ...


where "..." will be the full path to your MySQL installation.

Re-run the command from step 1 to verify that it started. This time you should get two lines.

5. Once you've gotten the daemon started, you should be able to connect to it:

/usr/local/mysql/bin/mysql


If you haven't set any passwords, it should just connect, throw up a little information then stop at a prompt. Something like this:

Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 110
Server version: 5.0.67 MySQL Community Server (GPL)
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql>


Just type " exit" and hit the enter key to leave for now. If You don't get that prompt, post any errors you get from the Terminal app.

6. Set up PHP. First, let's make a backup of the current php.ini file in case you've already edited it"

sudo cp /etc/php.ini /etc/php.ini.backup-20100108


Now get a fresh copy of the default php.ini file:

sudo /etc/php.ini.default /etc/php.ini


Now, let's edit it:

bbedit /etc/php.ini


First, search for mysql.default_socket. In my file, it's at line 761 (turn on line numbers in BBEdit). Change that line so it looks like this:

mysql.default_socket = /tmp/mysql.sock


Now search for mysqli.default_socket and change the line it's on (796 in my file) to:

mysqli.default_socket = /tmp/mysq.sock


Now, save and close this file. You should stop and restart Apache. Once you do that, PHP should be able to connect to MySQL.

To stop the MySQL daemon, just reverse the launchctl command from step 4:

sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist


Be patient, that takes 20 seconds or so...

charlie

Feb 8, 2010 6:49 PM in response to MJN1812

Correction, sort of.

I went into Open File via BBEdit, entered /etc and a list of files came up. However, when I tried to open php.ini.default, it comes up

*This operation couldn't be completed, because an error occurred. No suitable application could be found to open the indicated document. (MACOS error code: -10814).*

Feb 8, 2010 7:28 PM in response to Charles Minow

Did the sudo nano, control "o", then control "x", but I'm not sure if it's quit nano.

The top of the terminal window says Terminal - sudo - 80x24
Right below that is GNU nano 2.0.1 File: /etc/my.cn

Big blank space, then

File name to Write: /etc/my.cnf

Right below that is

^G Get Help ^T To Files M-M Mac Format M-P Prepend
^C Cancel M-D DOS Format M-A Append M-B Backup File


Does that look right?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Need Help With PHPMyAdmin!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.