473,594 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Call to undefined method

1 New Member
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::doQue ry()

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 2578
pbmods
5,821 Recognized Expert Expert
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
1389
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 being a feature or a change to follow a standard. The problem is that if the called template is not included in xslt pass, I get: javax.xml.transform.TransformerException: ElemTemplateElement error: "your missing template name here".
54
7816
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
4195
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 __construct($filename = null, $mode = 'r+'){
8
3335
by: nsharma78 | last post by:
Hi, I have a code as follows: class A { public: void print(){cout << "Magic" << endl;} };
45
4815
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 "new Array() vs " question or to the array performance, I dared to move it to a new thread. Gecko takes undefined value strictly as per Book 4, Chapter 3, Song 9 of Books of ECMA :-)
18
3654
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
12624
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 database titled KTC.mdb # no passwords on our database $dbh = DBI->connect('dbi:ODBC:KTC'); $connect = DBI->connect('dbi:ODBC:KTC');
3
2753
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 communicate with it. After running my scripts, I get this error: Fatal error: Call to undefined method XML_RPC_Response::kindOf() in / usr/share/PEAR/XML/RPC.php on line 1972
11
14508
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 /home/patriat/sourcescr/input/lib/patriat_lib.pl line 226. # conect to database $dbh = DBI->connect( $ENV{ORACLE_SID}, $ENV{ORAUSER}, $ENV{ORAPASSWD}, 'Oracle'); ################################ { # inserting into job_audit table print PLOG &now, " : Inserting into the...
0
3657
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 C:\AppServ\www\seeyouu \send_mail.php on line 22 why is PEAR_Error undefined? i'd already put the PEAR.php and Mail.php in a same directory but why the error message appear? appreciate if anyone can tell me.
0
7947
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8010
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8242
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6665
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5413
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3868
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
1217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.