Re: [PHP] image upload keeps file name ?

2010-04-01 Thread Midhun Girish
I use the follwing function for moving files: public function moveFile($file,$targetdir="../uploads/images/") { $fileName = $file['name']; $ext = substr($fileName, strrpos($fileName, '.') + 1); do { $targetfilename=md5(date("m.d.y.h.i.s").basename($fileName)).

Re: [PHP] image upload keeps file name ?

2010-04-01 Thread Ashley Sheridan
On Thu, 2010-04-01 at 10:51 +0100, Matthew Croud wrote: > Hi Guys, > > Can someone confirm for me that the code below will move an uploaded > file and give it the same name as the original image file name ? > > > $file_dir = "/home/uploads"; > foreach($_FILES as $file_name => $file_array) { >

[PHP] image upload keeps file name ?

2010-04-01 Thread Matthew Croud
Hi Guys, Can someone confirm for me that the code below will move an uploaded file and give it the same name as the original image file name ? $file_dir = "/home/uploads"; foreach($_FILES as $file_name => $file_array) { echo "path: ".$file_array["tmp_name"]."\n"; echo "name:

Re: [PHP] Image upload

2007-02-05 Thread Richard Lynch
PS I forgot that the $_FILES array also has an 'error' field in it. Check that! On Mon, February 5, 2007 4:29 pm, Robert Fitzpatrick wrote: > I have a small application that ran on one server and now gives me a > problem with uploading images on a new server. I am running PHP 4.4.4 > now on thi

Re: [PHP] Image upload

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 4:29 pm, Robert Fitzpatrick wrote: > I have a small application that ran on one server and now gives me a > problem with uploading images on a new server. I am running PHP 4.4.4 > now on this server and hoping it is just something that needs adjusted > in php.ini, but canno

Re: [PHP] Image upload

2007-02-05 Thread Robert Fitzpatrick
Jochem Maas wrote: Robert Fitzpatrick wrote: I have a small application that ran on one server and now gives me a problem with uploading images on a new server. I am running PHP 4.4.4 now on this server and hoping it is just something that needs adjusted in php.ini, but cannot seem to find. T

Re: [PHP] Image upload

2007-02-05 Thread Jochem Maas
Robert Fitzpatrick wrote: > I have a small application that ran on one server and now gives me a > problem with uploading images on a new server. I am running PHP 4.4.4 > now on this server and hoping it is just something that needs adjusted > in php.ini, but cannot seem to find. The file is posted

[PHP] Image upload

2007-02-05 Thread Robert Fitzpatrick
I have a small application that ran on one server and now gives me a problem with uploading images on a new server. I am running PHP 4.4.4 now on this server and hoping it is just something that needs adjusted in php.ini, but cannot seem to find. The file is posted as a file fields in a multipart/f

Re: [PHP] image upload problem

2006-06-29 Thread Jochem Maas
suresh kumar wrote: > Hi, hi ([EMAIL PROTECTED]([EMAIL PROTECTED]([EMAIL PROTECTED](*%([EMAIL PROTECTED]([EMAIL PROTECTED]@# > I am waiting reply from any one do we have someone here called 'any one'? how about you reply to one of the people who answer your questions. PS - the tmp file is remo

RE: [PHP] image upload problem

2006-06-29 Thread Jay Blanchard
[snip] The Code is running properly.But I dont Know Where The uploaded image is Stored in the server.I checked "/tmp" directory,but image is not there,is there any function where i can specify the location of the server where my image is to be stored i also tired move_uploaded_image() function .

[PHP] image upload problem

2006-06-29 Thread suresh kumar
Hi, This is the code i am using for image upload. if ($_FILES['ufile']['name'] != NULL) { $FlName= $_FILES['ufile']['name']; if(!is_uploaded_file($_FILES['ufile']['tmp_name'])){ print " alert(\"Error! The expected file wasn't loaded\"); ";

Re: [PHP] Image upload form

2005-06-15 Thread Jack Jackson
Yes, Jason, Those did it! Thanks so much for the help! Jason Wong wrote: On Thursday 16 June 2005 00:38, Jack Jackson wrote: //try to get image size; this returns false if this is not an actual image file. $image_test = getimagesize($local_file); if ($image_test !== false) {

Re: [PHP] Image upload form

2005-06-15 Thread Jason Wong
On Thursday 16 June 2005 00:38, Jack Jackson wrote: > //try to get image size; this returns false if this is not an actual > image file. >$image_test = getimagesize($local_file); > if ($image_test !== false) { > $mime_type = $_FILES['userfile']['type']; $_FILES['userfile'][

Re: [PHP] Image upload form

2005-06-15 Thread Jack Jackson
Richard Davey wrote: Hello Jack, Wednesday, June 15, 2005, 5:38:11 PM, you wrote: JJ> newfile returns: 0fdae2e9e6aa43f067a9dd780a5a36a6.jpg JJ> image_file returns: JJ> images/jpg/test/0fdae2e9e6aa43f067a9dd780a5a36a6.jpg JJ> images/jpg/test is set to 777 but I still get (Could not move file

Re[2]: [PHP] Image upload form

2005-06-15 Thread Richard Davey
Hello Jack, Wednesday, June 15, 2005, 5:38:11 PM, you wrote: JJ> newfile returns: 0fdae2e9e6aa43f067a9dd780a5a36a6.jpg JJ> image_file returns: JJ> images/jpg/test/0fdae2e9e6aa43f067a9dd780a5a36a6.jpg JJ> images/jpg/test is set to 777 but I still get (Could not move file to JJ> destination). Wha

Re: [PHP] Image upload form

2005-06-15 Thread Jack Jackson
Okay, I started seeing some of my mistakes. I am still having a great deal of trouble: newfile returns: 0fdae2e9e6aa43f067a9dd780a5a36a6.jpg image_file returns: images/jpg/test/0fdae2e9e6aa43f067a9dd780a5a36a6.jpg images/jpg/test is set to 777 but I still get (Could not move file to destinati

[PHP] Image upload form

2005-06-15 Thread Jack Jackson
Hi, After a disastrous first attempt (which uploaded images but only by chance) it was suggested I rework the entire thing. This one seems to check the file against getimagesize and if that doesn't prove false, check the type and make the extension then rename the file. But the moving part is n

Re: [PHP] Image upload not working correctly

2004-10-14 Thread Jason Wong
Please do not top-post. On Thursday 14 October 2004 23:52, Dave Grant wrote: > Thanks for the reponse. Yes, the destination paths look fine and the PHP > error log displays no errors. Any other ideas? move_uploaded_file() _will_ spit out an error if there are any problems. So if you're _positi

Re: [PHP] Image upload not working correctly

2004-10-14 Thread Dave Grant
Just to clarify, everything looks like it works fine except for moving the images to the destination path. The images upload, the server recognizes them, but they don't get moved to the destination path. Thanks. "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Th

Re: [PHP] Image upload not working correctly

2004-10-14 Thread Dave Grant
Thanks for the reponse. Yes, the destination paths look fine and the PHP error log displays no errors. Any other ideas? Thanks. "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thursday 14 October 2004 02:40, Dave Grant wrote: > >> echo "Thumb image uploaded to "

Re: [PHP] Image upload not working correctly

2004-10-13 Thread Jason Wong
On Thursday 14 October 2004 02:40, Dave Grant wrote: > echo "Thumb image uploaded to ".$thumbPath."\n"; > echo "Full image uploaded to ".$fullPath."\n"; Do these look OK? > Everything works fine, except that the images are simply not there when we > go look for them. The best explanation I can

[PHP] Image upload not working correctly

2004-10-13 Thread Dave Grant
Hello. I am working on a rather large form for my work that accepts, among other things, 2 images, one smaller one 65 x 93 pixels, and a larger one 105 x 150 pixels, both in JPG format. Let me run through the whole process, showing my code. I use simple, standard HTML for the form: I chec

Re: [PHP] image upload woes

2004-06-26 Thread Marek Kilimajer
Edward Peloke wrote --- napísal:: I have code which attempts to upload some files and create thumbnails. The same code on one server works ok, the same code on another server throws an error everytime I hit submit that says "The document contains no data"...it appears to be a javascript error. It

Re: [PHP] image upload woes

2004-06-25 Thread Curt Zirzow
* Thus wrote Edward Peloke: > I have code which attempts to upload some files and create thumbnails. The > same code on one server works ok, the same code on another server throws an > error everytime I hit submit that says "The document contains no data"...it > appears to be a javascript error.

RE: [PHP] image upload woes

2004-06-25 Thread Jay Blanchard
[snip] I have code which attempts to upload some files and create thumbnails. The same code on one server works ok, the same code on another server throws an error everytime I hit submit that says "The document contains no data"...it appears to be a javascript error. It is not an error that I am t

[PHP] image upload woes

2004-06-25 Thread Edward Peloke
I have code which attempts to upload some files and create thumbnails. The same code on one server works ok, the same code on another server throws an error everytime I hit submit that says "The document contains no data"...it appears to be a javascript error. It is not an error that I am throwin

Re: [PHP] image upload

2003-10-06 Thread Yury B .
Thank you for all help I have just figured out that there is other variable prob. See pointer "--->": //$c2=$rw/w; < $nh=$h*$c; //The Height Of The Thumbnails //$rh=$h*$c2; //The Height Of The Large Pictures $img = LoadJpeg($file); //$img2 = LoadJpeg($file); $thumb = imagecr

Re: [PHP] image upload

2003-10-06 Thread Yury B .
Sorry, there was typo in the code I sent previously. Here is the right code but the same problem - secont image is with incorrect header: On 6 Oct 2003 at 8:09, Jason Wong wrote: > On Monday 06 October 2003 00:32, Yury B. wrote: > > Hi I need to upload two resized images out from one jpg imag

Re: [PHP] image upload

2003-10-05 Thread Jason Wong
On Monday 06 October 2003 00:32, Yury B. wrote: > Hi I need to upload two resized images out from one jpg image. I use > following code to do it: [snip] > This code is working perfectly but produces only one uploaded and > resized image (I comented out the lines that I add for second image) > If

[PHP] image upload

2003-10-05 Thread Yury B .
Hi I need to upload two resized images out from one jpg image. I use following code to do it: This code is working perfectly but produces only one uploaded and resized image (I comented out the lines that I add for second image) If I take out comments from the code on the second image - this

RE: [PHP] image upload question

2003-03-12 Thread Tyler Durdin
Nothing really. I did happen across a couple of tutorials from phpbuilder.com    http://www.phpbuilder.com/columns/michael20020712.php3?print_mode=1 and    http://www.phpbuilder.com/columns/bealers2904.php3?page=3&print_mode=1 may be able to piece something together from these two articles. l

[PHP] image upload question

2003-03-12 Thread Tyler Durdin
I want to be able to resize an image to 331x248 when I upload it and also create a thumbnail. All of these pics are coming from a digital camera set on 800x600 so the dimension above should be fine and i would like the thumbnail to be 77x58. I know the code to upload the image, but I am not s

[PHP] Image upload

2002-09-11 Thread Sascha Braun
Please Excuse, the code must look like this: if(!file_exists('../images/upload_tmp')) { $dir = '../images/upload_tmp'; mkdir($dir); chmod($dir, 0777); $path = dirname($PATH_TRANSLATED).$dir.'/'; for ($i = 0; $i < 10; $i++) { switch($i) { case $i: $source = $image

[PHP] Image Upload

2002-09-11 Thread Sascha Braun
Hi Freaks, I got a problem to solve. This script i wrote seems to have an failure but I don't know why. The Error Message is telling me, that I don't have the permission to do the action I want to do. I thought it has some to do with my windows apache installation, but on linux its the same b

Re: [PHP] Image upload into database

2002-07-24 Thread Justin French
You need to look at the differences between your server and the live one. The only real way to test is to have both you AND another tester (preferably on a slow computer with 56k connection) to try uploading the SAME IMAGE FILE to both servers. This will rule out problems with the data type (eg

RE: [PHP] Image upload into database

2002-07-24 Thread Brian V Bonini
Just curious why you don't upload the image to a dir and just store the link in the db? > -Original Message- > From: Jesse Lawrence [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 24, 2002 7:44 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Image upload into database

Re: [PHP] Image upload into database

2002-07-24 Thread Tyler Longren
Are you trying to upload the same image as you did at home? If so, size isn't the problem if you can do it from home. It might be a timeout issue. There might be something in php.ini you can set for timeout. You can specify the max filesize to upload in php.ini also. Good luck, Tyler On Wed

[PHP] Image upload into database

2002-07-24 Thread Jesse Lawrence
I've setup an image upload feature on a site, which uploads images into a mysql database. The uploads are working absolutely as expected on my local computer (the server), but when someone else tried to upload, only 1/3 of the image was uploaded. Could it be a matter of size? I was originally u

Re: [PHP] Image upload and scaling

2002-03-11 Thread Samuel Ottenhoff
Someone just mentioned ImageMagick... Check it out: http://www.imagemagick.org/ ImageMagickTM is a robust collection of tools and libraries to read, write, and manipulate an image in many image formats (over 68 major formats) including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD, and GIF.

[PHP] Image upload and scaling

2002-03-11 Thread P.Agenbag
Hi, I am trying to make a util whereby ppl can upload their own images to my server for me to automatically display them. The below code works fine, but I have the following problem. It only works fne if everyone complies to a standard of a set width and height for the image. This is not always

Re: [PHP] Image Upload

2002-01-24 Thread Bogdan Stancescu
This is a very good exercise you shouldn't skip by using prefabricated tools. Just use a for the first part and the PHP documentation for the second - the procedure in itself is really simple, but you'll have the opportunity to understand some nice technicalities in the process. Bogdan [EMAIL P

[PHP] Image Upload

2002-01-24 Thread lists
Does anyone have a good script for uploading an image and storing it in a mySQL database. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PR

[PHP] Image Upload, renaming question

2001-11-15 Thread Joe Van Meer
Hi there, I have an upload form on my website that works great, however I have come to a roadblock...how the heck do I rename the copied file? Everytime I upload an image it overwrites the old one with the new. The code below uploads the file and displays the following: Your photo has been upload

[PHP] image upload

2001-10-02 Thread AJDIN BRANDIC
Hi I have a problem uploading images on my server. I have foung#d similar question in the archive u no answer to it. If a file is uploaded to the server through a form it stores it in the right place with the right name but the file size is incorrect and it is not visible (though a browser).

Re: [PHP] image upload - determining image resolution in pixels ?

2001-05-22 Thread Markus Fischer
On Tue, May 22, 2001 at 10:38:32AM -0700, Nicolas Mermet wrote : > I was wondering if there is a way to analize an uploaded jpeg file in > order to extract its resolution in pixels. GetImageSize() is a favourite one here. > Would that be also possible with a quicktime movie ? Possibly,

Re: [PHP] image upload - determining image resolution in pixels ?

2001-05-22 Thread Chris Lee
open the file with gd and use imagesx() and imagesy() gd does not handel quicktime, only jpeg, gif (older, dont go there), png, tiff I think thts it. I havent checked. but never the less, images, not movies. -- Chris Lee [EMAIL PROTECTED] "Nicolas Mermet" <[EMAIL PROTECTED]> wrote in me

[PHP] image upload - determining image resolution in pixels ?

2001-05-22 Thread Nicolas Mermet
Hi, I was wondering if there is a way to analize an uploaded jpeg file in order to extract its resolution in pixels. Would that be also possible with a quicktime movie ? thanks, Nicolas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: [PHP] Image Upload??

2001-05-16 Thread Brave Cobra
day, May 16, 2001 2:47 PM Subject: Re: [PHP] Image Upload?? > From phpinfo() on f2s.com > > upload_max_filesize 2M > > So, something like, > > @copy($file, "/path/to" . $file_name) > or die ("Blam, something's up!"); > > should work - hav

Re: [PHP] Image Upload??

2001-05-16 Thread James Holloway
>From phpinfo() on f2s.com upload_max_filesize 2M So, something like, @copy($file, "/path/to" . $file_name) or die ("Blam, something's up!"); should work - haven't got time to try it at the moment. James. > What am I doing wrong here? > Is there a way to get around the temporary folder?

Re: [PHP] Image Upload??

2001-05-16 Thread Brave Cobra
! BC - Original Message - From: "Brave Cobra" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 16, 2001 12:52 PM Subject: Re: [PHP] Image Upload?? > Maybe I ought to mention that I don't have direct access to this server. > It's a F

Re: [PHP] Image Upload??

2001-05-16 Thread Brave Cobra
Maybe I ought to mention that I don't have direct access to this server. It's a F2S account, I'm trying to upload to. BC - Original Message - From: "Brave Cobra" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 16, 2001 10:01 AM Subje

Re: [PHP] Image Upload??

2001-05-16 Thread Brave Cobra
Done that, doesn't work! Brave Cobra - Original Message - From: "Toby Dacre" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 16, 2001 3:29 AM Subject: Re: [PHP] Image Upload?? > > chmod the file or directory so that php can acc

Re: [PHP] Image Upload??

2001-05-15 Thread Toby Dacre
chmod the file or directory so that php can access it it doesn't run as you! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] Image Upload??

2001-05-15 Thread Brave Cobra
Hi, I'm having a problem with a file upload. My code looks as follows : Select the file you wish to upload. It must be less than 300KB. $image_name is not a valid file to upload. Please upload JPEG (.jpg) or GIF (.gif) type images only. "; return 0; } } $ABS_IMAGES_DIR=$path_

Re: [PHP] Image Upload

2001-05-07 Thread Geir Eivind Mork
Kyle Mathews wrote: > I'm looking for some code that will upload images to my server from a form > submission. > I'd also like it to check for a max file size of the images. > Any help would be appreciated. what about reading the manual? there are variables that contain the file size. http://ww

Re: [PHP] Image Upload

2001-05-06 Thread Henrik Hansen
"Kyle Mathews" <[EMAIL PROTECTED]> wrote: > Hello: > > I'm looking for some code that will upload images to my server from a form > submission. > I'd also like it to check for a max file size of the images. > look at the getimagesize() function -- Henrik Hansen -- PHP General Mailin

[PHP] Image Upload

2001-05-06 Thread Kyle Mathews
Hello: I'm looking for some code that will upload images to my server from a form submission. I'd also like it to check for a max file size of the images. Any help would be appreciated. Thanks, Kyle [EMAIL PROTECTED] http://www.thedip.net -- PHP General Mailing List (http://www.php.net/) T