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

Can't get Sample app (guestbook) to work

 
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 -> General
View previous topic :: View next topic  
Author Message
wmeitzen
Smarty n00b


Joined: 11 Jun 2008
Posts: 2

PostPosted: Wed Jun 11, 2008 5:41 am    Post subject: Can't get Sample app (guestbook) to work Reply with quote

Hi... Smarty and PHP newbie here! Smile

I can't seem to get the Guestbook app to work. I searched the forums, couldn't find an answer.

I can connect to the guestbook mysql db on my localhost with "user" and "password". It's on my home machine and running in a VM with IIS, so security isn't an issue.

I'm not getting an error message, it just quits on the "$this" line in guestbook_setup.php: (I added a couple of lines to debug.)
$dsn = 'mysql://user:password@localhost/guestbook';
echo "got here.21<br>";
$this->connect($dsn) || die('could not connect to database');
echo "got here.22<br>";

It shows "got here.21", but never shows "got here.22". I've tried single and double quotes around the $dsn connection info, too. I'm not getting an error message ... it just ends. Nothing. Zilch.

Does ANYONE have a suggestion?
Back to top
View user's profile Send private message
Celeb
Administrator


Joined: 17 Apr 2007
Posts: 1025
Location: Vienna

PostPosted: Wed Jun 11, 2008 6:47 am    Post subject: Reply with quote

First try to turn on error reporting and see if there are any error messages:
Code:
ini_set('display_errors', 1);
error_reporting(E_ALL);

_________________
Darn computers always do what I tell them to instead of what I want them to do.
Back to top
View user's profile Send private message
wmeitzen
Smarty n00b


Joined: 11 Jun 2008
Posts: 2

PostPosted: Thu Jun 12, 2008 4:39 am    Post subject: Tried enabling errors, no difference Reply with quote

I added those lines, but nothing different happened:

Code:
ini_set('display_errors', 1);
error_reporting(E_ALL);

// database configuration
class GuestBook_SQL extends SQL {
    function GuestBook_SQL() {
        // dbtype://user:pass@host/dbname
        $dsn = "mysql://user:password@localhost/guestbook";
      echo "got here.21<br>";
        $this->connect($dsn) || die('could not connect to database');
      echo "got here.22<br>";
    }       
}
Back to top
View user's profile Send private message
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 -> General 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