coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Upload => Topic started by: gooflox on February 14, 2005, 03:38:45 PM

Title: Images not uploading
Post by: gooflox on February 14, 2005, 03:38:45 PM
Images do not upload on upload.php

upload.php has following Warnings:

Warning: Undefined offset: 2 in /var/www/html/pics/upload.php on line 250
Warning: Undefined offset: 3 in /var/www/html/pics/upload.php on line 256
Warning: Undefined offset: 4 in /var/www/html/pics/upload.php on line 256

Please help...

Debug Info:
USER:
------------------
Array
(
    [ID] => 667b5ab86deb53cf3bc0d010ad187b85
    [am] => 1
    [search] => ###
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => bigsixadmin
    [user_password] => ********
    [user_lastvisit] => 2005-02-14 09:08:30
    [user_regdate] => 2005-02-12 23:36:42
    [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
(
   
Title: Re: Images not uploading
Post by: Joachim Müller on February 14, 2005, 06:21:08 PM
Don't post warnings nor debug_output, we need actual error messages. Enable debug_mode in coppermine config, disable notices_display there, set upload method to "Single file uploads only" in groups manager for all groups and then try to upload once more. Post the error message.

Joachim
Title: Re: Images not uploading
Post by: gooflox on February 14, 2005, 08:56:19 PM
Script called without the required parameter(s).

File: /var/www/html/pics/db_input.php - Line: 41
Title: Re: Images not uploading
Post by: dr_plague on February 15, 2005, 12:45:23 AM
i have the same error :(
Title: Re: Images not uploading
Post by: Joachim Müller on February 15, 2005, 06:18:58 AM
@both of you: post a link to your sites.

Joachim
Title: Re: Images not uploading
Post by: dr_plague on February 15, 2005, 06:23:51 AM
http://gallery.planeta-mma.ru
user: tester
password: tester
Title: Re: Images not uploading
Post by: Joachim Müller on February 15, 2005, 06:33:16 AM
Your post vars seem not to be populated ($HTTP_POST_VARS). Edit db_input.php and find$HTTP_POST_VARSand replace with$_POST(multiple times) if you're webhosted. If you're self-hosted: this is probably caused by the use of PHP5 without setting register_long_arrays enabled in php.ini. Change your setting accordingly.

Joachim
Title: Re: Images not uploading
Post by: dr_plague on February 15, 2005, 06:45:53 AM
I use php4
Editiong of db_inputs.php also has not corrected a bug
Title: Re: Images not uploading
Post by: Joachim Müller on February 15, 2005, 06:55:58 AM
please edit db_input.php, finddefine('IN_COPPERMINE', true);
define('DB_INPUT_PHP', true);

require('include/init.inc.php');
require('include/picmgmt.inc.php');
require('include/mailer.inc.php');
and add after itprint '<fieldset><legend>Extra debug output</legend>';
print_r($HTTP_POST_VARS);
print '</fieldset>';
and post the extra output here.

Joachim
Title: Re: Images not uploading
Post by: dr_plague on February 15, 2005, 07:02:20 AM

print '<fieldset><legend>Extra debug output (HTTP_POST_VARS)</legend>';
print_r($HTTP_POST_VARS);
print '</fieldset>';

print '<fieldset><legend>Extra debug output (_POST)</legend>';
print_r($_POST);
print '</fieldset>';


Script called without the required parameter(s).

File: /home/planeta-gallery/public_html/db_input.php - Line: 49


Extra debug output (HTTP_POST_VARS) Array ( )
Extra debug output (_POST) Array ( ) 

Title: Re: Images not uploading
Post by: Joachim Müller on February 15, 2005, 07:05:40 AM
Has your webhost disabled post vars for you (paranoid security settings)? Those server vars are used to hand over content from one page to another. Without them, you can not use coppermine with http uploads. You could however use ftp-uploads and batch-add (that's the recommended method for coppermine admins anyway).
Are you webhosted or selfhosted?

Joachim
Title: Re: Images not uploading
Post by: dr_plague on February 15, 2005, 07:08:19 AM
i`m selfhosted
Title: Re: Images not uploading
Post by: Joachim Müller on February 15, 2005, 07:19:12 AM
hm, then you better review your server setup imo. At least you don't have to shout at your webhost ;)

Joachim
Title: Re: Images not uploading
Post by: dr_plague on February 15, 2005, 07:46:03 AM
The problem consists that the server for any reason does not process the data transferred with enctype = "multipart/form-data"
Title: Re: Images not uploading
Post by: Joachim Müller on February 15, 2005, 08:13:28 AM
the places to check are php.ini and apache.conf

Joachim
Title: Re: Images not uploading
Post by: dr_plague on February 15, 2005, 08:43:38 AM
The problem is solved. PHP for any reason regarded a line "file_uploads = On" as forbidding uploading of files. As soon as I have replaced it on "file_uploads = 1" - all has earned
Title: Re: Images not uploading
Post by: Joachim Müller on February 15, 2005, 09:02:25 AM
@dr_plague: OK, glad to hear you were able to solve this - thanks for returning and posting your solution.
@gooflox: does this solve your issues as well?

Joachim
Title: Re: Images not uploading
Post by: gooflox on February 15, 2005, 03:24:41 PM
Yes -- thanks.  The php.ini file had file_uploads=Off.  Changed it to file_uploads=1 (not "On"), rebooted the server and it worked great.

Thanks for the help!!