Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

GoogleMapAPI DB.php file?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
aaleach
Smarty n00b


Joined: 25 Sep 2007
Posts: 4

PostPosted: Tue Sep 25, 2007 7:06 pm    Post subject: GoogleMapAPI DB.php file? Reply with quote

In the getCache and putCache functions there is a require of another file:
Code:
require_once('DB.php');

What should be in the DB.php file?

Thanks for you help!
Andy
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Sep 25, 2007 7:26 pm    Post subject: Reply with quote

install the PHP PEAR DB package on your web server.
Back to top
View user's profile Send private message Visit poster's website
aaleach
Smarty n00b


Joined: 25 Sep 2007
Posts: 4

PostPosted: Wed Sep 26, 2007 4:44 pm    Post subject: Reply with quote

My service provider (verio) says PEAR is installed. It supposedly comes installed with php5. Is there a way I can verify that it is installed correctly (like a phpinfo() call or something)? Any other advice? Here is the page I am trying to do things on: http://clcs.securesites.net/school_search.php

If I comment out $map->setDSN(...); then things work fine (albeit slow).

FWIW I updated to the latest version of GoogleMapAPI. The reason the line numbers don't add match quite right is I added another method:
Code:

function countMarkers(){
   return(count($this->_markers));
}


Last edited by aaleach on Wed Sep 26, 2007 5:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Sep 26, 2007 4:57 pm    Post subject: Reply with quote

If this works:

Code:
require_once('DB.php');


Then I'd say PEAR is istalled correctly.
Back to top
View user's profile Send private message Visit poster's website
aaleach
Smarty n00b


Joined: 25 Sep 2007
Posts: 4

PostPosted: Wed Sep 26, 2007 5:17 pm    Post subject: Reply with quote

It doesn't. I'm on hold with Verio tech support right now. I'll let you know what I learn. Thanks for your help. I really appreciate it. Your class is awesome!
Back to top
View user's profile Send private message
aaleach
Smarty n00b


Joined: 25 Sep 2007
Posts: 4

PostPosted: Wed Sep 26, 2007 11:12 pm    Post subject: Reply with quote

Here is the reply from Verio tech support:
Quote:
Thanks for your patience in getting the database dependency for PEAR
PHP (DB.php) installed on your server. The script is now functioning;
you should be able to view "Hello World" within your test.php script
(http://161.58.198.166/test.php).

As I stated over the phone earlier, I installed DB.php on your server
by uploading the file PEAR DB package on your server. I obtained the
package from http://pear.php.net/package/DB.

I uploaded the file to your /tmp directory, and then inflated the
zipped file using the command

tar -xzvf DB-1.7.13.tgz

As your other PHP files are located within the /usr/local/php5/lib/php
directory, I copied DB-1.7.13 to this directory. Within the DB-1.7.13,
I also found the DB.php, which I then moved up to the php root
directory (/usr/local/php5/lib/php).

Finally, I modified your script to include the full path of the DB.php from

require_once('/DB.php')

to

require_once('/usr/local/php5/lib/php/DB.php');

You will need to include the full path to DB.php for additional references.

If you need additional assistance or have further questions, please
contact us anytime. We look forward to hearing back from you.

So I went into the class and changed all the require_once('DB.php') calls to require_once('/usr/local/php5/lib/php/DB.php'). Now I get this error:
Code:
DB Error: not found

I double and triple checked to make sure that I was using the correct database username, password, dabasename, and host. Any suggestions? This must be some silly server thing because I have it running like a dream on another Verio server.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Sep 27, 2007 3:18 am    Post subject: Reply with quote

Try using PEAR DB to connect to your database with your own test PHP script. Once you get that working, come back to the GoogleAPI class. I'm doubting it is the class. Also, Google for the error message, you might find the answer.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP