This is a discussion on Moving to PHP5 - getting problems in test - Advise please within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi, My web host is moving to PHP5 and I was doing some pre-testing on a server they provdied ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|