coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Upload => Topic started by: nico2mars on August 02, 2004, 04:42:31 PM

Title: How to upload htm or html files?
Post by: nico2mars 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!
Title: Re: How to upload htm or html files?
Post by: Joachim Müller 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
Title: Re: How to upload htm or html files?
Post by: nico2mars on August 02, 2004, 05:02:45 PM
ok!
i will try immediatly
thank you
Title: Re: How to upload htm or html files?
Post by: nico2mars 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
Title: Re: How to upload htm or html files?
Post by: Nibbler on August 02, 2004, 07:31:17 PM
Don't include the . at the end of document.
Title: Re: How to upload htm or html files?
Post by: nico2mars 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
Title: Re: How to upload htm or html files?
Post by: Casper 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.
Title: Re: How to upload htm or html files?
Post by: omniscientdeveloper on August 03, 2004, 07:02:48 AM
I don't understand how you're getting this error when my line 38 is:

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