• FreeBSD 8 RELEASE
    wordpress: 2.9.2
    php5-5.2.11 PHP Scripting Language
    php5-mysql-5.2.11 The mysql shared extension for php
    mysql-client-5.0.86 Multithreaded SQL database (client)
    mysql-server-5.0.86 Multithreaded SQL database (server)
    apache-2.2.13 Version 2.2.x of Apache web server with prefork MPM.

    So, I’ve had a blog setup on a different host for a while and it’s working great. I am moving it to a new host and now I’m having some issues. This isn’t my first WP install on a bsd machine (I test locally).

    >> The problem I’m having is
    Error establishing a database connection
    #1 My database, username, password and hostname are correct.
    #2 Yes, they’re been checked and they’re still correct.
    #3 Yes, I’ve created additional users, db’s and changed their permissions
    #4 Yes, all servers are running and I’ve made changes from console to mysql.

    So in looking through the help I’ve tried a LOT of things. Eventually I even got it working, don’t know how. But I decided to string together what I did (since I’ve been taking notes). So on step 1, everything goes FOBAR and I haven’t been able to get it working again. So I’m asking help.

    A LOT of people are having this problem right now. So here’s what some of my logs say:

    [Sat Mar 13 22:45:40 2010] [error] [client 192.168.1.66] PHP Fatal error: Call to undefined function preg_match() in /usr/local/www/apache22/website/blog/wp-settings.php on line 64

    [Sat Mar 13 22:58:41 2010] [error] [client 192.168.1.66] PHP Fatal error: Call to undefined function preg_replace() in /usr/local/www/apache22/website/blog/wp-includes/wp-db.php on line 1130

    I’ve gone in and commented those out but it just goes on and on. I saw someone mention that on the wp-config-sample.php it was missing the ?> at the end… but that didn’t work for me either after adding it. I’ve used both methods (wp-config.php and just website/blog/) and both get stuck with not being able to connect to DB.

    Interestingly enough, after I even updated some things (PHP) it now broke my sites layout! So I’ll have to see whats up with that later.

    [Sat Mar 13 23:33:28 2010] [error] [client 192.168.1.66] PHP Notice: Use of undefined constant home - assumed 'home' in /usr/local/www/apache22/website/index.php on line 2

    So, any one have an idea? Maybe it’s just a bad batch of setup files?

    In mysql: running mysql> SELECT host, user, password from mysql.user;
    returns the correct host, user and passwd’d entry.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Call to undefined function preg_match()

    Since preg_match() is a PHP function wouldn’t that indicate some kind of problem with PHP?

    Thread Starter ghettobsd

    (@ghettobsd)

    Well, after a few more hours of messing around this is what has happened:

    ended up with:

    FreeBSD 8 release
    mysql-client-5.1.39 Multithreaded SQL database (client)
    mysql-server-5.1.39 Multithreaded SQL database (server)
    php5-5.2.11 PHP Scripting Language
    php5-extensions-1.3 A “meta-port” to install PHP extensions
    php5-mysql-5.2.11 The mysql shared extension for php
    apache-2.2.13 Version 2.2.x of Apache web server with prefork MPM.

    and wordpress Version 2.8.6
    I will try updating to newest version (oh noes) 2.9.2 after lunch

    The blog is up and running now with all defaults loaded. the DB is exactly the same, only the version has been updated.

    PHP still is broken!
    “Notice: Use of undefined constant home – assumed ‘home’ in /usr/local/www/apache22/website/dir/index.php on line 2”

    This is what it it is complaining about in index.php:
    “<?php $name = home; require(‘header.php’); ?>”

    Thanks

    Thread Starter ghettobsd

    (@ghettobsd)

    Final update,

    so the server software is still the same, but i was able to upgrade wordpress to the latest version AND install the latest version. What’s interesting is that the upgraded version and the fresh install aren’t exactly the same. That’s very very odd (to me).

    The problem with PHP was that one tag said

    <? menu();?>

    And when changed to:

    <?php menu(); ?>

    it works! there are other issues but i will fix that later.

    So while the older version of php didn’t have a problem with that, the newer version does.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Can’t install – like many others’ is closed to new replies.