View previous topic :: View next topic |
Author |
Message |
lean4huskytop Smarty Regular
Joined: 19 Aug 2003 Posts: 41
|
Posted: Wed Jan 07, 2004 6:53 am Post subject: Smarty and Pear::DB question |
|
|
i was able to install SMARTY and PEAR :: DB package and Mail Package on my local home computer with Apache thorugh Foxserve.
When I upload stuff to the "real" server" it gives this error:
Fatal error: Call to undefined function: query() in /home/advenure/public_html/index.php on line 10
You can see it at www.TrainerDirectory.net
I installed the PEAR packeges properly, since on other pages, the Mail package works fine.
The problem is with the query() function thats in the common.php under DB folder....and the db.php is being included as opposed to the common.db. Has anyone had a problem with the Pear:db installation?
Am I missing something in the include_path? I can connect to the DB.php, but not the common.php in the pear/db/ folder.
very strange...please help
Paul |
|
Back to top |
|
Duncan Smarty Pro
Joined: 16 Dec 2003 Posts: 166
|
Posted: Wed Jan 07, 2004 8:39 pm Post subject: |
|
|
Actually I had similar problems when an invalid SQL statement was used.
Make sure to add error reporting to your SQL connections,queries, ... or comment the query line to see if it really is the query itself causing the problem. |
|
Back to top |
|
lean4huskytop Smarty Regular
Joined: 19 Aug 2003 Posts: 41
|
Posted: Wed Jan 07, 2004 8:46 pm Post subject: Pear DB with PHP and SMARTY |
|
|
You are the babe...I will take a look at that now...who knows - maybe you are right..
I will let you know
Paul |
|
Back to top |
|
lean4huskytop Smarty Regular
Joined: 19 Aug 2003 Posts: 41
|
Posted: Wed Jan 07, 2004 8:52 pm Post subject: |
|
|
I just tried, and it didnt help..I will turn on SQL errors so that I can see in detail how to do that
I will have to dig for tjh einfo....do you know off hand how to turn on the sql error reporting?
Paul |
|
Back to top |
|
Duncan Smarty Pro
Joined: 16 Dec 2003 Posts: 166
|
|
Back to top |
|
lean4huskytop Smarty Regular
Joined: 19 Aug 2003 Posts: 41
|
Posted: Wed Jan 07, 2004 9:26 pm Post subject: Pear DB with PHP and SMARTY |
|
|
here is line 10:
Code: |
$mainQueryResult = $db->query($sql);
|
the code is fine, because it works on my local machine.
For some reason the pear/db/common.php is not being recognized in the path.
Paul |
|
Back to top |
|
lean4huskytop Smarty Regular
Joined: 19 Aug 2003 Posts: 41
|
Posted: Wed Jan 07, 2004 9:32 pm Post subject: Pear DB with PHP and SMARTY |
|
|
hey
well I got something here: it turns out that for some reason I cant connect to the databse:
now here is what I am getting:
DB Error: connect failed
I am going to see why I cant connect to the database.
Thanks for the links...I didnt do "error checking" for database connectivity, and since it worked on my local machine I assumed [ BAD BAD BAD ] that it would work on the life server.
Thanks ...will keep you posted... |
|
Back to top |
|
lean4huskytop Smarty Regular
Joined: 19 Aug 2003 Posts: 41
|
Posted: Wed Jan 07, 2004 9:34 pm Post subject: YOU did it |
|
|
HOLY SHI* HOLY SHI*
DUDE
you just helped me solve a 2 day dillema
JEZUZ CHRIST>>>
check out www.TrainerDirectory.net
its working....now I have to upload the rest of the code
WHAT A DRAMAA |
|
Back to top |
|
Duncan Smarty Pro
Joined: 16 Dec 2003 Posts: 166
|
Posted: Wed Jan 07, 2004 9:43 pm Post subject: |
|
|
You are welcome |
|
Back to top |
|
|