Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 13, 2010, 08:01 PM   #1
Mag3llan
macrumors newbie
 
Join Date: Nov 2010
MySQL does not work

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
Mag3llan is offline   0 Reply With Quote
Old Nov 13, 2010, 08:39 PM   #2
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: USA
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...ysql-data-dirs
http://www.apachefriends.org/f/viewt...2b783f1dd4afc6
angelwatt is offline   0 Reply With Quote
Old Nov 14, 2010, 06:06 AM   #3
Mag3llan
Thread Starter
macrumors newbie
 
Join Date: Nov 2010
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...
Mag3llan is offline   0 Reply With Quote
Old Nov 14, 2010, 08:29 AM   #4
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: USA
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 to see how to resolve the issue with your code.
angelwatt is offline   0 Reply With Quote
Old Nov 15, 2010, 08:47 AM   #5
knightlie
macrumors 6502a
 
Join Date: Feb 2008
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.
knightlie is offline   0 Reply With Quote
Old Nov 15, 2010, 11:41 AM   #6
danwilliams
macrumors member
 
Join Date: Sep 2008
Another vote for MAMP. It works fine on my system as well. I hope this helps.
danwilliams is offline   0 Reply With Quote
Old Nov 16, 2010, 03:33 PM   #7
Mag3llan
Thread Starter
macrumors newbie
 
Join Date: Nov 2010
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...
Mag3llan is offline   0 Reply With Quote
Old Nov 16, 2010, 09:20 PM   #8
cubist
macrumors 68020
 
Join Date: Jul 2002
Location: Muncie, Indiana
Send a message via AIM to cubist
thread title is wrong...

... I don't know what any of this stuff is all about, but it's certainly not about MySQL, which works fine.
cubist is offline   0 Reply With Quote
Old Nov 17, 2010, 07:04 AM   #9
danwilliams
macrumors member
 
Join Date: Sep 2008
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!
danwilliams is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
php mysql = NSString IDMah iPhone/iPad Programming 9 Dec 20, 2013 01:35 PM
PHP, MySQL help please please please Stocktrader Web Design and Development 7 Jun 5, 2013 01:29 PM
MySQL saberahul Mac Programming 1 Mar 17, 2013 11:47 PM
MySQL question Tholian Mac OS X Server, Xserve, and Networking 1 Nov 13, 2012 07:03 PM
Run MySQL on terminal dwolny Mac Programming 1 Nov 2, 2012 01:25 PM

Forum Jump

All times are GMT -5. The time now is 05:13 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC