Results 1 to 5 of 5
  1. #1

    Member Since
    Feb 05, 2005
    12 inch ibook 1.2 ghz
    MySql And Other Questions
    I've installed the php packace from, and mysql v.4.1.
    i cant seem to get php to talk to mysql.
    php scripts work fine on their own.
    php my admin works in mysql, but any db::connect(mysqli://@@) script with a
    "if (DB::isError($db)) {die("Can't Connect:" . $db->getMessage()); }"
    gives me a blank page?
    Also is there any way to access /usr/local/ in the finder?


  2. #2

    Short answer before bed for me...

    However I have not ever used PHP in that way to connect to a MySQL database - is this the way you have done it before or are you just starting out with PHP/MySQL.

    Only thing that does strike me is if(DB::isError($db... should that be if(db::isError($db...

    The way I have always done it and has worked has been:

    $db = mysql_connect('localhost','some_user','password');


    if(!$db || !$db_select)
    echo 'Could not connect to database. Please try again later.';

    // we connected all ok

    That has never given me issues on PHP/MySQL; and I am pretty sure this is with MySQL 4.1 too.

    Is this the first time you have installed PHP and MySQL on your Mac? Has it worked before? What system did you use before if you are an experienced PHP/MySQL programmer and what versions?

    Then we can make some headway to getting solutions

    Unfortunately the only way to access /bin /etc /usr etc is though terminal. Whether enabling the superuser account will avail them in Finder I do not know; personally I stick to the terminal with sudo.


  3. #3

    Member Since
    Feb 05, 2005
    12 inch ibook 1.2 ghz
    thanks for the answer.
    That skript worked for me on my xp box. (php 5.03 mysql4.1)
    (book - learning php5 - O'reillly)
    I am not an expert php programer, but i have done a site.
    I dont know unix at all, but i can get around on osx.
    I know on xp i had to load a dll file For mysqli comands.
    can i acess php.ini (or something similar) in osx?

  4. #4
    Are you logged in as root user ? Did you install as root user / This may be a permission problem. make sure root is enabled and you are logged in as root.

    Secondly, if you have or can get "BB Edit" you can access usr/local (and other hidden files) in BB Edit. They open up just like any other text file.
    Using BB Edit for me is faster than terminal. I was never great with those Unix commands.
    Good Luck,

  5. #5

    muso's Avatar
    Member Since
    Jan 15, 2003
    Whangarei, New Zealand
    Type in command-shift-g and you'll be able to type /usr/local and have that directory appear on screen.
    I'm in your forums, writing sentences in a grammatically acceptable manner.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. mySQL
    By burnedfaceless in forum Web Design and Hosting
    Replies: 1
    Last Post: 02-03-2014, 09:36 AM
  2. A little help with PHP/MySQL
    By blinkdude182 in forum Web Design and Hosting
    Replies: 4
    Last Post: 02-08-2009, 02:52 AM
  3. mysql and ssl
    By danielb in forum OS X - Apps and Games
    Replies: 1
    Last Post: 07-06-2008, 02:34 PM
  4. MySQL
    By ftjogoh in forum Web Design and Hosting
    Replies: 3
    Last Post: 11-21-2004, 12:29 PM
  5. Setting up mysql!!
    By thebryster in forum OS X - Operating System
    Replies: 4
    Last Post: 12-17-2003, 02:44 AM

Posting Permissions

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