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: How to upload htm or html files?  (Read 5949 times)

0 Members and 1 Guest are viewing this topic.

nico2mars

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
How to upload htm or html files?
« on: August 02, 2004, 04:42:31 pm »

Hello, i'm a french users of coppermine gallery.
i have just a little problem : i can't upload htm or html files and coppermine says "Extension de fichier incorrect." (in english : "wrong extension files")...
help me please!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to upload htm or html files?
« Reply #1 on: August 02, 2004, 05:00:29 pm »

you mustn't enable html-file upload if you allow users to upload files, as this is a high security risk. If you as admin are the only one who can upload at all, you can add html files to the list of files that are allowed to be uploaded as documents. To accomplish this, you will need a tool like phpMyAdmin or similar that let's you edit the database. With phpMyAdmin, browse the coppermine table cpgXXX_filetypes and add an entry with this content:
extension: html | mime: text/html  | content: document.
You might repeat this step with the extension "htm" as well.

I repeat: you should only enable html uploads if you have made sure that you're the only one to upload files to your coppermine page at all. Only upload html files that are known-good (that don't contain harmfull scripts and have absulte image and css paths - relative paths will display broken html pages). You have been warned!

GauGau
Logged

nico2mars

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: How to upload htm or html files?
« Reply #2 on: August 02, 2004, 05:02:45 pm »

ok!
i will try immediatly
thank you
Logged

nico2mars

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: How to upload htm or html files?
« Reply #3 on: August 02, 2004, 06:52:26 pm »

hello!
i have done what you said.
but now at the top of index.php :
Notice: Undefined index: document. in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: document. in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38



what can i do?
thank you
Logged

Nibbler

  • Guest
Re: How to upload htm or html files?
« Reply #4 on: August 02, 2004, 07:31:17 pm »

Don't include the . at the end of document.
Logged

nico2mars

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: How to upload htm or html files?
« Reply #5 on: August 02, 2004, 08:52:05 pm »

thank you now it's working!
but how can i delete the line at the top of the page :
Notice: Undefined index: document. in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: document. in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

thank you
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: How to upload htm or html files?
« Reply #6 on: August 02, 2004, 08:53:22 pm »

Have you got debug mode turned on?  Just turn it off in config, the notices should go away.
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

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Re: How to upload htm or html files?
« Reply #7 on: August 03, 2004, 07:02:48 am »

I don't understand how you're getting this error when my line 38 is:

Code: [Select]
mysql_free_result($result);
Did you edit something? or put your values in the wrong fields?...the latter is most likely the cause, since there isn't an index named "document", but you could get this error, if you put "document" in the extension field, on lines 33 or 35.


-omni
« Last Edit: August 03, 2004, 07:23:45 am by omniscientdeveloper »
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.