• Resolved smithia6

    (@smithia6)


    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • so complicated

    Thread Starter smithia6

    (@smithia6)

    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

    The first Apache error can be easily fixed.

    Download TextWrangler from here https://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!

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

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Upgraded to PHP 5.3.0 on Mac now no database connection.’ is closed to new replies.