PDA

View Full Version : MySQL does not work




Mag3llan
Nov 13, 2010, 08:01 PM
Hi! I just started learning php, and been using xampp for a little while now. It has worked very well untill now. I had some permission issues with a file so i thought, why not change the whole applications folder to read/write capability. But when i did that everything stopped working. I tried to fix it using the disk utility tool, but it still does not work. I can start apache and FTP but when I try to start mySQL i get this message: The operation couldn’t be completed. (XAMPPErrorDomain error 1.). I can't log in to phpmyadmin either. I also changed the whole xampp folder to read/write capability but still does not work. I think it must be a permissions problem but I can't figure out what to do...

The xampp error log says:

[Thu Nov 11 23:40:11 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Nov 11 23:40:13 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Nov 11 23:40:13 2010] [notice] Digest: done
[Thu Nov 11 23:40:15 2010] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Thu Nov 11 23:43:46 2010] [notice] caught SIGTERM, shutting down
[Thu Nov 11 23:43:53 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Nov 11 23:43:54 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Nov 11 23:43:54 2010] [notice] Digest: done
[Thu Nov 11 23:43:54 2010] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations

I hope someone here has a solution so I can continue to learn PHP!

Thank you!// Magellan



angelwatt
Nov 13, 2010, 08:39 PM
Even though it may have come from an error log, those aren't errors. There 1 warning and a few normal notices. Not sure about the XAMPPErrorDomain error though. I use MAMP for my local development.

Others with same problem
http://superuser.com/questions/80389/xampperrordomain-error-1-for-changing-mysql-data-dirs
http://www.apachefriends.org/f/viewtopic.php?p=153428&sid=9117f687ca2ab5b0242b783f1dd4afc6

Mag3llan
Nov 14, 2010, 06:06 AM
When I try to access my site I get this error:

Warning: session_start() [function.session-start]: open(/Applications/XAMPP/xamppfiles/temp//sess_463648763e2efe61375f04ab0c255f00, O_RDWR) failed: Permission denied (13) in /Applications/XAMPP/xamppfiles/htdocs/oslo/login.php on line 3

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/oslo/login.php:3) in /Applications/XAMPP/xamppfiles/htdocs/oslo/login.php on line 3

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /Applications/XAMPP/xamppfiles/htdocs/oslo/login.php:3) in /Applications/XAMPP/xamppfiles/htdocs/oslo/login.php on line 3

I am not very familiar with mac since I just started using it.

Hope this helps...

angelwatt
Nov 14, 2010, 08:29 AM
The first error is about permissions. You'll need to make sure the XAMPP folder has permissions that let you and the web server have read, write, and execute permissions. You can probably change this by selecting the XAMPP folder from Finder and do a Get Info, then set the permissions at the bottom. Make sure System and your account have read/write.

The other two errors are related to PHP code. The code appears to be attempting to adjust a header after some output has been sent to the browser. Read the manual for header (http://php.net/manual/en/function.header.php) to see how to resolve the issue with your code.

knightlie
Nov 15, 2010, 08:47 AM
The second and third errors are being triggered by the first, as angelwatt says check the file permissions, or switch to MAMP which works fine on my system.

Also, are you using an Administrator account? If not, that may be why you can't write to the Applications directory.

danwilliams
Nov 15, 2010, 11:41 AM
Another vote for MAMP. It works fine on my system as well. I hope this helps.

Mag3llan
Nov 16, 2010, 03:33 PM
I am administrator and I have read/write permission on all files in the xampp folder. so that is not it... but thanks anyway! I think i will try MAMP...

cubist
Nov 16, 2010, 09:20 PM
... I don't know what any of this stuff is all about, but it's certainly not about MySQL, which works fine.

danwilliams
Nov 17, 2010, 07:04 AM
I used the following book to help me with installing and configuring LAMP: http://www.amazon.com/Web-Database-Applications-PHP-MySQL/dp/0596005431/ref=sr_1_5?ie=UTF8&qid=1289997556&sr=8-5

I was a total newbie to LAMP before I built my first personal web database application. I learned PHP syntax and how it interacts with MySQL, etc.. This book helped a lot.

When I got a new Mac Mini, I then ported over my web app to MAMP. I followed the installation and configuration directions from the MAMP site. Once I got the entire MAMP stack configured, the database imported, and the PHP code placed in the correct directories, everything worked.

Good Luck!