FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Please can anyone help with a php script error/problem?





watersoul
Hi,

I've been trying to install Elgg on my frihost space, I'm quite proud of myself getting as far as I have so far, but I'm getting the following error messages and cant get past them as I don't really understand what its saying to me...



Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/MYFRIHOSTSPACE/public_html/share/engine/settings.php on line 2

Parse error: syntax error, unexpected T_STRING in /home/MYFRIHOSTSPACE/public_html/share/engine/settings.php on line 2



This is the php file it's referring to and when I view it its got all these strange tab tags which i'm guessing is the problem...

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\f0\fs20 <?php\par
\par
\tab /**\par
\tab * Elgg settings\par
\tab * \par
\tab * Elgg manages most of its configuration from the admin panel. However, we need you to\par
\tab * include your database settings below.\par
\tab * \par
\tab * @todo Turn this into something we handle more automatically. \par
\tab */\par
\par
\tab\tab global $CONFIG;\par
\tab\tab if (!isset($CONFIG))\par
\tab\tab\tab $CONFIG = new stdClass;\par
\par
\tab /*\par
\tab * Standard configuration\par
\tab * \par
\tab * You will use the same database connection for reads and writes.\par
\tab * This is the easiest configuration, and will suit 99.99% of setups. However, if you're\par
\tab * running a really popular site, you'll probably want to spread out your database connections\par
\tab * and implement database replication. That's beyond the scope of this configuration file\par
\tab * to explain, but if you know you need it, skip past this section. \par
\tab */\par
\tab\tab\par
\tab\tab // Database username\par
\tab\tab\tab $CONFIG->dbuser = 'share';\par
\tab\tab\tab\par
\tab\tab // Database password\par
\tab\tab\tab $CONFIG->dbpass = 'MYPASSWORD';\par
\par
\tab\tab // Database name\par
\tab\tab\tab $CONFIG->dbname = 'MYDATABASENAME';\par
\tab\tab\tab\par
\tab\tab // Database se\par
}




I saved the file like this (and it looks like this on my computer when read in wordpad)...



<?php

/**
* Elgg settings
*
* Elgg manages most of its configuration from the admin panel. However, we need you to
* include your database settings below.
*
* @todo Turn this into something we handle more automatically.
*/

global $CONFIG;
if (!isset($CONFIG))
$CONFIG = new stdClass;

/*
* Standard configuration
*
* You will use the same database connection for reads and writes.
* This is the easiest configuration, and will suit 99.99% of setups. However, if you're
* running a really popular site, you'll probably want to spread out your database connections
* and implement database replication. That's beyond the scope of this configuration file
* to explain, but if you know you need it, skip past this section.
*/

// Database username
$CONFIG->dbuser = 'share';

// Database password
$CONFIG->dbpass = 'MYPASSWORD';

// Database name
$CONFIG->dbname = 'MYDATABASENAME';

// Database se


...any help at all and I'll be very grateful, cheers Smile
rvec
you shouldn't use wordpad, it screws up the file.
Better use notepad, or install an editor like notepad++
watersoul
rvec wrote:
you shouldn't use wordpad, it screws up the file.
Better use notepad, or install an editor like notepad++


Wow! Thanks rvec!! Tried it and its saved properly in notepad now, got a different problem regarding credentials but i'll work on that until I'm totally stuck again as trying and failing is learning all the time! Very Happy
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.