niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » PHP
getimagesize():failed to open stream:
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
sree
*nix forums beginner


Joined: 24 Feb 2005
Posts: 31

PostPosted: Fri Jul 21, 2006 6:24 am    Post subject: getimagesize():failed to open stream: Reply with quote

Hi,

am new bie to this group. I requesting help from you all.

Am geeting warnig with getimagesize() function. I will explain my
query by first giving my code.

$src = $_GET['src'];

$imageInfo = getimagesize($src);
echo $imageInfo[0]." ".$imageInfo[1];


It's working perfectly as i want when, the image is in the absolute
path. For example i am running this file under the /dev folder in root
directory. In dev i have one more folder called images which contain
some jpeg and gif files. Also one more folder called imgs in the root.
For easy understanding i picturized my directory stucture here.

Root
|
----- images --- This contains jpeg and gif files
|
----- dev
|
----- images --- This also contains jpeg and gif files
|
----- imagesize.php --- this is the file contains our
code

if i run this file by giving
www.domainname.com/dev/imagesize.php?src=images/1.jpg

It outputs the correct width and height of the image, but for this

www.domainname.com/dev/imagesize.php?src=/images/1.jpg

or this

www.domainname.com/dev/imagesize.php?src=../images/1.jpg

It wont result any thing, however it thows warning message like this


Warning: getimagesize(/images/1.jpg) [function.getimagesize]: failed to
open stream: No such file or directory in
/home/htdocs/dev/imagesize.php on line 4.

So, this is not working for relative paths.

I have tried it in the different server which is also have same
directory structure. In that it's working for both absolute and
relative paths.

I thing i need to change my server's configuration. but i dont know
which parameter needs to be changed.

anyone please help in this regard...

Thanks in advance
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
The time now is Sun Nov 23, 2008 1:44 pm | All times are GMT
navigation Forum index » Programming » PHP
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Artica-postfix a full Open Source postfix management console dtouzeau Postfix 0 Mon Jun 16, 2008 9:46 pm
No new posts Does stream I/O support "%a" floating-point format? John Friedland C++ 3 Fri Jul 21, 2006 9:26 am
No new posts small GTK "Open file" dialog David Siroky Debian 0 Fri Jul 21, 2006 7:30 am
No new posts ImportError: libclntsh.so.10.1: cannot open shared object... gmax2006 python 2 Thu Jul 20, 2006 7:05 pm
No new posts XML-RPC calls with real UTF8 data failed Erik Wasser Perl 0 Thu Jul 20, 2006 3:40 pm

Car Loan | Mobile Phone | Bit Torrent Sites | Cheapest mobile phones | Mortgage Calculator
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1073s ][ Queries: 16 (0.0408s) ][ GZIP on - Debug on ]