i tried to show the latest entries in an external page (this external is build on an smarty framework).
i inserted this code:
Code: Select all
{php}
// 1: Switch to the Serendipity path
chdir('/usr/local/apache2/htdocs/admin/*****/****/blog');
// 2: Start the Serendipity API
include('serendipity_config.inc.php');
// 3: Start Smarty templating
serendipity_smarty_init();
// 4: Get the latest entries
$entries = serendipity_fetchEntries(null, true,
$serendipity['fetchLimit']);
// 5: Put all the variables into Smarty
serendipity_printEntries($entries);
// 6: Get the template file
$tpl = serendipity_getTemplateFile('entries.tpl',
'serendipityPath');
// 7: Format and output the entries
$serendipity['smarty']->display($tpl);
// 8: Go back to where you came from
chdir('..');
{/php}Code: Select all
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'httpd'@'localhost' (using password: NO) in /usr/local/apache2/htdocs/admin/*****/****/blog/include/db/mysql.inc.php on line 263
serendipity error: unable to connect to database - exiting.
The blog works really fine (so db acces works).
Garvin just told me that it could be that i did not loaded the s9y framework corecctly.
Maybe someone could help?
Thanks in advance