Big files won't upload - I'm asked to save .php files Big files won't upload - I'm asked to save .php files
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Big files won't upload - I'm asked to save .php files

Started by AvrilBoi, October 07, 2006, 10:24:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AvrilBoi

Hi!
I've already read the upload troubleshooting guide, but didn't find any solution.
This is my problem:
if I upload big files  (about 700 KB), they do are uploaded, and I do get the message
"X files were uploaded. Continue"
But here is the problem: when I click on "Continue" I'm asked to save upload.php on my local disk.
Same thing happens if I use the admin batch upload tool after I've uploaded by ftp: i don't get OK, or DP, or PB or NA, but I do get nothing... and when I click on this "nothing" to view the php message... I'm asked to save on my disk addpic.php
If I save upload.php or addpic.php, theese are blank.
I'm using GD and this problem came out suddenly... I didn't modify anything... I run the gallery since a good time, and I've never had this problem..
Here are my debug informations, for example after I've batch uploaded and I should click on the X to view the php error messages:
USER:
------------------
Array
(
    [ID] => f73b10d4dd9a9f0d76c30113f1deeea9
    [am] => 1
    [lang] => italian
    [liv] => Array
        (
            [0] => 1104
            [1] => 1102
            [2] => 1908
            [3] => 1909
        )

    [lap] => 1
    [search] => Array
        (
            [search] => set
            [album] => search
            [plugin_search_album] => true
            [title] => on
            [newer_than] =>
            [caption] => on
            [older_than] =>
            [keywords] => on
            [type] => AND
            [album_title] => on
            [album_description] => on
            [params] => Array
                (
                    [title] => on
                    [caption] => on
                    [keywords] => on
                )

        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 3
    [user_name] => AvrilUppy
    [groups] => Array
        (
            [0] => 1
        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 0
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 30
    [num_URI_upload] => 30
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 0
    [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
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg146_filetypes; (0s)
    [1] => select * from cpg146_plugins order by priority asc; (0s)
    [2] => delete from `cpg`.cpg146_sessions where time<1160247533 and remember=0; (0s)
    [3] => delete from `cpg`.cpg146_sessions where time<1159041533; (0s)
    [4] => select user_id from `cpg`.cpg146_sessions where session_id=md5("5d0b8ed203b23c17235edba0838c18630f53a4b7fb5d1c7d5c8fba9f5a18dc93"); (0s)
    [5] => select user_id as id, user_password as password from `cpg`.cpg146_users where user_id=3 (0s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `cpg`.cpg146_users AS u INNER JOIN `cpg`.cpg146_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='3' (0s)
    [7] => SELECT user_group_list FROM `cpg`.cpg146_users AS u WHERE user_id='3' and user_group_list <> ''; (0s)
    [8] => 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 cpg146_usergroups WHERE group_id in (1) (0s)
    [9] => SELECT group_name FROM  cpg146_usergroups WHERE group_id= 1 (0s)
    [10] => update `cpg`.cpg146_sessions set time='1160251133' where session_id=md5('5d0b8ed203b23c17235edba0838c18630f53a4b7fb5d1c7d5c8fba9f5a18dc93'); (0s)
    [11] => SELECT user_favpics FROM cpg146_favpics WHERE user_id = 3 (0s)
    [12] => SHOW TABLES LIKE 'cpg146_cms_config' (0s)
    [13] => SELECT * FROM cpg146_cms_config (0s)
    [14] => DELETE FROM cpg146_mod_online WHERE last_action < NOW() - INTERVAL 1 MINUTE (0s)
    [15] => REPLACE INTO cpg146_mod_online (user_id, user_name, user_ip, last_action) VALUES ('3', 'AvrilUppy', '87.2.85.6', NOW()) (0s)
    [16] => SELECT * FROM cpg146_final_extract_config (0s)
    [17] => DELETE FROM cpg146_banned WHERE expiry < '2006-10-07 19:58:53' (0s)
    [18] => SELECT * FROM cpg146_banned WHERE (ip_addr='87.2.85.6' OR ip_addr='87.2.85.6' OR user_id=3) AND brute_force=0 (0s)
    [19] => SELECT aid, title FROM cpg146_albums WHERE 1 (0s)
    [20] => SELECT COUNT(*) FROM cpg146_pictures WHERE approved = 'NO' (0s)
)

==========================
GET :
------------------
Array
(
    [insert] => 1
)

==========================
POST :
------------------
Array
(
    [d0000] => 171
    [pics] => Array
        (
            [0] => i0000
            [1] => i0001
            [2] => i0002
            [3] => i0003
            [4] => i0004
            [5] => i0005
            [6] => i0006
            [7] => i0007
            [8] => i0008
            [9] => i0009
        )

    [album_lb_id_i0000] => d0000
    [picfile_i0000] => YXJlYSBuaWdodGNsdWIgb3BlbmluZyBzZXB0ZW1iZXIgMjggMjAwNi8zODc2OV80NTFkZWYyMmE5MTA3ODk3ODMzMzM1XzEyMl81NjFsby5qcGc=
    [album_lb_id_i0001] => d0000
    [picfile_i0001] => YXJlYSBuaWdodGNsdWIgb3BlbmluZyBzZXB0ZW1iZXIgMjggMjAwNi8zODg0NF80NTFkZWYyNTYwOWY3MTgzODE2NTgzXzEyMl81MjZsby5qcGc=
    [album_lb_id_i0002] => d0000
    [picfile_i0002] => YXJlYSBuaWdodGNsdWIgb3BlbmluZyBzZXB0ZW1iZXIgMjggMjAwNi8zODkwOV80NTFkZWYyN2JlOWY3NTUwMDc3MTY4XzEyMl81Njdsby5qcGc=
    [album_lb_id_i0003] => d0000
    [picfile_i0003] => YXJlYSBuaWdodGNsdWIgb3BlbmluZyBzZXB0ZW1iZXIgMjggMjAwNi8zODk2MF80NTFkZWYyYTM2ODcxODI4MjUyNDk2XzEyMl81NTlsby5qcGc=
    [album_lb_id_i0004] => d0000
    [picfile_i0004] => YXJlYSBuaWdodGNsdWIgb3BlbmluZyBzZXB0ZW1iZXIgMjggMjAwNi8zOTAxOV80NTFkZWYyY2UxMTBlNDA4NzY1ODA5XzEyMl8zOTBsby5qcGc=
    [album_lb_id_i0005] => d0000
    [picfile_i0005] => YXJlYSBuaWdodGNsdWIgb3BlbmluZyBzZXB0ZW1iZXIgMjggMjAwNi8zOTA2OV80NTFkZWYyZmE0ZTA3MjEyNTcwNTU4XzEyMl8zNDFsby5qcGc=
    [album_lb_id_i0006] => d0000
    [picfile_i0006] => YXJlYSBuaWdodGNsdWIgb3BlbmluZyBzZXB0ZW1iZXIgMjggMjAwNi8zOTEyMV80NTFkZWYzMjY0Yzg1NjQ4Mzg3MTMyXzEyMl80MDVsby5qcGc=
    [album_lb_id_i0007] => d0000
    [picfile_i0007] => YXJlYSBuaWdodGNsdWIgb3BlbmluZyBzZXB0ZW1iZXIgMjggMjAwNi8zOTE3MV80NTFkZWYzNTFjOGE0ODMxMTk0OTQ0XzEyMl81OTlsby5qcGc=
    [album_lb_id_i0008] => d0000
    [picfile_i0008] => YXJlYSBuaWdodGNsdWIgb3BlbmluZyBzZXB0ZW1iZXIgMjggMjAwNi8zOTIyN180NTFkZWYzN2RiYjE5OTAxNjE0MjAzXzEyMl8zMTZsby5qcGc=
    [album_lb_id_i0009] => d0000
    [picfile_i0009] => YXJlYSBuaWdodGNsdWIgb3BlbmluZyBzZXB0ZW1iZXIgMjggMjAwNi8zODY5NjQ1MWRlZjIwMzM0NGM5MjA1MjQ1NTcxMjIzNjJsb25rMi5qcGc=
    [insert] => inserisci i files selezionati
)

==========================
VERSION INFO :
------------------
PHP version: 5.0.4 - OK
------------------
mySQL version: 4.1.21
------------------
Coppermine version: 1.4.9(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support:
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 4.1.21
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 | On | 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 | /var/www/vhosts/daydreamed.net/httpdocs:/tmp | 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 | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.28 seconds - 21 queries in 0 seconds - Album set : ; Meta set: ;

Any help, any idea? Should I ask my hosting provider?

EDIT: Now I'm asked to save db_input.php right after uploading one file through upload.php
Anyway while firefox asks to save the file, internet explorer shows the "impossible to view the page" error

kegobeer

Post a link to your gallery and a test user/password.  Also, have you tried using a different computer and/or different internet connection?  Have you asked your host about this (perhaps they made some change recently)?
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

AvrilBoi

I was thinking to ask my host about this if I didn't find any solution here...
anyway, here's the link to my gallery:
http://www.daydreamed.net/gallery/
Username/password: coppermine/coppermine
You could try to upload here, for example.
Uploads have to be approved, anyway if you manage to put the files in the album, it is ok...
Remember that only big files (about 700 KB) will make the problem :(
Thanx for trying to help me ;)

kegobeer

There's no way for that user to create an album or upload files.  You must configure your users to allow uploads and personal galleries.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

AvrilBoi

I've tried, and that user can upload in every album ::)
Quote from: AvrilBoi on October 08, 2006, 12:58:38 PM
You could try to upload here, for example.

kegobeer

The only way to troubleshoot uploading is for you to follow the troubleshooting guide in the documentation.

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

AvrilBoi

#6
I've already done it but nothing useful appears... I've enabled debug messages for everyone.. so please give it a try now....
anyway, I've discovered that the problem isn't related to size in KB, but it is related to the width and height of the image! For example, a 2200 x 3300 pixels image of 522 KB (like this) won't upload, while a 1578 x 2160 pixels image of 615 KB (like this) will upload...
In the settings of coppermine files i've set 1000000000 as maximum image width and height, anyway it shouldn't change anything because if an image passes the limits an error message should be showed... and in my case no messages are showed.

kegobeer

There's nothing you can do, unless you have complete control over the server and can change PHP memory allotments.  I've posted this quite a few times: it takes a huge amount of resources to resize very large dimension images.  GD simply runs out of memory while trying to resize huge images.  Ask your host to increase PHP memory, or try using ImageMagick.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

AvrilBoi

Ok, thanks...
I have imagemagick, but I have safe mode on, and imagemagick runs only with safe mod off O___O
Should I ask my host why imagemagick is present while safe mode is on?

kegobeer

Why not ask your host to increase the PHP memory allotment?  The worst they can say is "no".  Also, ImageMagick should work all the time, unless exec is disabled.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

AvrilBoi

This is an error I get when using imagemagick:
/include/picmgmt.inc.php
   * Warning line 219: shell_exec() [function.shell-exec]: Cannot execute using backquotes in Safe Mode
where line 219 is:
$output = `$cmd 2>&1`;
So is there a way to avoid using backquotes in that line?

kegobeer

Nope.  Since exec is disabled, you must use GD.  The only thing you can do is ask your host to increase PHP's memory allotment.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

AvrilBoi

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg162.imageshack.us%2Fimg162%2F9618%2Fappunti01lp9.gif&hash=8400cd08e0120ee63896faf1f2dc3dffe9aac6ef)
This is the result of the installation of a script and it says safe mode ON, exec allowed...
So it seems that exec is not disabled, it should be just a backquotes problem with exec... no one can help me before I ask my webhost?

Joachim Müller


AvrilBoi

I don't know how, but my host solved the problem and now I can use imagemagick without problems.