I'm trying to include zenphoto template functions in an external website, like described here:
http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-pluginZenphoto ends up throwing this error at me:
Zenphoto Error
MySQL Error: Zenphoto could not connect to the database server. Check your zp-config.php file for the correct host, user name, and password. Note that you may need to change the host from localhost if your web server uses a separate MySQL server, which is common in large shared hosting environments like Dreamhost and GoDaddy. Also make sure the server is running, if you control it.
Backtrace:
in db_connect (functions-db.php [64])
in query (functions-db.php [120])
in query_full_array (functions.php [104])
in getoption (functions.php [41])
in require_once (functions-db.php [5])
in require_once (auth_zp.php [3])
in require_once (classes.php [6])
in require_once (template-functions.php [10])
in require_once (header.php [45])
in require_once (theme.php [472])
in load_template (general-template.php [8])
in get_header (page.php [1])
in include (template-loader.php [34])
in require_once (wp-blog-header.php [20])
in require (index.php [4])
The exact syntax I'm using is this:
define('ZENFOLDER', 'zp-core');
define('WEBPATH', '/home/petruzzo/public_html/staging/zp/');
require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");
I've already checked the config file for zenphoto and I know the information is correct. Plus, the installation of zenphoto works fine on its own. For what it's worth, I'm attempting to run the include on a wordpress site. Both the wordpress site and zenphoto site are in the same database.
Anyone know what's going on here?
Comments