Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [solved] Help with removing displayed PHP code  (Read 4410 times)

0 Members and 1 Guest are viewing this topic.

sovev

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
[solved] Help with removing displayed PHP code
« on: June 29, 2004, 01:29:13 pm »

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'"); } ?>
« Last Edit: June 30, 2004, 08:43:10 pm by Casper »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Help with removing displayed PHP code
« Reply #1 on: June 29, 2004, 07:12:57 pm »

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
Logged

sovev

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Help with removing displayed PHP code
« Reply #2 on: June 30, 2004, 11:50:27 am »

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?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Help with removing displayed PHP code
« Reply #3 on: June 30, 2004, 12:57:25 pm »

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.
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Help with removing displayed PHP code
« Reply #4 on: June 30, 2004, 05:10:24 pm »

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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Help with removing displayed PHP code
« Reply #5 on: June 30, 2004, 06:12:45 pm »

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. ;)
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Help with removing displayed PHP code
« Reply #6 on: June 30, 2004, 07:40:51 pm »

 :) Thanks - it worked a treat!
Logged
Pages: [1]   Go Up
 

Page created in 0.089 seconds with 17 queries.