| View previous topic :: View next topic |
| Author |
Message |
canadiancoder
Joined: 13 Sep 2007 Posts: 5
|
Posted: Thu Sep 13, 2007 7:21 pm Post subject: DB Error: Extension not found |
|
|
Hi folks,
I'm running Windows XP Pro, Apache 2.2.4 and PHP 5.2.3 and I've installed PEAR.
My system had crashed in recently and I have restored a backup but I had to reinstall PHP and Apache. Prior to the crash everything worked nicely. I'm guessing there is some configuration I'm neglecting but all other forums point to uncommenting:
extension=php_mysql.dll
I've done that and restarted the server but to no avail. Does anyone have a suggestion of what might be wrong?
Thanks |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1011
|
Posted: Thu Sep 13, 2007 9:00 pm Post subject: |
|
|
| Did you maybe edit the wrong php.ini file? phpinfo() should be able to tell you which php.ini PHP uses. |
|
| Back to top |
|
 |
canadiancoder
Joined: 13 Sep 2007 Posts: 5
|
Posted: Thu Sep 13, 2007 9:47 pm Post subject: |
|
|
Hi Mark,
Thanks for the tip but it seems that the ini file is correct. |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1011
|
Posted: Thu Sep 13, 2007 10:02 pm Post subject: |
|
|
| Is the mysql extension shown in the phpinfo() output? |
|
| Back to top |
|
 |
canadiancoder
Joined: 13 Sep 2007 Posts: 5
|
Posted: Fri Sep 14, 2007 1:41 pm Post subject: |
|
|
Hi Mark,
I'm not seeing it. |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1011
|
Posted: Fri Sep 14, 2007 2:15 pm Post subject: |
|
|
| canadiancoder wrote: | | I'm not seeing it. |
Then you either have edited the wrong file or PHP is missing some MySQL related files. Have you checked the error log of your web server? |
|
| Back to top |
|
 |
canadiancoder
Joined: 13 Sep 2007 Posts: 5
|
Posted: Fri Sep 14, 2007 2:40 pm Post subject: |
|
|
I have and here is a relevant line:
| Code: | [Fri Sep 14 09:32:44 2007] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function mysql_connect() in C:\\Project\\Current\\portal\\content_root\\getCountries.php on line 14, referer: http://127.0.0.1/Current/portal/content_root/admin.php?username=abc&password=123
|
For a test I'm running the following code:
| Code: | <?php
require_once('../includes/php/Application.php');
require_once "sql_statements.php";
include('includes/header.php');
$db =& DB::connect( 'mysql://root:walter00@127.0.0.1/proto3' );
if ( PEAR::isError( $db ) )
{
echo "<script language=JavaScript>alert('" . $db->getUserInfo() . "');</script>";
}
?> |
I can run this from the command line but it fails when run from the portal. |
|
| Back to top |
|
 |
canadiancoder
Joined: 13 Sep 2007 Posts: 5
|
Posted: Fri Sep 14, 2007 3:21 pm Post subject: |
|
|
I managed to solve this little problem by reinstalling PHP. I don't know what changed but it seems to work now.
Thanks nonetheless for the tips! |
|
| Back to top |
|
 |
|