Menu

#65 undefined function mysql_pconnect

closed
None
5
2012-07-20
2006-03-12
No

I have been unable to get MRBS to work and I am always
getting the same error. The error seems to be with
MySQL privileges/access rights but I have not been
able to find anything (and I have been looking for
months)

Fatal error: Call to undefined function mysql_pconnect
() in c:\Inetpub\wwwroot\mrbs\mysql.inc on line 224

I am using MySQL 4.1 (mysql-essential-4.1.14-
win32.msi) downloaded from mysql.com and am using the
following commands to set the user
"Create Database mrbs;"
then "use mrbs"
then "show tables;" to show that the db is empty
"SOURCE C:/tables.my.sql;"
Now "INSERT INTO mysql.user (user, host, password)
VALUES ('mrbs', 'localhost', PASSWORD('mrbs-
password'));"
Privileges
"GRANT ALL ON mrbs.* TO mrbs;"

The area in mysql.inc that is referred to is unchanged
from the download
$db_c = mysql_pconnect($db_host, $db_login,
$db_password);

My config.inc.php file that refers to ($db_host,
$db_login) contains this info
$dbsys = "mysql";
$db_host = "localhost";
$db_database = "mrbs";
$db_login = "mrbs";
$db_password = 'mrbs-password';
$db_tbl_prefix = "mrbs_";

Any help that could be given would be appreciated.
I have tried it on several Windows boxes using several
version if PHP, always getting the same error

Steve

Discussion

  • Steve Bloomer

    Steve Bloomer - 2006-03-14

    Logged In: YES
    user_id=1197457

    OK. I have now got it running. For other who might read
    this who are not good with MySQL/PHP. I have included my
    desaster recovery notes

    Warning. As of PHP version 5, PHP does not have integrated
    support for MYSQL. You need to use PHP 4 in order to get
    good communication with the MYSQL server. BUT, PHP 4 has
    issues with Windows 2003. It will appear to work, you may
    get issues with authentication (for me, if a person used
    the wrong password it would still show them as logged on,
    but would then not allow them to make a booking. This led
    to lots of confusion.

    If you have installed PHP 5, when you install PHP 4, it
    will not work unless you delete the php.ini located in
    C:\Windows prior to the install

    Install IIS on a W2k machine
    Download MRBS 1.2.3 and set up the config.inc.php file as
    required

    Install MySQL 5.0.19 (www.mysql.com) using the following
    settings
    Run Setup.exe
    Custom Change Location to C:\Mysql\ Skip Sign-Up
    Finish (Config Yes)
    Detailed
    Server
    Multi
    Decision Support
    Remember Port (3306) for firewall if required
    Standard
    As Service
    Give password (no other Options)
    Execute

    Setup db
    Copy the file "tables.my.sql" to C:\ Through the start menu, log into MySQL using the password
    you gave it earlier
    Run the following commands:
    Create database mrbs;
    use mrbs
    SOURCE C:/tables.my.sql;
    CREATE USER 'mrbs' IDENTIFIED BY 'mrbs-password';
    GRANT ALL ON mrbs.* TO mrbs;
    SET PASSWORD FOR 'mrbs' = OLD_PASSWORD('mrbs-
    password');
    MRBS uses an old password system not recognised by new
    versions of MySQL the last command converts the way MySQL
    stores the password, which enables

    PHP
    Check that their is not an old version of php.ini in the
    C:\windows directory
    Run the PHP 4.3.9 installer

    All should work

     
  • John Beranek

    John Beranek - 2006-03-24

    Logged In: YES
    user_id=71843

    I'm not sure I follow what your problems were, or how you
    solved them - but I'm glad you did. :)

    John.