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'"); } ?>
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
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?
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.
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
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. ;)
:) Thanks - it worked a treat!