06-27-2005, 03:01 PM #1The Annoyed ManGuestPHP/mySQL difficulties on Mac OS X....
Boy, I hope somebody can help me in some concrete fashion....
First, the background: I am not an expert at installing these things, and I barely understand any of the discussions I've read here, or on other help forums. However, I have been doing simple coding in PHP and using MySQL for a few years now, and I've been running both PHP and MySQL on my home PC for quite a long time without difficulty. I'm not the sharpest programming knife in the drawer, but neither am I completely lost.
My work machine is a dual processor G5, running OS X 10.3.8 with the webserver that is native to the OS running. I have installed PHP version 5.0.3 (www.entropy.ch Release 1) and MySQL 4.0.23-standard. I have also installed phpMyAdmin 2.6.1, and it is running beautifully. I am able to use it to create databases, tables, and records, as well as to edit existing databases, tables, and records; so I know definitively that both PHP and MySQL are working on this machine. HOWEVER....
I cannot get PHP to talk to MySQL in the pages that I write when trying to execute those scripts on my local drive; nor can I get it to execute a simple script such as declaring a variable to equal such and so and then trying to echo the variable in the body, or trying to carry a variable forward from a form to the next page. But, those same pages function just fine when uploaded to the web and running on a hosting webserver.
When I run http://127.0.0.1/~MyComputerName/test.php (which performs the phpinfo() function), it appears to show that everything is running fine. All the PHP files I'm writing are located in subdirectories within the user/sites/ directory, which is where all the documentation I can find says they should be. The fact that phyMyAdmin is running just fine in that directory tells me that I'm doing the right thing.
It would be great if I didn't have to upload each script to check its validity each time I make an edit, and any constructive suggestions would be very much appreciated.
10-06-2005, 05:56 PM #2tj6106Guest
I had the same problem. Couldn't get it to work at all and ended up installing MAMP (Mac, Apache, Mysql, PHP) to get the whole thing working together. Have you tried to configure your php install with mysql??
10-06-2005, 06:14 PM #3
- Member Since
- Oct 01, 2004
11-01-2005, 02:27 PM #4The Annoyed ManGuest
Sorry it took so long to reply to either of your suggestions. I've had 17 irons in the fire and just now had the time to get back to this. I am downloading the MAMP package as I'm writing this. I'll try that first and post the results.
11-02-2005, 02:25 PM #5The Annoyed ManGuest
To answer "mynameis"... This does not appear to be a MySQL issue, because phpMyAdmin runs just fine. I can create/edit/delete databases and tables using phpMyAdmin.
What is happening is that, even with the web server running and everything else apparently working, AND with my php documents stored in the home directory, even simple scripts (like echo "howdy") fail to do anything. Nothing happens.
11-02-2005, 02:37 PM #6The Annoyed ManGuestOriginally Posted by tj6106
Even with MAMP installed into the applications/ folder, I'm having basically the same issues as before. The MAMP start page will run. phpinfo runs. phpMyAdmin runs. But placing my scripts in htdocs/ is an exercise in futility.
http://localhost:8888/MAMP/htdocs/scriptname.php yields a 404 error.
http://localhost:8888/htdocs/scriptname.php yields a 404 error.
http://localhost:8888/scriptname.php yields a blank page with no html source, even though part of the page is static html.
http://127.0.0.1/scriptname.php yields a refused connection error.
It doesn't seem to matter what I do, I can't display a simple php page.
11-02-2005, 02:42 PM #7The Annoyed ManGuest
I should add that I've also just purchased an iBook recently with the Tiger edition of OS X on it, and I can't get the MAMP install to work on it either.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By fajar3t3 in forum OS X - Apps and GamesReplies: 0Last Post: 12-23-2009, 04:32 AM
By ryanzec in forum OS X - Apps and GamesReplies: 2Last Post: 11-04-2009, 02:50 PM
By smeshy123 in forum Web Design and HostingReplies: 3Last Post: 05-27-2007, 03:23 PM
By design2 in forum Web Design and HostingReplies: 5Last Post: 07-30-2005, 04:02 AM
By lomokev in forum Web Design and HostingReplies: 2Last Post: 01-27-2005, 04:44 PM