Here's a new one...

Help
Lance Lyon
2004-02-09
2013-04-15
  • Lance Lyon

    Lance Lyon - 2004-02-09

    Just installed onto the linux box - throws this error on initial installation :

    Fatal error: Call to undefined function: mysql_pconnect() in /var/www/html/meltdown-1.0-alpha3/db.php on line 94

    Any ideas ? I suspect a problem with MySQL setup.

    cheers,

    Lance

     
    • Petko Bossakov

      Petko Bossakov - 2004-02-09

      Well, apparently PHP doesn't have MySQL enabled.
      Here's what I found in the PHP documentation, hope this helps:

      By using the --with-mysql[=DIR] configuration option you enable PHP to access MySQL databases.

      In PHP 4, the option --with-mysql is enabled by default. To disable this default behavior, you may use the --without-mysql configure option. Also in PHP 4, if you enable MySQL without specifying the path to the MySQL install DIR, PHP will use the bundled MySQL client libraries. In Windows, there is no DLL, it's simply built into PHP 4. Users who run other applications that use MySQL (for example, auth-mysql) should not use the bundled library, but rather specify the path to MySQL's install directory, like so: --with-mysql=/path/to/mysql. This will force PHP to use the client libraries installed by MySQL, thus avoiding any conflicts.

      In PHP 5, MySQL is no longer enabled by default, nor is the MySQL library bundled with PHP. Read this FAQ for details on why.

      PHP 5 no longer bundles MySQL client libraries, what does this mean to me? Can I still use MySQL with PHP? I try to use MySQL and get "function undefined" errors, what gives?

      Yes. There will always be MySQL support in PHP of one kind or another. The only change in PHP 5 is that we are no longer bundling the client library itself. Some reasons in no particular order:

      Most systems these days already have the client library installed.

      Given the above, having multiple versions of the library can get messy. For example, if you link mod_auth_mysql against one version and PHP against another, and then enable both in Apache, you get a nice fat crash. Also, the bundled library didn't always play well with the installed server version. The most obvious symptom of this being disagreement over where to find the mysql.socket unix domain socket file.

      Maintenance was somewhat lax and it was falling further and further behind the released version.

      Future versions of the library are under the GPL and thus we don't have an upgrade path since we cannot bundle a GPL'ed library in a BSD/Apache-style licensed project. A clean break in PHP 5 seemed like the best option.

      This won't actually affect that many people. UNIX users, at least the ones who know what they are doing, tend to always build PHP against their system's libmyqlclient library simply by doing --with-mysql=/usr when building PHP. Windows users may enable the extension php_mysql.dll inside php.ini. Also, copy libmySQL.dll into the appropriate %SYSTEMROOT% directory, just like you do with every other bundled DLL from the dll directory.

       
  • chunk bass

    chunk bass - 2011-12-21

    upper is great,that is what I want to say.

     

Log in to post a comment.