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: Cannot upload eps file  (Read 6067 times)

0 Members and 1 Guest are viewing this topic.

Torgull90

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Cannot upload eps file
« on: December 02, 2004, 06:30:15 pm »

Hi everybody,
When I try to upload a eps file, I have an error "Forbidden file extension". I use ImageMagick and I know it's working well because I use for an other apllication.
The debug info message is the following:

SER:
------------------
Array
(
    [ID] => 933697d1d2864f7b6113120165e95e60
    [am] => 1
    [liv] => Array
        (
           
  • => 8
  • [1] => 13
                [2] => 2
                [3] => 3
                [4] => 1
            )

       
[sort] => na
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => admin
    [user_password] => ********
    [user_lastvisit] => 2004-12-02 16:40:06
    [user_regdate] => 2004-12-02 16:20:35
    [user_group_list] =>
    [user_email] =>
    [user_website] =>
    [user_location] =>
    [user_interests] =>
    [user_occupation] =>
    [user_actkey] =>
    [user_favpics] =>
    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
    [groups] => Array
        (
            [1] => 1
        )

)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content FROM cpg132_filetypes;
  • [1] => SELECT * FROM cpg132_users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '0379004c3e3dce82b21fc0f61335e0b5'
        [2] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg132_usergroups WHERE group_id in (1)
        [3] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 1
        [4] => DELETE FROM cpg132_banned WHERE expiry < 1102008258
        [5] => SELECT * FROM cpg132_banned WHERE ip_addr='192.168.0.246' OR ip_addr='192.168.0.246' OR user_id=1
    )

    ==========================
    GET :
    ------------------
    Array
    (
    )

    ==========================
    POST :
    ------------------
    Array
    (
       
[URI_array] => Array
        (
           
  • =>
  • [1] =>
                [2] =>
            )

       
[control] => phase_1
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.9 - OK
------------------
mySQL version: 3.23.58
------------------
Coppermine version: 1.3.2
==========================
Module: gd
------------------
module doesn't exist
==========================
Module: mysql
------------------
Active Persistent Links 1
Active Links 2
Client API version 3.23.58
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.1.2
Linked Version 1.2.1.2
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/share/pear | .:/usr/share/pear
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 20M | 20M
post_max_size | 8M | 8M
==========================
Page generated in 0.06 seconds - 6 queries in 0.002 seconds - Album set :

thks
« Last Edit: December 03, 2004, 01:40:34 pm by GauGau »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Cannot upload eps file
« Reply #1 on: December 02, 2004, 08:42:49 pm »

eps is not a filetype GD or imagemagick can handle, so it cannot be uploaded as a usual image.  It can be uploaded though, by treating it as a 'document'.  It will not have a thumbnail created by this method, so you can upload a thumb at the same time, by ftp, into the same folder.  See the 'using custom thumbs' thread for exact details.

How to do it;
You need to add eps to the accepted filetypes in your database.  The easiest way, is to add the following code to the bottom of your update.sql file in the sql folder;

Code: [Select]
INSERT INTO CPG_filetypes VALUES ('eps', 'image/eps', 'document');
When you have uploaded the updated file onto your server, browse to your update.php, and your database will be done.

That's it, you should now be able to upload eps files.

Important note;  never, ever, use this method to allow uploads of any type of filetype than can be use to execute a script.  Never allow html, js, php, etc.
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

Torgull90

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Cannot upload eps file
« Reply #2 on: December 03, 2004, 11:27:11 am »

Thanks you very much that's working now.

 :D
Logged

smegf0rbrains

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Cannot upload eps file
« Reply #3 on: April 26, 2005, 11:11:05 am »

I have tried this for 3gp and mp4, but can't seem to get it to work. would a line of code like this work;

INSERT INTO CPG_filetypes VALUES ('3gp', 'video/3gp', 'document');

Or do i need to do something extra after replacing the original update.php file with my modified file?

thanks for any help
Logged

Nibbler

  • Guest
Re: Cannot upload eps file
« Reply #4 on: April 26, 2005, 01:46:56 pm »

You don't edit update.php. You add the line at the bottom of update.sql and then browse to update.php with your web browser.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.