Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2007, 09:13 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default Problem with getimagesize function

Got an interesting one here, and may need some help trying to find an alternative...

I have a web application which has been working until the last month. I suspect that a setting with my web host may have changed, but this is the process I am using.

User selects a picture to upload - PHP verifies that the file is a valid graphics file, and uploads it. PHP then check the size of the image to see if it falls under 200px wide. I use getimagesize to get the dimensions and then resize it if it needs resizing.

The problem now is that I am getting a failed to open stream: no such file or directory error. I have verified that the image is uploading and that it is in the directory referenced in the function.

Does anyone know anything that I can check, or if there are any alternative functions I can use to accomplish this?

I would appreciate your superior intellect on this one.

Thanks

Mike

Mike
EchoVue.com
__________________
Mike
EchoVue.com
 
Old January 20th, 2007, 03:23 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

OK - little if no success trying to find an alternative.

I changed my code from:

$dimen = getimagesize(filename);

to

list($owdt, $ohgt, $otyp) = @getimagesize(filename);

Now it works...

I suspect that my host changes a few settings and this just happened to by one of the side effects.

Thanks

Mike

Mike
EchoVue.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Round Function darrenb Access 3 May 22nd, 2007 05:45 PM
Header Function Problem. changusee2k PHP How-To 1 September 27th, 2006 02:45 AM
Msgbox Function Problem theokrtz Classic ASP Basics 4 July 4th, 2006 03:35 AM
getImagesize() ?? pritz PHP How-To 6 February 28th, 2006 08:54 AM
Problem with function mat41 Classic ASP Basics 3 July 16th, 2005 01:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.