image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Design & Media

Reply
 
Thread Tools
  #1  
Old July 7th, 2003, 02:18 PM
toast's Avatar
Gone !
 
Join Date: Apr 2002
Location: Gone !
Posts: 2,316
Thanks: 0
Thanked 0 Times in 0 Posts
toast will become famous soon enough
Cool Help me launching PHP/MySQL development on localhost please !

I'm throwing myself in the PHP/MySQL world. What I have done:

- Installed PHP, and it works.
- Installed MySQL using the appropriate package.
- Installed phpMyAdmin in my ~/Sites.

I do have modified my config.inc.php file. Here's what I modified in it:

Code:
$cfg['PmaAbsoluteUri'] = 'http://127.0.0.1/~toast/';
$cfg['Servers'][$i]['host'] = 'http://127.0.0.1/~toast/'; // MySQL hostname

$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?

$cfg['Servers'][$i]['user'] = 'toast'; // MySQL user
$cfg['Servers'][$i]['password'] = 'fakepass'; // MySQL password (only needed with auth_type
The username is my OS X session name. The password is my OSX user password. I'm a super user on my computer (I run only one session).

Now, I open Safari and ask for http://127.0.0.1/~toast/phpmyadmin/index.php. I enter toast/fakepass, but it won't accept it ! What's wrong please ?
__________________
Gone ! Want to keep in touch: email - iChatAV: brat270783
Reply With Quote
  #2  
Old July 7th, 2003, 03:45 PM
uoba's Avatar
Re: member
 
Join Date: Aug 2001
Location: Merseyside, UK
Posts: 1,726
Thanks: 0
Thanked 0 Times in 0 Posts
uoba is on a distinguished road
I would say change the first line to the directory where phpMyAdmin is (i.e. http://127.0.0.1/~toast/phpMyAdmin/)

(The title of this $cfg string is PmaAbsoluteUri... the 'Pma' bit meaning phpMyAdmin).

Just looking at my phpMyAdmin install (which I know works), I have auth_type as config as well.

Did you change the controluser and controlpass to your details as well?

Finally, if you've tried the above, try host as localhost/~toast/
Reply With Quote
  #3  
Old July 7th, 2003, 04:02 PM
toast's Avatar
Gone !
 
Join Date: Apr 2002
Location: Gone !
Posts: 2,316
Thanks: 0
Thanked 0 Times in 0 Posts
toast will become famous soon enough
Succeeded by adding /phpmyadmin/. Had problems with the GRANT command, why does it work so... randomly ? This whole PHP/MySQL is too complex for non-geeks.

I'll post my next problems very soon...

Off-topic: how do you get your root password back when you forgot it ?
__________________
Gone ! Want to keep in touch: email - iChatAV: brat270783
Reply With Quote
  #4  
Old July 7th, 2003, 04:35 PM
toast's Avatar
Gone !
 
Join Date: Apr 2002
Location: Gone !
Posts: 2,316
Thanks: 0
Thanked 0 Times in 0 Posts
toast will become famous soon enough
New problem already bumped.

Trying to create a database connection in DWMX. I've set up my site, I work on local env in http://127.0.0.1/~toast/.

I create a PHP file and ask for a connection (from the databases palette):
name=connToast
MySQL server=http://127.0.0.1/~toast/ (WTF could it be ?)
usr=toast
pass=myOSXuserpassword
database= when I click on Select, it gives 2005 UNKNOWN error. I can't believe it ! I'll end up trashing this whole dynamic thing soon if it continues. Or maybe I'll wait for this O'Reilly PHP/MySQL book.

My problem is, the Glasshaus book I bought gives NO instructions for Mac ! Gonna kill'em. Uoba, thanks for your first post. Second one ? Pleez, I'm such a dummy I feel like I'm gonna buy the whole Sybex suite tomorrow.
__________________
Gone ! Want to keep in touch: email - iChatAV: brat270783
Reply With Quote
  #5  
Old July 7th, 2003, 05:54 PM
uoba's Avatar
Re: member
 
Join Date: Aug 2001
Location: Merseyside, UK
Posts: 1,726
Thanks: 0
Thanked 0 Times in 0 Posts
uoba is on a distinguished road
Take it easy Toast

You'll find MySQL the easiest out of them all. All you have to remember is, that your machine is the MySQL server, not any specific directory. Therefore, your MySQL server is simply 127.0.0.1 or even just the word localhost. So, just take off the ~toast/ bit again.

If you want to get your root password back... grab your OS X install CD and boot from it... there's an option somewhere to reset the root pass.

As for the Glasshaus book, all the Dreamweaver bits are essentially the same for the Mac. As for the MySQL stuff and PHP, I spent about a year learning it before using it in Dreamweaver (via the command line). This helped understanding it a lot more easily.

Let me know if it works.
Reply With Quote
  #6  
Old July 7th, 2003, 06:14 PM
toast's Avatar
Gone !
 
Join Date: Apr 2002
Location: Gone !
Posts: 2,316
Thanks: 0
Thanked 0 Times in 0 Posts
toast will become famous soon enough
I'm out to drink something fresh that'll help me not bashing my forehead against the Dreamweaver Connection window and I'll try all this. Thank you again. I have an O'Reilly PHP/MySQL book, but I'm moving and I can't wait to program in PHP. I'm skipping some steps, thus, not the best thing. I'll guess it'll be okay in an intensive month or so. There will be loads of bashing foreheads before that. Or loads of refreshments
__________________
Gone ! Want to keep in touch: email - iChatAV: brat270783
Reply With Quote
  #7  
Old July 7th, 2003, 06:25 PM
toast's Avatar
Gone !
 
Join Date: Apr 2002
Location: Gone !
Posts: 2,316
Thanks: 0
Thanked 0 Times in 0 Posts
toast will become famous soon enough
No, nothing changed. How do you do yourself ? Did you install MySQL thru a package or by source ?
__________________
Gone ! Want to keep in touch: email - iChatAV: brat270783
Reply With Quote
  #8  
Old July 7th, 2003, 06:51 PM
uoba's Avatar
Re: member
 
Join Date: Aug 2001
Location: Merseyside, UK
Posts: 1,726
Thanks: 0
Thanked 0 Times in 0 Posts
uoba is on a distinguished road
I installed Marc Liyanage's MySQL from http://www.entropy.ch

You can test MySQL from the command line by typing:
cd /usr/local/mysql

./bin/mysqladmin status


This should report your MySQL status (if it is up!)

If it isn't, then MySQL isn't running. This may be simply because you've turned your machine off... MySQL needs to be started up again after shutdown or a restart. To do this, follow the instructions from the MySQL install page on the above link (number 5 through 7).
Reply With Quote
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gui development on OS X bighog Software Programming & Web Scripting 10 August 1st, 2004 04:10 AM
SSHD keeps dying on logout... legacyb4 Mac OS X System & Mac Software 4 April 12th, 2002 09:02 AM
new firewire hd won't transfer files - any ideas to help? edX Apple News, Rumors & Discussion 14 December 27th, 2001 05:07 PM


All times are GMT -5. The time now is 03:11 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.