XF 1.5 Test site issue

oman

Well-known member
I ran into an issue when using the guide by Brogan to create a separate test site. Normally it works, but this one threw an error I have not seen before:


Parse error: syntax error, unexpected 'db' (T_STRING) in /home/xxxxx/public_html/url.com/oman1/library/config.php on line 6

I followed each step - copied and imported the database, copied the files over.

Can you suggest what I might have done wrong this time?
 
The format of the password line is as follows:

Code:
$config['db']['password'] = 'PasswordGoesHere';

That is line 6, and it is just the password placed where the old one used to be. Did I miss something in that line?
 
The error could be before that line or there could actually be an invisible character that got inserted by your editor (I've seen that happen once). What's the whole thing (with sensitive bits replaced)?
 
Code:
<?php

$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';
$config['db']['username'] = 'blah_username11’;
$config['db']['password'] = 'pwgoeshere';
$config['db']['dbname'] = 'blah_db1234’;


$config['superAdmins'] = '1';

//$config['enableListeners'] = 0;
 
Code:
$config['db']['username'] = 'blah_username11’;
That's a "smart quote" at the end of the line.

It's on the DB name line as well.
 
Code:
$config['db']['username'] = 'blah_username11’;
That's a "smart quote" at the end of the line.

It's on the DB name line as well.

Ah okay that explains it.

I was doing it on the mac textedit program. Is that known to commonly to do that?
 
Thank you all. I recently started using a Mac, so I hadn't really had a chance to install much other than the default so far.

Notepad ++ was a good one I used in Windows. Thank you @Martok - another one to add to the list to install.
 
Thank you all. I recently started using a Mac, so I hadn't really had a chance to install much other than the default so far.

Notepad ++ was a good one I used in Windows. Thank you @Martok - another one to add to the list to install.
You can also do code comparison between two files (which you can't with Textedit) which is really useful when editing templates, especially when you have to revert a template and then add back customisations. It can do a myriad of other things too. Well worth installing.
 
You can also do code comparison between two files (which you can't with Textedit) which is really useful when editing templates, especially when you have to revert a template and then add back customisations. It can do a myriad of other things too. Well worth installing.

Is that TextWrangler you are talking about? I'll have to try that. Currently I'm using Diffmerge on mac for file comparison.
 
Yes, TextWrangler has this find differences feature. It also has comparison, multi-file search, multiple windows and a host more stuff.
Does it do closed file find and replace (I've been using JeditX for this but seems a bit clunky, although good for other stuff like link checking, html validation and beautifying, not that i do much html these days.
 
Does it do closed file find and replace (I've been using JeditX for this but seems a bit clunky, although good for other stuff like link checking, html validation and beautifying, not that i do much html these days.
Yes it does, as @Mouth has linked to. I also just did a closed file find and replace before I saw his link. :)
 
Back
Top Bottom