Link to home
Start Free TrialLog in
Avatar of Mark Brady
Mark BradyFlag for United States of America

asked on

MYSQL access problem with phpmyadmin

I have searched everywhere and can not resolved this issue. I have a 64 bit macbook pro laptop.

I have installed the latest MYSQL for 64 bit mac
I have the latest version of PHP installed and working perfectly with php files.

When i try go to localhost/phpmyadmin I am faced with the login screen so that is all good.

On the login screen it gives me an warning :Cannot load the mcrypt extention although I have followed the instructions to in it which told me I needed to install not mycrypt but libmcrypt-2.5.8 which I have done

I have Xcode 3.2 tools installed and Netbeans.

My problem is when I enter the user 'root' and my password I have set, I either get the error #2002 Cannot log in to the MySQL server if using Safari, or if using Google Chrome I get to a page that tells me

"Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly"


I have set the path for the session files as /Users/elvin66/Sites/tmp

It was by default trying to write session files to /etc/tmp which is not writable. So I changed the path.

Everything I try I get errors and I am at the point of wanting to completely remove all applications to do with a web server and start over, or just go back to using my linux ubuntu server which works fine.

Can someone please guide me to getting this running properly. Many thanks in advance.
Avatar of mchkorg
mchkorg
Flag of France image

Hi,
Just two things I can see from here:

1) mcrypt : you have to install the PHP mcrypt extension, not the mcrypt library. Something like php5-mcrypt, not libmcryptxxx
I don't know if php-mcrypt is required or not. But on a fresh debian server I just installed with phpmyadmin, it installed php5-mcrypt because of dependencies :)

2) your session directory: of course the one you choosed is writeable by everyone

It will maybe solve your warning, not your problem.

For the problem, did you check the php log? send us some parts. Thanks. (same with the webserver's logs)

regards
Avatar of Mark Brady

ASKER

ok I will try locate the logs and post them.....
On a Mac, I don't know.
But you'll find it in your php.ini
There's an error_log variable inside :)

Usually on a linux server, everything is in /var/log
But again, I don't have a Mac here to check, sorry
No problems I have a linux system as well but the mac is different. Here is the last few lines from my
apache access log but they don't show much. The apache error log shows even less (just a bunch of errors about a php file with an undefined variable) but that is not the problem. Still trying to find the php error logs.....


127.0.0.1 - - [26/Aug/2010:01:26:52 +1200] "GET /phpmyadmin/themes/original/img/logo_right.png HTTP/1.1" 304 -
127.0.0.1 - - [26/Aug/2010:01:26:52 +1200] "GET /phpmyadmin/themes/original/img/b_help.png HTTP/1.1" 304 -
127.0.0.1 - - [26/Aug/2010:01:26:52 +1200] "GET /phpmyadmin/phpmyadmin.css.php?token=22d06891f18e0ba98ab5f2f2e574ec05&js_frame=right&nocache=3847305171 HTTP/1.1" 200 21786
127.0.0.1 - - [26/Aug/2010:01:26:52 +1200] "GET /phpmyadmin/themes/original/img/s_warn.png HTTP/1.1" 304 -
127.0.0.1 - - [26/Aug/2010:01:26:52 +1200] "GET /phpmyadmin/themes/original/img/s_error.png HTTP/1.1" 304 -
Or, you locate your php.ini and force it to be somewhere you control

Or open the "terminal" and try something like :
find / -name "php" | grep error
No matter if it's named php_blah_log or log_blah_php
Ok I managed to find the .err file for mysql in /usr/local/mysql/data/ and here is some of what is says:


100826 10:45:38 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
100826 10:45:38 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
100826 10:45:38 [Note] Plugin 'FEDERATED' is disabled.
100826 10:45:38  InnoDB: Started; log sequence number 0 44233
100826 10:45:38 [Note] Event Scheduler: Loaded 0 events
100826 10:45:38 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.50'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server (GPL)
100826 10:46:18 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

100826 10:46:18 [Note] Event Scheduler: Purging the queue. 0 events
100826 10:46:18  InnoDB: Starting shutdown...
100826 10:46:19  InnoDB: Shutdown completed; log sequence number 0 44233
100826 10:46:19 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

100826 10:46:19 mysqld_safe mysqld from pid file /usr/local/mysql/data/Mark-Bradys-MacBook-Pro.local.pid ended
100826 10:47:20 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
100826 10:47:20 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
100826 10:47:20 [Note] Plugin 'FEDERATED' is disabled.
100826 10:47:21  InnoDB: Started; log sequence number 0 44233
100826 10:47:21 [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--autoclose'
100826 10:47:21 [ERROR] Aborting

100826 10:47:21  InnoDB: Starting shutdown...
100826 10:47:26  InnoDB: Shutdown completed; log sequence number 0 44233
100826 10:47:26 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

100826 10:47:26 mysqld_safe mysqld from pid file /usr/local/mysql/data/Mark-Bradys-MacBook-Pro.local.pid ended
100826 10:48:25 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
100826 10:48:25 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
100826 10:48:25 [Note] Plugin 'FEDERATED' is disabled.
100826 10:48:25  InnoDB: Started; log sequence number 0 44233
100826 10:48:25 [Note] Event Scheduler: Loaded 0 events
100826 10:48:25 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.50'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server (GPL)


That doesn't make much sense to me but here are some other things I tried.

I turned on all errors and warning in php.ini
I set the correct path to the mcrypt files. This is pasted from my php.ini file

[mcrypt]
; For more information about mcrypt settings see http://php.net/mcrypt-module-open

; Directory where to load mcrypt algorithms
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
mcrypt.algorithms_dir= /usr/local/lib/libmcrypt

; Directory where to load mcrypt modes
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
mcrypt.modes_dir= /usr/local/lib/libmcrypt

Although there aren't any files in that folder, just a folder. I even tried it without the 'libmcrypt' on the end as that is where a bunch of files are for mcrypt but still get that warning on the phpmyadmin login page.

Cannot load mcrypt extension. Please check your PHP configuration.
I have attached the apache2 error and access logs so you can see what they say. Thanks so much for your patience (mine has run out almost) I also attached my php.ini file
access-log
error-log
php.ini
One thing I also noticed is that web sharing was turned on in my system preferences although
I have been told it is unsafe to have it turned on. When I turn it off, localhost does not work at all. I know in some applications possibly Xamp web sharing is required to be turned off. I'm confused.

Would it be better to try and uninstall or dump everything and go for a package to install all 3 applications? I tried Mamp but did not like it and couldn't access my databases even after setting permissions in the folders. I tried Xamp and that wasn't working either. Surely there must be a simple method of getting a damn web server running on a mac so I can do my work! I don't want it as a public server, just local development.
Ok, would you post this one? error_log = /Users/elvin66/Sites/php_errors.log

Your apache error log doesn't tell much things. You have a timezone misconfiguration (I guess we don't care here) and something wrong in a script you must be writing (mark/index.php)

(It won't be a public server unless it's reachable from the outside. I doubt that, your mac must be on a LAN. It might be reachable from within your LAN.)
I'm assuming you meant for me to put that line in my php.ini and see what it records ? Ok I'll do that now.
ASKER CERTIFIED SOLUTION
Avatar of Mark Brady
Mark Brady
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial