You are here: Re: [PHP] URL file-access disabled « PHP « IT news, forums, messages
Re: [PHP] URL file-access disabled

Posted by Marek Kilimajer on 04/01/05 02:25

$image_dir is an url (begins with http:// or similar) and
allow_url_fopen is off on your BSD.

Do you need to access it using url wrappers? If the images are local you
can access them using plain filesystem access

Jackson Linux wrote:
> Hi, ho,
>
> I have a problem; something which works locally is complaining on the
> BSD Unix server I use:
>
> The Code: (somewhere else I define $image_dir)
>
> <!-- If there's an image, get it, get its height and width and slap it
> into an image tag, otherwise, move on -->
> <?php if (!empty($article['image'])) {
> $image = ($article['image']);
> $size1 = getimagesize("$image_dir"."$image");
> $width1 = $size1[0];
> $height1 = $size1[1];
>
> include_once(INCLUDES . 'image.include.php');
> }
>
> ?>
>
> The Include:
> <img class='right-float' src='<?php echo $image_dir.$image ?>'
> width='<?php echo $width1 ?>' height='<?php echo $height1 ?>' alt='<?php
> echo $image ?>' border='0' />
>
>
> The Error:
> Warning: getimagesize(): URL file-access is disabled in the server
> configuration in /usr/www/users/user/articles/technology/index.htm on
> line 180
>
> Warning:
> getimagesize(http://www.domain.com/images/combination_device.jpg):
> failed to open stream: no suitable wrapper could be found in
> /usr/www/users/user/articles/technology/index.htm on line 180
>
> The Question:
> Anything I can do within .htaccess to make this not happen? I don't have
> root access or access to php.ini, and they're loathe to change the
> configuration on a shared servcer.
>
> Thanks in advance,
> Jack
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация