Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Http Upload Error  (Read 4287 times)

0 Members and 1 Guest are viewing this topic.

fangweile

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 103
  • Saranghaeyo ^_^
    • All Koreans - Home of Korean Actors and Actresses
Http Upload Error
« on: April 18, 2007, 07:15:28 am »

I can't upload images via http or url. It display this error

   Error Message
(www.exampleurl.com/image.jpg)   Could not open URI.

Quote
USER:
------------------
Array
(
    [ID] => dc2821f1fbba6461d536a917eb4b1e10
    [am] => 1
    [lang] => english
    [lap] => 7
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => fangweile
    [groups] => Array
        (
           
  • => 1

        )

    [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
)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content, player FROM cpg1410_filetypes; (0s)
  • [1] => select * from cpg1410_plugins order by priority asc; (0s)
        [2] => delete from `my?526872?coppermine`.cpg1410_sessions where time<1176869429 and remember=0; (0.001s)
        [3] => delete from `my?526872?coppermine`.cpg1410_sessions where time<1175663429; (0s)
        [4] => select user_id from `my?526872?coppermine`.cpg1410_sessions where session_id=md5("e3243f37470d515259f1687b39ce7a23e712c9a0aaef6b89b80973aed0c7ac29"); (0s)
        [5] => select user_id as id, user_password as password from `my?526872?coppermine`.cpg1410_users where user_id=1 (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 `my?526872?coppermine`.cpg1410_users AS u INNER JOIN `my?526872?coppermine`.cpg1410_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
        [7] => SELECT user_group_list FROM `my?526872?coppermine`.cpg1410_users AS u WHERE user_id='1' 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 cpg1410_usergroups WHERE group_id in (1) (0s)
        [9] => SELECT group_name FROM  cpg1410_usergroups WHERE group_id= 1 (0s)
        [10] => update `my?526872?coppermine`.cpg1410_sessions set time='1176873029' where session_id=md5('e3243f37470d515259f1687b39ce7a23e712c9a0aaef6b89b80973aed0c7ac29'); (0s)
        [11] => SELECT user_favpics FROM cpg1410_favpics WHERE user_id = 1 (0s)
        [12] => DELETE FROM cpg1410_banned WHERE expiry < '2007-04-18 05:10:29' (0s)
        [13] => SELECT * FROM cpg1410_banned WHERE (ip_addr='210.213.177.95' OR ip_addr='210.213.177.95' OR user_id=1) AND brute_force=0 (0s)
        [14] => SELECT aid, title FROM cpg1410_albums WHERE category < 10000 ORDER BY title (0s)
        [15] => SELECT aid, title FROM cpg1410_albums WHERE category='10001' ORDER BY title (0s)
        [16] => SELECT COUNT(*) FROM cpg1410_pictures WHERE approved = 'NO' (0s)
    )

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

    ==========================
    POST :
    ------------------
    Array
    (
       
[URI_array] => Array
        (
            [control] => phase_1
)

==========================
VERSION INFO :
------------------
PHP version: 5.2.2RC2-dev - OK
------------------
mySQL version: 5.0.38-Debian_1
------------------
Coppermine version: 1.4.10(stable)
==========================
Module: GD
------------------
GD Version: 2.0 or higher
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support:
XBM Support:
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 5.0.38
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | On
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | /usr/share/php/:/tmp/ | /usr/share/php/:/tmp/
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,popen,show_source,curl_exec,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,socket_create_listen,socket_create_pair,socket_create,socket_get_option,socket_getpeername,socket_getsockname,socket_last_error,socket_listen,socket_read,socket_recv,socket_recvfrom,socket_select,socket_send,socket_sendto,socket_set_block,socket_set_nonblock,socket_set_option,socket_shutdown,socket_strerror,socket_write,stream_socket_client,stream_socket_server,fsockopen,pfsockopen,stream_set_timeout,ftp_alloc,ftp_cdup,ftp_chdir,ftp_chmod,ftp_close,ftp_connect,ftp_delete,ftp_exec,ftp_fget,ftp_fput,ftp_get_option,ftp_get,ftp_login,ftp_mdtm,ftp_mkdir,ftp_nb_continue,ftp_nb_fget,ftp_nb_fput,ftp_nb_get,ftp_nb_put,ftp_nlist,ftp_pasv,ftp_put,ftp_pwd,ftp_quit,ftp_raw,ftp_rawlist,ftp_rename,ftp_rmdir,ftp_set_option,ftp_site,ftp_size,ftp_ssl_connect,ftp_systype,chown,getrusage,get_current_user,set_time_limit,getmyuid,getmypid,dl,leak,listen,chgrp,link,symlink,glob | exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,popen,show_source,curl_exec,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,socket_create_listen,socket_create_pair,socket_create,socket_get_option,socket_getpeername,socket_getsockname,socket_last_error,socket_listen,socket_read,socket_recv,socket_recvfrom,socket_select,socket_send,socket_sendto,socket_set_block,socket_set_nonblock,socket_set_option,socket_shutdown,socket_strerror,socket_write,stream_socket_client,stream_socket_server,fsockopen,pfsockopen,stream_set_timeout,ftp_alloc,ftp_cdup,ftp_chdir,ftp_chmod,ftp_close,ftp_connect,ftp_delete,ftp_exec,ftp_fget,ftp_fput,ftp_get_option,ftp_get,ftp_login,ftp_mdtm,ftp_mkdir,ftp_nb_continue,ftp_nb_fget,ftp_nb_fput,ftp_nb_get,ftp_nb_put,ftp_nlist,ftp_pasv,ftp_put,ftp_pwd,ftp_quit,ftp_raw,ftp_rawlist,ftp_rename,ftp_rmdir,ftp_set_option,ftp_site,ftp_size,ftp_ssl_connect,ftp_systype,chown,getrusage,get_current_user,set_time_limit,getmyuid,getmypid,dl,leak,listen,chgrp,link,symlink,glob
file_uploads | On | On
include_path | .:/usr/share/php | .:/usr/share/php
open_basedir | /tmp:/tmp/:/home/vol1/my-php.net/my_526872/fangweile.my-php.net/htdocs | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/local/bin/sendmail | /usr/local/bin/sendmail
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 20 | 20
max_input_time | 30 | 30
upload_max_filesize | 2M | 2M
post_max_size | 4M | 4M
==========================
Page generated in 0.083 seconds - 17 queries in 0.001 seconds - Album set : ; Meta set: ;
« Last Edit: April 18, 2007, 07:47:39 pm by GauGau »
Logged
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Http Upload Error
« Reply #1 on: April 18, 2007, 07:30:58 am »

Hi, welcome to the cpg forum.

Try two little steps before posting your problem:
1- read the documentation
2- use the search option, a lot of question have already been answered.

But first read the documentation.
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_http
and
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble
Logged

fangweile

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 103
  • Saranghaeyo ^_^
    • All Koreans - Home of Korean Actors and Actresses
Re: Http Upload Error
« Reply #2 on: April 18, 2007, 07:57:37 am »

I do read this documentation but still I can't get it. What file I am going to edit to fix the http upload error. ??? ???

Quote
Uploading by HTTP

Regular HTTP uploads use the browser's built-in capabilities to upload files to a server. The maximum file size is determined by two basic factors: the speed and amount of data the web-browser can upload before timing out, and the allowed file size determined by server settings. Note that those settings are not determined by coppermine, but the server config (php.ini). Users who are webhosted usually can't edit php.ini, so they will have to live with the settings the webserver admin has set up. Those who actually run their own server and can edit php.ini should take a look at the settings if (large) http uploads fail:

   1. max_input_time- 60 seconds is the default time limit for uploading files.
      This time limit includes the time it takes for the files to upload, so if you exceed this limit, the file will not even parse, and the browser will not get a response. You can workaround this by trying to upload smaller or fewer files, or you can try uploading over broadband. The best solution, of course, is to increase the time limit to something more in line with your needs.
   2. upload_max_filesize - 2MB is the default limit for individual files.
   3. post_max_size - 8MB is the default limit for post requests.
   4. memory_limit - 8MB is the default size.
   5. PHP's LimitRequestBody - 512KB default limit. (mainly an issue on Redhat/Apache systems. Found in /etc/http/conf.d)
      In general, upload_max_filesize < post_max_size < memory_limit in order for uploads to function properly. Coppermine may warn you if a file exceeds upload_max_filesize, but it cannot warn you if the total size of all the files exceeds the post limit or the memory limit.
   6. file_uploads - This determines whether or not PHP will allow file uploads. It must be set to 'On'.
   7. upload_tmp_dir - This specifies the temporary directory where PHP stores uploaded files.
      The most common issue caused by this setting is an open_basedir warning. In this situation, your server administrator has restricted the files that PHP can work with to a certain directory. If he does not create and specify a temporary directory within the open_basedir restriction, PHP will attempt to use the OS temporary directory, and it will be rebuffed by the open_basedir restriction.
   8. allow_fopen_url - This controls PHP's ability to read files using URL/URIs. If it is disabled, Coppermine will not be able to upload from URLs.

It should be obvious that the files have to be uploaded somewhere (into some folder) on your webserver - this is the albums folder within the folder you installed coppermine on your server. The HTTP uploads go into subfolders of the "userpics" folder (which resides within the "albums" folder). Obviously, the coppermine upload script needs write permissions to upload the files there. This is why you have to change permissions on the albums folder and everything within it during coppermine install - make it writable for the user the webserver runs under. This is done using the CHMOD command on Unix/Linux based servers. If you experience issues with uploading, make sure that you have set the permissions correctly.
Logged
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Http Upload Error
« Reply #3 on: April 18, 2007, 09:16:31 am »

Hein told you to RTFM and do exactly as suggested:
Quote
4.11.4 Upload troubleshooting

If you are experiencing issues with coppermine's upload process, temporarily change your coppermine settings as suggested below to get more detailed error messages:

    * Go to your coppermine page and log in as admin
    * Go to the config screen
    * Scroll to the bottom of the page
    * Expand the "Maintenance settings" section by clicking on it
    * Enable debug mode for everyone
    * Leave display of notices switched off
    * Save the new settings by clicking on "Save new configuration"
    * Go to the "groups" panel
    * Set the upload form configuration for all groups to "Single file uploads only" (set File upload boxes to "1", URI upload boxes to "0" and No. of boxes to "fixed")
    * Save your new settings

Then try to upload (using http uploads, even if you experienced troubles using another upload method) - you should get a more detailed error message that tells you what exactly goes wrong with your uploads. If the error message doesn't mean anything to you, search the support board for the error message you get.
When asking for support on the coppermine forum, post a link to your site and a test user account (the test user mustn't be in the admin group!) with upload privileges, with the above mentioned settings in place - this way, supporters can see the error messages as well. Do not post debug_output unless requested.

When people have issues with uploading and decide to post their question on the Coppermine support board, they usually are told to read this upload troubleshooting section. Many of them fail to do so properly, which results in frustration both for users as well as supporters. To make this absolutely clear: the above mentioned steps are absolutely mandatory, no matter what skill level you have, no matter what upload method you have troubles with. Failing to do exactly as suggested will result in your request for help being ignored. Yes, this applies to you. We mean it!
Logged

fangweile

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 103
  • Saranghaeyo ^_^
    • All Koreans - Home of Korean Actors and Actresses
Re: Http Upload Error
« Reply #4 on: April 18, 2007, 10:41:55 am »

I followed your instruction but how can we upload via url if the uri box is set to "0"

here is the link------> http://fangweile.my-php.net/gallery/
Logged
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Http Upload Error
« Reply #5 on: April 18, 2007, 12:42:24 pm »

8. allow_fopen_url - This controls PHP's ability to read files using URL/URIs.  If it is disabled, Coppermine will not be able to upload from URLs.
applies.

There's little point in FTP-uploading pics to your webspace and then using URI uploads (which has all drawbacks of http uploads like browser timeouts). URI uploads are meant to add pics that originally reside on remote webspace.

For clarification, read "URI/URL upload question"
Logged

fangweile

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 103
  • Saranghaeyo ^_^
    • All Koreans - Home of Korean Actors and Actresses
Re: Http Upload Error
« Reply #6 on: April 18, 2007, 12:49:30 pm »

Thanks a lot. I am now understand ;)
Logged
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.