Jump to content

Archived

This topic is now archived and is closed to further replies.

sijo

getimagesize

Recommended Posts

Is there any way to get around this problem?

 

Date / Time: 30-01-2010 19:04:56

Error Type: [E_WARNING] getimagesize() [<a href='function.getimagesize'>function.getimagesize</a>]: URL file-access is disabled in the server configuration

On line 50

File includes/functions/html_output.php


---------------

regards

sijo

---------------

 

Contrib: JMrating10 - Rate your products / osCommerce VTS - Virus & Threat Scanner

 

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

Share this post


Link to post
Share on other sites

download thise file and upload thru the admin.

On times the user permission group when add thru FTP and that thru admin result in different gropus having permission.

 

else ask You hosting company.

 

Satish


Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Share this post


Link to post
Share on other sites

download thise file and upload thru the admin.

On times the user permission group when add thru FTP and that thru admin result in different gropus having permission.

 

else ask You hosting company.

 

Satish

 

Which files are you thinking of here?


---------------

regards

sijo

---------------

 

Contrib: JMrating10 - Rate your products / osCommerce VTS - Virus & Threat Scanner

 

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

Share this post


Link to post
Share on other sites

I had come across a site where the getimagesize function was not working for few images.

I downlaoded those thru ftp and uploaded thru Admin and it worked.

 

Whenwe use FTP to upload the owner might be different from the owner when we use a web page to upload.

So just check if thats the reason.

 

if not You need to ask Hosting company whether this function is supprtoed or not.

 

Satish


Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Share this post


Link to post
Share on other sites

I had come across a site where the getimagesize function was not working for few images.

I downlaoded those thru ftp and uploaded thru Admin and it worked.

 

Whenwe use FTP to upload the owner might be different from the owner when we use a web page to upload.

So just check if thats the reason.

 

if not You need to ask Hosting company whether this function is supprtoed or not.

 

Satish

 

 

I think I have found a solution for the problem. I did find a replacement function for the getimagesize, and now there is no errors..

Thanks..


---------------

regards

sijo

---------------

 

Contrib: JMrating10 - Rate your products / osCommerce VTS - Virus & Threat Scanner

 

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

Share this post


Link to post
Share on other sites

What was the replacement function?


Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Share this post


Link to post
Share on other sites

What was the replacement function?

 

 

Here is the function:

function checkRemoteFile($url)

{

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,$url);

// don't download content

curl_setopt($ch, CURLOPT_NOBODY, 1);

curl_setopt($ch, CURLOPT_FAILONERROR, 1);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

 

if(curl_exec($ch)!==FALSE)

{

return true;

}

else

{

return false;

}

}

 

And the use in html_output.php:

if ($image_size = checkRemoteFile($src)) {

 

 

This is workin so fare..

 

 


---------------

regards

sijo

---------------

 

Contrib: JMrating10 - Rate your products / osCommerce VTS - Virus & Threat Scanner

 

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

Share this post


Link to post
Share on other sites

Thanks or pasting the solution.

getimagesize can be used If You want to get the size of an image that is within Your server.

If its a remote file then getimagesize will not work.

 

 

Were the images not on Your site url.

 

Satish


Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Share this post


Link to post
Share on other sites

×