[solved] Help with removing displayed PHP code [solved] Help with removing displayed PHP code
 

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

[solved] Help with removing displayed PHP code

Started by sovev, June 29, 2004, 01:29:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sovev

I'm a complete PHP novice so you'll have to humour me.

I've just installed coppermine and now at the bottom of every page I have weird PHP code displayed. Can anyone suggest how to hide this code?

See for yourselves at http://www.sovev.com/copper/

Thanks in advance.

The code is:

flush(); break; } } pagefooter(); ob_end_flush(); // Speed-up the random image query by 'keying' the image table if (time() - $CONFIG['randpos_interval'] > 86400) { $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1"); $nbEnr = mysql_fetch_array($result); mysql_free_result($result); $pic_count = $nbEnr[0]; $granularity = floor($pic_count / RANDPOS_MAX_PIC); $result = db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET randpos = ROUND(RAND()*$granularity) WHERE 1"); $result = db_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '" . time() . "' WHERE name = 'randpos_interval'"); } ?>

Joachim Müller

did you edit any files before uploading them to your server? If not, one (or more) of your files got corrupted during upload. Just get a fresh coppermine package and upload it (overwrite the existing files) - don't worry, nothing will break. Make sure you choose the right ftp-mode during upload.

GauGau

sovev

Quote from: GauGau on June 29, 2004, 07:12:57 PM
Just get a fresh coppermine package and upload it (overwrite the existing files) - don't worry, nothing will break. Make sure you choose the right ftp-mode during upload.

Thanks for the reply. If I re-upload the whole package won't that overwrite all my settings?

Also (excuse the stupid question) which ftp mode shoudl I use?

Casper

Do not overwrite the albums folder, or the include folder.  But do overwrite the files inside the include folder, EXCEOT the config.inc.php and install.lock.

You should use auto mode if your ftp program has it, or binary mode for pics, ASCII for all others.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

in fact, the coppermine packages that are being distributed don't contain the files config.inc.php nor install.lock, so it's save to replace all files.

GauGau

Casper

Yes, but I was just trying to make it clear not to just overwrite the entire folder, which would lose these files.
I made this mistake once when I first started. ;)
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

sovev