WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Upgraded to PHP 5.3.0 on Mac now no database connection. (6 posts)

  1. smithia6
    Member
    Posted 3 years ago #

    HI Guys,

    I am running mac 10.5.8 on a Intel core 2, I was using the bundled Apache, and PHP and
    I installed mysql, everything was running fine, but I had no GD so WordPress was not creating the thumbnails, so I wanted to update to PHP 5.3.0, but before this I made sure I installed X11 from my Mac DVD.
    During the PHP installation I was asked on install to put a # a corresponding line in the LoadModule in /etc/apache2/http.conf so the only line I could see in there what had anything to do with php was the line :-
    LoadModule php5_module libexec/apache2/libphp5.so
    So I did this and restarted the install and in installed no problems, I then ran the <?php phpinfo(); ?> and everything was installed OK no problems, GD was there, I rebooted the Mac and went back to the phpinfo and it was all ok, but I get an error when trying to go to my wordpress (Error establishing a database connection) and thats it.
    I can connect to the databases using Sequel Pro as before, I can run php no problem, my sql is running but can not get to my wordpress.

    I tried stopping and starting SQL, however when I try to stop apache I get the error using sudo apachectl -k stop I get the error:-

    /usr/sbin/apachectl: line 73: ulimit: open files: cannot modify limit: Invalid argument
    httpd: Syntax error on line 484 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/other/+entropy-php.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _libiconv\n Referenced from: /usr/local/php5/lib/libintl.8.dylib\n Expected in: /usr/lib/libiconv.2.dylib\n

    Or if I use:-
    sudo /usr/sbin/apachectl restart
    I get the error:-

    /usr/sbin/apachectl: line 73: ulimit: open files: cannot modify limit: Invalid argument

    Anybody any ideas??

    Regards

    Ian

  2. skywangji
    Member
    Posted 3 years ago #

    so complicated

  3. smithia6
    Member
    Posted 3 years ago #

    Easy peasy, sussed it out.

    For some reason now unknown to anyone apart from God himself, the config files no longer like 127.0.0.1 or my internal ip of 192.168.2.101 but it is happy to tick away at 'localhost'

    ?????

    Got a problem get a plaster to sort it out......lol

  4. nookeen
    Member
    Posted 2 years ago #

    The first Apache error can be easily fixed.

    Download TextWrangler from here http://www.barebones.com/products/textwrangler/ if you don't have a good text editor.

    File>Open, check 'Show Hidden files', choose 'View All' from drop down and then go to /usr/sbin/apachectl and open it.

    Go to line 73, you should see something like this:

    if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
    $ULIMIT_MAX_FILES
    fi

    Comment it out -> change to:

    #if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
    #$ULIMIT_MAX_FILES
    #fi

    It should do it. Sorry, can't help you with the PHP at the moment.

    FYI: Also, I noticed that Apple Updates deleted my account details here: /private/etc/apache2/users/ <- this directory should have your user name file e.g. 'myusername.conf' with the following code:

    <Directory "/Users/myusername/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>

    If it's not there simply create it.

    Hope it helps!

  5. eriknilsson85
    Member
    Posted 2 years ago #

    I'm having the exact same problem. Which config file is it that you've edited?

  6. nookeen
    Member
    Posted 2 years ago #

    Are you referring to problem in /usr/sbin/apachectl? If so, then this is the file. It doesn't have an extension, but it's an actual file.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.