Help please! config.inc.php parse error during upgrade 1.4.10 to 1.5.42 Help please! config.inc.php parse error during upgrade 1.4.10 to 1.5.42
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Help please! config.inc.php parse error during upgrade 1.4.10 to 1.5.42

Started by pict, August 01, 2016, 08:54:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pict

Trying to upgrade a 1.4.10 installation that doesn't run under PHP 5.6. I am moving hosts - the old one ran PHP 5.2 and I had no issues. The new host uses PHP 5.6 and the script fails with multiple errors. I recreated the database at the new host but wasn't allowed the same database name and database username as the old host, so I edited config.inc.php with the new names (I'd FTP'd the CPG folder with the 1.4.10 install over to the new host as well obviously). I then FTP'd over all the CPG 1.5.42 files, overwriting everything in the old install files with the exception of the albums folder and anycontent.php and tried running the update.php script. I got this error message...

Parse error: syntax error, unexpected ''; // Your mysql userna' (T_CONSTANT_ENCAPSED_STRING) in /home1/pictdesi/public_html/adrianlaycock/pictures/include/config.inc.php on line 7

My config.inc.php file contents are this:

<?php
// Coppermine configuration file

// MySQL configuration
$CONFIG['dbserver'] =                         'localhost';        // Your database server
$CONFIG['dbuser'] =                         'xxxxx';        // Your mysql username
$CONFIG['dbpass'] =                         'yyyyy';                // Your mysql password
$CONFIG['dbname'] =                         'zzzzz';        // Your mysql database name


// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] =                'cpg1410_';
?>


Any ideas what's up? Thanks in advance for any pointers. Cheers, John

EDITED TO REMOVE DB USERNAME AND PASSWORD
NEVER POST THOSE DETAILS IN PUBLIC


pict

I was editing the config.inc.php file (on a Mac) using TextEdit.app in plain text mode. Also was trying using Dreamweaver. Both seem to be corrupting the file. Solution for me was to download and install TextWrangler.app. I edited a known uncorrupted config.inc.php with this editor and ran update.php again. Script ran without issue.

klewless

I second your recommendation heartily. Text Wrangler is great on Macs. It has awesome features and is really fast to upload and download.

8)

pict

Good to know it was a reasonable choice. Is BBEdit worth taking a look at for a mac do you know?

pict

Just noticed the details edited on the OP. Just to let you know they were already faked.