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
(
- => 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) = '9d4cfa24bce1c52073b25242ca636e32'
[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 < 1108391370
[5] => SELECT * FROM cpg132_banned WHERE ip_addr='198.17.175.4' OR ip_addr='198.17.175.4' OR user_id=1
)
==========================
GET :
------------------
Array
(
)
==========================
POST :
------------------
Array
(
)
==========================
VERSION INFO :
------------------
PHP version: 4.1.2 - OK
------------------
mySQL version: 3.23.54
------------------
Coppermine version: 1.3.2
==========================
Module: gd
------------------
module doesn't exist
==========================
Module: mysql
------------------
module doesn't exist
==========================
Module: zlib
------------------
module doesn't exist
==========================
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 | no value | no value
include_path | .:/usr/share/pear | .:/usr/share/pear
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | me@localhost.com | me@localhost.com
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost | |
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30 | |
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.116 seconds - 6 queries in 0.003 seconds - Album set :
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
Script called without the required parameter(s).
File: /var/www/html/pics/db_input.php - Line: 41
i have the same error :(
@both of you: post a link to your sites.
Joachim
http://gallery.planeta-mma.ru
user: tester
password: tester
Your post vars seem not to be populated ($HTTP_POST_VARS). Edit db_input.php and find$HTTP_POST_VARS
and 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
I use php4
Editiong of db_inputs.php also has not corrected a bug
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
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 ( )
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
i`m selfhosted
hm, then you better review your server setup imo. At least you don't have to shout at your webhost ;)
Joachim
The problem consists that the server for any reason does not process the data transferred with enctype = "multipart/form-data"
the places to check are php.ini and apache.conf
Joachim
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
@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
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!!