473,321 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Call to undefined method

I'm moving a script from PHP4 to PHP5. Everything works under PHP4.

When I run the script under PHP5, I get the following error message:

Call to undefined method Database::doQuery()

Here is the offending code:
Expand|Select|Wrap|Line Numbers
  1.         function getBaseURL( )
  2.         {
  3.                 $this->db->doQuery( "SELECT value FROM base_Config WHERE config='".CFG_FIELD_BASE_URL."' LIMIT 1" );
  4.                 $row = $this->db->nextAssoc( );
  5.                 return $row['value'];
  6.         }
  7.  
Since the code works under PHP4, I suspect that the issue has to do with changes to OO functions which were acceptable under PHP4, which no longer work under PHP5, however, I am really not sure. Any suggestions to point me in the right direction would be appreciated.
Dec 5 '07 #1
1 2562
pbmods
5,821 Expert 4TB
Heya, Vegas. Welcome to TSDN!

You might have a Database class defined elsewhere in your PHP 5 installation (such as in your PEAR directory).

Try setting your include_path to only include directories in your application.
Dec 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: terry.jeske | last post by:
Hello, In xalan 2.41 we were able to conditionally call a template. This appears broken in 2.6. I did glance at the call-template specfications but did not see anything that would point to this...
54
by: Neo | last post by:
Hi Folks, I've a simple qestion related to dynamic memory allocation in C here is the code: #include <stdio.h> int main() {
8
by: Cruella DeVille | last post by:
I'm writing a class to handle reading/writing from/to files like this (shortened) lass FileIO{ private $filename; private $mode; private $filePointer; private $dictionary; public function...
8
by: nsharma78 | last post by:
Hi, I have a code as follows: class A { public: void print(){cout << "Magic" << endl;} };
45
by: VK | last post by:
(see the post by ASM in the original thread; can be seen at <http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/3716384d8bfa1b0b> as an option) As that is not in relevance to...
18
by: AlexanderVX | last post by:
How do I write a constructor mehtod call in this case /*-----------*/ template<typename Tclass CObjectPoolImpl { public: void smth(T* pObj) { if (pObj)
2
by: gmccammon | last post by:
I am getting an error that says that I can't call method "prepare" on an undefined value! Here is what I have as code.... I don't understand what is not defined. # opens connection to Access...
3
by: Ming | last post by:
I am new to php5 programming :) I redirect users to another server to login. After they login successfully, they will be redirected to test.php. The server provides xml_rpc interface so I can...
11
by: gautamga | last post by:
Hi All i have created the script which calls method from other script lib and while executing i get and error Can't call method "prepare" on an undefined value at...
0
by: youu917 | last post by:
I'm trying to code a php page that can send a email automatically. However, i don't understand the error message appeared: Fatal error: Call to undefined method PEAR_Error::send() in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.