23

I am having issues with phpMyAdmin on my Mac. I cannot seem to connect to the local MySQL server. When I try to log in I get the following message

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

I am now trying to find the log file. I ran phpinfo() and it tells me that the php.ini file is located in /etc, however when I look I only can see php.ini.default. I proceed to edit php.ini.default by specifying the log file to /tmp/php_errors and enable logging.

I tried to log into the MySQL server via phpMyAdmin and I still get the same error. I proceed to /tmp but the error log is not there.

Any suggestions on what I may be doing wrong?

Wuffers
  • 19,020
  • 17
  • 95
  • 126
David
  • 2,257
  • 8
  • 25
  • 26

2 Answers2

28

Apache's logs are located under /var/log/apache2

Rafael Barbosa
  • 389
  • 2
  • 2
10

Try renaming php.ini.default to php.ini and edit it to enable the logging you want.

The changes probably won't take effect until Apache is restarted. Since you are using a Mac, just disable web sharing and re-enable it.

Bandit
  • 810
  • 5
  • 7
  • credit goes to Bandit. My phpinfo() showed that "log_errors" was "Off", even though it was set to "on" in my 'php.ini.default'. After I changed the name of that file to 'php.ini' and did a restart of apache, my error log was indeed showing errors correctly, and my phpinfo() showed "log_errors" was "On". – dogatonic Sep 18 '20 at 21:07