Re: [PHP] Problems with upload
On Monday 08 March 2004 23:35, Martin Hjort Eriksen wrote: I am running a fullt upgraded Debain testing system, and I have a smaller problem with uploading files. Does the example in the manual work for you? If it does, what does the php error log say when you run *your* code? Post some concise code which illustrates your problem. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Tonight's the night: Sleep in a eucalyptus tree. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with upload
Jason Wong wrote: On Monday 08 March 2004 23:35, Martin Hjort Eriksen wrote: I am running a fullt upgraded Debain testing system, and I have a smaller problem with uploading files. Does the example in the manual work for you? If it does, what does the php error log say when you run *your* code? Post some concise code which illustrates your problem. Here is some of the code I am using, to acces the uploaded file: if(!file_exists($_FILES['binFile']['tmp_name'])) { return Filen .$_FILES['binFile']['name']. kan ikke findes paring; serveren.br / Er fejlen vedvarende, kontakt da venligst systemadministratoren.; } $data = addslashes(fread(fopen($_FILES['binFile']['tmp_name'], r), filesize($_FILES['binFile']['tmp_name']))); PHP does not give any warnings or notices in the situation. The $_FILES array is populated with all the necessary information, but the file that is uploaded is not present in the location given by $_FILES['binFile']['tmp_name'] I have also tried to change locations and that did not help. I have also been in tha manual, and could not find anything there that could help me. I have previously run Redhat then Slackware...the I changed to Debian, and since then it did not work. I have previoulsy also asked the debian user list, but have not recieved any answer, then decided to ask this list. /Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with upload
Do you have any wierd setting for upload temp dir? (can't remember the directive) in your php.ini file? Martin Hjort Eriksen wrote: Jason Wong wrote: On Monday 08 March 2004 23:35, Martin Hjort Eriksen wrote: I am running a fullt upgraded Debain testing system, and I have a smaller problem with uploading files. Does the example in the manual work for you? If it does, what does the php error log say when you run *your* code? Post some concise code which illustrates your problem. -- Raditha Dissanayake. --- http://www.radinks.net/ftp/applet/ An applet that breaks all the rules. Reads, Writes and Deletes files on your hard disk. Uploads what's left to a third party server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with upload
The standard settings for upload: ; File Uploads ; ; Whether to allow HTTP file uploads. file_uploads = On ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). upload_tmp_dir = /tmp ; Maximum allowed size for uploaded files. upload_max_filesize = 2M /Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with upload
On Tuesday 09 March 2004 00:11, Martin Hjort Eriksen wrote: Here is some of the code I am using, to acces the uploaded file: if(!file_exists($_FILES['binFile']['tmp_name'])) { return Filen .$_FILES['binFile']['name']. kan ikke findes paring; serveren.br / Er fejlen vedvarende, kontakt da venligst systemadministratoren.; } So when you say but the file that is uploaded is not present in the location given by $_FILES['binFile']['tmp_name'], that is determined by the above test? If everything else in $_FILES looks OK, then the only thing I can think of that might be the cause is if you're operating your webserver from a chroot jail. I believe a similar problem cropped up before in the archives so you may want to have a look there. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Men are always ready to respect anything that bores them. -- Marilyn Monroe */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with upload
Hi I am also running debian, and if I have safe_mode=On I am unable to upload images and get the following warnings. The code works if I disable safe_mode, but I have to get it working with safe_mode also. If I ever will see any money stream to me from my 'boss'... 2004-03-04 03:15:17 (CET) 2 Warning filemtime(): SAFE MODE Restriction in effect. The script whose uid is 1000 is not allowed to access /tmp/phpPK9YZf_r owned by uid 33 /path_to_webbdir/classes/class_image.php 343 Meddelande från felhanteraren: 2004-03-04 03:15:17 (CET) 8 Notice Undefined variable: fileid /path_to_webbdir/classes/class_image.php 385 Meddelande från felhanteraren: 2004-03-04 03:15:18 (CET) 2 Warning getimagesize(): SAFE MODE Restriction in effect. The script whose uid is 1000 is not allowed to access /tmp/phpPK9YZf_r owned by uid 33 /path_to_webbdir/classes/class_image.php 277 Meddelande från felhanteraren: 2004-03-04 03:15:18 (CET) 2 Warning getimagesize(/tmp/phpPK9YZf_r): failed to open stream: Success /path_to_webbdir/classes/class_image.php 277 Meddelande från felhanteraren: 2004-03-04 03:15:18 (CET) 2 Warning filemtime(): SAFE MODE Restriction in effect. The script whose uid is 1000 is not allowed to access /tmp/phpPK9YZf_r owned by uid 33 /path_to_webbdir/class_image.php 194 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with upload
On Friday 31 May 2002 01:57, Aaron wrote: I am trying to upload files to a server. I have the script and it works on other servers but when I try to upload to this paticular server, I get the following: Warning: Max file size of 2 bytes exceeded - file [userfile] not saved in Unknown on line 0 Is that a typo? Does it really say 2 bytes? If it's not a typo ... I have checked the php.ini file and the upload_max_filesize = 2M. I checked with phpinfo and verified that it is set for 2M. ... then increase the upload_max_filesize -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Mr and Mrs PED, can I borrow 26.7% of the RAYON TEXTILE production of the INDONESIAN archipelago? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php