Jump to content

ozzwald

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ozzwald's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sorry for my stupidity, When you say the PEAR package is old, is that the one of my webhost, or my code? I went back to check the login to the database to check, the permissions etc, to find my Database wasnt in MyPHPadmin! My webhosts are looking into this. I will come back and let you know the outcome. Many thanks
  2. PS: I dont know if this will help, make a difference: Deprecated: Assigning the return value of new by reference is deprecated in /usr/local/lib/php/MDB2.php on line 390 Deprecated: Assigning the return value of new by reference is deprecated in /usr/local/lib/php/MDB2.php on line 1885 Deprecated: Assigning the return value of new by reference is deprecated in /usr/local/lib/php/MDB2.php on line 2572 Deprecated: Assigning the return value of new by reference is deprecated in /usr/local/lib/php/MDB2.php on line 2595 Deprecated: Assigning the return value of new by reference is deprecated in /usr/local/lib/php/MDB2.php on line 2940 thanks
  3. Hi, I am now getting this error: Error: MDB2 Error: insufficient permissions I will read up on what you said Adam. Thanks
  4. Hi, Thanks for the pointer. Here is the class.database.php file: <?php require_once 'MDB2.php'; class Database { public $data; private static $instance; public static function get(){ if (!isset(self::$instance)) { $c = __CLASS__; self::$instance = new $c; } return self::$instance; } } ?> As i said i am a complete newbie at PHP, i have always worked asp! I am learning very quickly!
  5. Hi, I have migrated a website from 5.2.6 to 5.3.13 due to the web developer going awol. After many different hosts, I have found one that has PEAR, MDB2 etc that the site needs. The only problem that I can see is the newer version of PHP wont run the code. I have very little experience in PHP!!!! I believe this is the code bringin up the error: $dsn = 'mysql://' . DATABASE_USER . ':' . DATABASE_PASS . '@' . DATABASE_HOST . '/' . DATABASE_BASE; Database::get()->data =& MDB2::connect($dsn); // put this code just after initializing db connection (i.e. after MDB2::connect) to hide plain text password for ($__i = 0; $__i < count($GLOBALS['_MDB2_databases']); $__i++) { $GLOBALS['_MDB2_databases'][$__i]->dsn['password'] = '* hidden *'; $GLOBALS['_MDB2_databases'][$__i]->connected_dsn['password'] = '* hidden *'; } if (PEAR::isError(Database::get()->data)) { die('Error calling script. connect.php line ~14'); } Apart from some Deprecated warnings i get when I allow all errors, I am getting the 'Error calling script. connect.php line ~14' The site is based on templates, so has many include files. Many thanks in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.