14. august 2008 - 15:16Der er
4 kommentarer og 1 løsning
PHPRecipebook opsætningsproblem
Hej
Jeg er 2tal newbie på PHP, men jeg har taget chancen og vil nu prøve at installere PHP Recipebook
Jeg får denne fejl: Parse error: syntax error, unexpected T_STRING in E:\vhosts\**************\subdomains\mad\httpdocs\custom_inc.php on line 20
Og min custom_inc.php ser sådan ud.
<?php /* This is the custom config file for PHPRecipeBook. Put the values you wish to customize in this file. The values that should work for a default install are pulled in from includes/config_inc.php. You can look at that file for possible values you can put in this one. Any values put in this file will override config_inc.php */
################################## ## Directory Settings ## ################################## // Set the path information (Leaving these commented out should work) //global $g_rb_basedir, $g_rb_baseurl; $g_rb_basedir = "/var/www/html/"; $g_rb_baseurl = "/";
// If you change the default paths above uncomment these //global $g_sm_adodb, $g_sm_phpmailer; //$g_sm_dir = $g_rb_basedir . "libs/phpsm/"; //$g_sm_url = $g_rb_baseurl . "libs/phpsm/"; $g_sm_adodb = "/var/www/shared/libs/adodb/adodb.inc.php"; $g_sm_phpmailer = "/var/www/shared/libs/phpmailer/class.phpmailer.php";
// Make sure these email settings are valid otherwise the new users will not get their passwords global $g_sm_admin_email, $g_sm_admin_name, $g_sm_email_hosts; $g_sm_admin_email = "localhost@mail.dk"; // set the system email address $g_sm_admin_name = "PHPRecipeBook Manager"; // name of admin in emails $g_sm_email_hosts = "smtp.********.dk"; // set the smtp hosts to use for mailing (you could use sendmail if you wanted).
// Set the Theme global $g_rb_theme; $g_rb_theme="default";
############################################# ## Database Connection options (required) ## ############################################# /* Select one type: (mysql,postgres) see adodb readme files for more options */ global $g_rb_database_type, $g_rb_database_host, $g_rb_database_name, $g_rb_database_user, $g_rb_database_password;
// Example MySQL settings $g_rb_database_type = "mysql"; $g_rb_database_host = "mysql.xxxxx.dk"; $g_rb_database_name = "xxxxxxxxx"; $g_rb_database_user = "xxxxxxxxxxxx"; $g_rb_database_password = "xxxxxxxxxxxxx";
?>
----------------- Mit spørgsmål går på om det basedir, der er fejlen eller jeg skal hen og kigge på database host navn, mangler der en port betegnelse?
Jeg bruger Mysql klient 5.0.32 og PHP 4/5, står der hos min udbyder....
En løsning ville være fed at få, men også gerne lidt baggrund så jeg forstår.
<?php /* This is the custom config file for PHPRecipeBook. Put the values you wish to customize in this file. The values that should work for a default install are pulled in from includes/config_inc.php. You can look at that file for possible values you can put in this one. Any values put in this file will override config_inc.php */
################################## ## Directory Settings ## ################################## // Set the path information (Leaving these commented out should work) global $g_rb_basedir, $g_rb_baseurl; $g_rb_basedir = "E:/vhosts/gojserne.dk/subdomains/mad/httpdocs/"; $g_rb_baseurl = "";
// If you change the default paths above uncomment these global $g_sm_adodb, $g_sm_phpmailer; $g_sm_dir = $g_rb_basedir . "libs\phpsm\"; $g_sm_url = $g_rb_baseurl . "libs\phpsm\"; //$g_sm_adodb = "/var/www/shared/libs/adodb/adodb.inc.php"; //$g_sm_phpmailer = "/var/www/shared/libs/phpmailer/class.phpmailer.php";
// Make sure these email settings are valid otherwise the new users will not get their passwords global $g_sm_admin_email, $g_sm_admin_name, $g_sm_email_hosts; $g_sm_admin_email = "mette@gojserne.dk"; // set the system email address $g_sm_admin_name = "PHPRecipeBook Manager"; // name of admin in emails $g_sm_email_hosts = "smtp.firebee.dk"; // set the smtp hosts to use for mailing (you could use sendmail if you wanted).
// Set the Theme global $g_rb_theme; $g_rb_theme="default"; ############################################# ## Database Connection options (required) ## ############################################# /* Select one type: (mysql,postgres) see adodb readme files for more options */ global $g_rb_database_type, $g_rb_database_host, $g_rb_database_name, $g_rb_database_user, $g_rb_database_password;
Du skal ændre det til en af delene: $g_sm_dir = $g_rb_basedir . "libs\\phpsm\\"; $g_sm_url = $g_rb_baseurl . "libs\\phpsm\\"; Eller: $g_sm_dir = $g_rb_basedir . 'libs\phpsm\'; $g_sm_url = $g_rb_baseurl . 'libs\phpsm\';
Men hvorfor det?
Hvis du skal skrive tegnet " inde i en tekst omklamret af " kan du gøre det sådan: "Hej \"Anders\", hvordan går det?"
Backslash betyder altså at " bliver til et tegn, og ikke til slutningen af strengen.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.