Code Comments
Programming Forum and web based access to our favorite programming groups.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.
Post Follow-up to this messagenews.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
Post Follow-up to this messageThanks 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.
Post Follow-up to this messageIn 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.