MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 6th, 2003, 06:28 AM
Nynaeve Nynaeve is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 3 Nynaeve User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP doesnīt show errors / MySQL User and Host not set

Hi there,

Iīm just getting started with Macs and actually Iīm a bit desperate trying to get PHP and MySQL working. Iīve already done this on a PC many times without any problems. But on a Mac???

I installed PHP and MySQL like entropy.ch says.

First problem:
Even though I have put ALL error-reporting functions ON in the php.ini, I donīt get any error reports at all. The only thing I get when running a php-file is blank pages, thatīs so annoying. PHP seems to be working alright, at least I have no problem running phpinfo.

Second problem:
When I run phpinfo I get the information (in the mysql section) that MySQL didnīt set any user nor host. But I need these to connect to a db. When you install MySQL on a PC these things (User, Host) are set automatically.

I have really tried hard: installed everything again twice, done all the installation-manuals available on the web...

If it is any help to you: I have checked with NetInfoManager that there is an mysql user. I donīt know ANY Unix, but Iīm following the installation guides. I understood that Iīm supposed to change the password for the mysql user. If I try, I get this:

[MIS-Computer:/usr/local/mysql] inti% sudo chown -R mysql:mysql data
[MIS-Computer:/usr/local/mysql] inti% sudo ./bin/safe_mysqld --user-mysql &
[1] 613
[MIS-Computer:/usr/local/mysql] inti% Starting mysqld daemon with databases from /usr/local/mysql/data
030806 11:52:29 mysqld ended

/usr/local/mysql/bin/mysqladmin -u root password XXXX
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
[1] + Done sudo ./bin/safe_mysqld --user-mysql
[Maria-Inti-Metzendorfs-Computer:/usr/local/mysql] inti%

Hope anybody has any hints for me!

Reply With Quote
  #2  
Old August 6th, 2003, 06:41 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Check out mysql.com for complete info on how to set up privileges. Out of the box, I believe mysql can usually be accessed as root with no password. Of course you'll want to set up a web user with a password and limited permissions. Info on how to do all of this is available at mysql.com.

If phpinfo runs fine but you're getting blank pages on other code, I'm guessing it's a code issue. We'd have to know what these blank pages are supposed to do in order to provide any meaningful feedback.

Reply With Quote
  #3  
Old August 6th, 2003, 06:53 AM
Nynaeve Nynaeve is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 3 Nynaeve User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you for replying.

I really donīt think itīs a code issue, because all I want are the error reportings. If I write something like this on a PC

<?
echo "Hallo!"
?>

I would normaly get something like
"; missing in your syntax"

But here I get nothing. Just blank pages. As soon as something in the code is wrong, he gulps down everything. This way I canīt figure out if Iīve got a PHP or a MySQL problem, because alle error reportings are omitted (even though I changed php.ini to ON!)

Reply With Quote
  #4  
Old August 7th, 2003, 02:10 AM
Nynaeve Nynaeve is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 3 Nynaeve User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I solved the PHP problem by installing it all over again... Unfortunately this didnīt work with MySQL. I keep getting this error:

[127:/usr/local/mysql] inti% sudo echo

[127:/usr/local/mysql] inti% sudo ./bin/mysqld_safe &
[1] 1311
[127:/usr/local/mysql] inti% Starting mysqld daemon with databases from /usr/local/mysql/data
030806 17:26:27 mysqld ended

/usr/local/mysql/bin/mysql test
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[1] + Done sudo ./bin/mysqld_safe
[127:/usr/local/mysql] inti%

What am I to do now?

(Iīve already used the CLEANUP Script from entropy.ch and started all over again...)

Reply With Quote
  #5  
Old September 1st, 2003, 06:11 AM
Chino Chino is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 4 Chino User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm getting the exact same problem with mac os 10.2.5

try to start mysql, gives this response:

Starting mysqld daemon with databases from /usr/local/mysql/data
030901 05:02:15 mysqld ended

I'm very new to this and I don't have a clue what I'm doing wrong.

Reply With Quote
  #6  
Old September 1st, 2003, 06:58 AM
Chino Chino is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 4 Chino User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ok, i figured it out.

Open a terminal window and type in the following commands (without the double quotes):

type

cd /usr/local/mysql

type

sudo chown -R mysql data/

enter your Mac OS X account password when asked for it.

To start the server, issue (type)

sudo echo

first, then type

sudo ./bin/mysqld_safe &

Use it with

/usr/local/mysql/bin/mysql test

If you do not want to have to type

/usr/local/mysql/bin

in front of every command, you have to add the

/usr/local/mysql/bin

directory to your PATH environment variable in your login script. For the default tcsh shell, you can do this by running this command once:

echo 'setenv PATH /usr/local/mysql/bin:$PATH' >> ~/.tcshrc


I got this off from:

URL

hope this works for you.

Reply With Quote
  #7  
Old January 30th, 2005, 10:26 AM
rob53 rob53 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 1 rob53 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 10 sec
Reputation Power: 0
hey there,

im having the same problem with php, there is an error in my script somewhere and I cant debug it because all php gives me is a blank screen! how do i fix this, as it is really annoying! phpinfo() is executed ok, as are any normal php pages, but just not any that have an error, it stops output of errored pages! how do i fix this?! or how do i re install php? am using mac os x 10.3.7. help!!! please!!!!

Reply With Quote
  #8  
Old January 31st, 2005, 08:22 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
You might get better results in a new thread.
in the meantime, try adding an or die(); statement to the end of your mysql_query statements... [all your mysql statements would give you better debugging]... I find this is a common problem, and it should give you a better idea of where the problem lies.

Does PHP not output *at all*... or only on scripts with MySQL connections?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > PHP doesnīt show errors / MySQL User and Host not set


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway