Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Moving to PHP5 - getting problems in test - Advise please
Hi,

My web host is moving to PHP5 and I was doing some pre-testing on a server
they provdied for me which already has it running (As I want to make sure my
large application will still work).

However, on shipping over the MySQL dataabse to the PHP5 test server I have
run ito a problem already when the PHP applicaion tries to open the DB.

It was so long since I have done this side of things I could do with some
advice.

The error I get is
Fatal error: Call to undefined method DB_Error::query() in
/home/pathtofile/DBconnectScript.php on line 20

And the line that rasies the error uses:
DB::isError

earlier in the script I have made a call to
require_once('DB.php');

which is a script that was there when I took over this project and I assume
is some standard library. Looking up info on this now I see it has been
replaced by MDB2, but as I know nothing about this, and my webhost is going
live with php5 tomorrow, I really need some help fast.


Any ideas on what I can do to get this working.

Thanks in advance.


Report this thread to moderator Post Follow-up to this message
Old Post

03-18-08 12:07 AM


Re: Moving to PHP5 - getting problems in test - Advise please
news.freedom2surf.net wrote:
> Hi,
>
> My web host is moving to PHP5 and I was doing some pre-testing on a
> server they provdied for me which already has it running (As I want to
> make sure my large application will still work).
>
> However, on shipping over the MySQL dataabse to the PHP5 test server I
> have run ito a problem already when the PHP applicaion tries to open the
> DB.
>
> It was so long since I have done this side of things I could do with
> some advice.
>
> The error I get is
> Fatal error: Call to undefined method DB_Error::query() in
> /home/pathtofile/DBconnectScript.php on line 20
>
> And the line that rasies the error uses:
> DB::isError
>
> earlier in the script I have made a call to
> require_once('DB.php');
>
> which is a script that was there when I took over this project and I
> assume is some standard library. Looking up info on this now I see it
> has been replaced by MDB2, but as I know nothing about this, and my
> webhost is going live with php5 tomorrow, I really need some help fast.
>
>
> Any ideas on what I can do to get this working.
>
> Thanks in advance.
>

Hi,

Start with telling PHP to display all errors, notices, etc.
Add this above your script:
ini_set('display_errors','On');
error_reporting(E_ALL);

Then run it again.

Post back what you found.

Regards,
Erwin Moller

Report this thread to moderator Post Follow-up to this message
Old Post
Erwin Moller
03-18-08 01:01 PM


Re: Moving to PHP5 - getting problems in test - Advise please
Thanks for the input.

In the end I gave up on this approach. I have started again by learning
about PEAR in a bit more detail and am instead trying to use the MDB2
library.

My current error message I get on tryint to connect to the database is:

"MDB2 Error: not found
no RDBMS driver specified"

which leads me to believe that although I have installed the PEAR package
and the MDB2 package (installed onto a shared webhost) I have not installed
the Mysql driver (Even though I have done).

I'm not sure how to check if a particular PEAR driver is installed as my
webhost had their own version of PEAR and I also installed my own PEAR using
go-pear but I am not sure how to check if my version of PEAR has the package
installed.
As you can tell I'm very new to PEAR and find the official documentation
assumes a lot of other knowledge which makes it difficult.

Thanks for any input.


Report this thread to moderator Post Follow-up to this message
Old Post

03-25-08 12:04 AM


Re: Moving to PHP5 - getting problems in test - Advise please
In article <5r2dnQ7-xfMSZ3ranZ2dnUVZ8tSdnZ2d@pipex.net>,
<news.freedom2surf.net> wrote:

> I'm not sure how to check if a particular PEAR driver is installed as my
> webhost had their own version of PEAR and I also installed my own PEAR usi
ng
> go-pear but I am not sure how to check if my version of PEAR has the packa
ge
> installed.
> As you can tell I'm very new to PEAR and find the official documentation
> assumes a lot of other knowledge which makes it difficult.

Try just

pear

at the prompt.

You can also

pear list
pear config-show

Umm.

pear | more

doesn't work (in Darwin's bash); you'll have to do something like

pear 2> pear.txt;more pear.txt
--
Gav P

Report this thread to moderator Post Follow-up to this message
Old Post
Gavrilo Prinzip
03-25-08 12:04 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Language archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 12:14 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.