PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
DB Error: Extension not found

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> PEAR
View previous topic :: View next topic  
Author Message
canadiancoder



Joined: 13 Sep 2007
Posts: 5

PostPosted: Thu Sep 13, 2007 7:21 pm    Post subject: DB Error: Extension not found Reply with quote

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
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Thu Sep 13, 2007 9:00 pm    Post subject: Reply with quote

Did you maybe edit the wrong php.ini file? phpinfo() should be able to tell you which php.ini PHP uses.
Back to top
View user's profile Send private message
canadiancoder



Joined: 13 Sep 2007
Posts: 5

PostPosted: Thu Sep 13, 2007 9:47 pm    Post subject: Reply with quote

Hi Mark,

Thanks for the tip but it seems that the ini file is correct.
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Thu Sep 13, 2007 10:02 pm    Post subject: Reply with quote

Is the mysql extension shown in the phpinfo() output?
Back to top
View user's profile Send private message
canadiancoder



Joined: 13 Sep 2007
Posts: 5

PostPosted: Fri Sep 14, 2007 1:41 pm    Post subject: Reply with quote

Hi Mark,

I'm not seeing it.
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Fri Sep 14, 2007 2:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
canadiancoder



Joined: 13 Sep 2007
Posts: 5

PostPosted: Fri Sep 14, 2007 2:40 pm    Post subject: Reply with quote

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:[email protected]/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
View user's profile Send private message
canadiancoder



Joined: 13 Sep 2007
Posts: 5

PostPosted: Fri Sep 14, 2007 3:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> PEAR All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement