|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
wmeitzen Smarty n00b
Joined: 11 Jun 2008 Posts: 2
|
Posted: Wed Jun 11, 2008 5:41 am Post subject: Can't get Sample app (guestbook) to work |
|
|
Hi... Smarty and PHP newbie here!
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 |
|
Celeb Administrator
Joined: 17 Apr 2007 Posts: 1025 Location: Vienna
|
Posted: Wed Jun 11, 2008 6:47 am Post subject: |
|
|
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 |
|
wmeitzen Smarty n00b
Joined: 11 Jun 2008 Posts: 2
|
Posted: Thu Jun 12, 2008 4:39 am Post subject: Tried enabling errors, no difference |
|
|
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 |
|
|
|
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
|