Results 1 to 7 of 7
  1. #1
    The Annoyed Man
    PHP/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 ( 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 (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.

    Thank you.

  2. #2
    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??

  3. #3

    Member Since
    Oct 01, 2004
    Probably a problem with the authentication protocol:

    Do you get any error messages when you try mysql_connect()?

  4. #4
    The Annoyed Man
    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.

  5. #5
    The Annoyed Man
    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.

  6. #6
    The Annoyed Man
    Quote Originally Posted by tj6106
    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??
    My G5 crumped since my original post. I had to completely reinstall the OS to get it running again. I tried your suggestion of installing MAMP, and it seems like a neat solution - if it would work on my machine.

    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. yields a refused connection error.

    It doesn't seem to matter what I do, I can't display a simple php page.

  7. #7
    The Annoyed Man
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to setup apache,php & mysql on mac mini server
    By fajar3t3 in forum OS X - Apps and Games
    Replies: 0
    Last Post: 12-23-2009, 04:32 AM
  2. PHP/Apache/MySQL for Mac
    By ryanzec in forum OS X - Apps and Games
    Replies: 2
    Last Post: 11-04-2009, 02:50 PM
  3. Best Apache-mysql-php install package for intel mac?
    By smeshy123 in forum Web Design and Hosting
    Replies: 3
    Last Post: 05-27-2007, 03:23 PM
  4. mac osx server. (php/mysql)
    By design2 in forum Web Design and Hosting
    Replies: 5
    Last Post: 07-30-2005, 04:02 AM
  5. mac os update 10.3.7 and PHP MYSQL
    By lomokev in forum Web Design and Hosting
    Replies: 2
    Last Post: 01-27-2005, 04:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts