GD2 Library not installed

jaran

New member
Hello Support Staff Gigalicous,

Today I was propagated my site http://www.allpreview.net successfully. But after I've trying to open my page http://www.allpreview.net/photos/ it was look like the image disapear. Here is my log error,

Code:
[17-Jul-2013 06:43:36 America/New_York] PHP Warning:  imagecreatefromjpeg() [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/jaran/public_html/photos/view.php on line 9


I guess GD2 library is disable by host. By the way, can you enable this library for me?

PS : Those image is getting from free image API service. So I dont upload or save any images from this.

Thanks.[/code]
 

un4saken

Administrator
Hello,
Actually allow_url_fopen is disabled for security reasons. I need to check your script if you want this enabled on your account. Do you allow me to login to your account and check your files?
 

jaran

New member
un4saken said:
Hello,
Actually allow_url_fopen is disabled for security reasons. I need to check your script if you want this enabled on your account. Do you allow me to login to your account and check your files?

Ok. I will send PM you my login. Also I was checked my site at http://www.gidnetwork.com/tools/gzip-test.php seem the hosting doesnt support gzip compress. Without gzip compress it will consuming alot bandwith. I dont want my site to overload your hosting. By the way your hosting is good.
 

un4saken

Administrator
Hi,
Never tell anyone your password. Gigalicous
Staff will NEVER ask for your password. I just asked for your permission, I have root access anyway. I am denying the receipt.
 

jaran

New member
un4saken said:
Hi,
Never tell anyone your password. Gigalicous
Staff will NEVER ask for your password. I just asked for your permission, I have root access anyway. I am denying the receipt.

Oh sorry, Admin. Thanks for your notice. I had never told my login to anyone.


Gzip compress was solved. I put this code at above before header then gzip compress was active now. Thanks.

Code:
<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>
 

un4saken

Administrator
I've removed any restrictions on your account. GD library is already installed. You may check phpinfo here un4saken.gi9.co

If your script is not working, I advice you to check permissions.
 

jaran

New member
un4saken said:
I've removed any restrictions on your account. GD library is already installed. You may check phpinfo here un4saken.gi9.co

If your script is not working, I advice you to check permissions.

Thank you Admin.
 

jaran

New member
This is my php info. The function is still not active.

http://allpreview.net/info.php

fopen.png
 

un4saken

Administrator
It is enabled for the photos directory, if you move your phpinfo file to your script directory /photos you will see that it is enabled.

Do you want me to enable it for your whole www folder? Your script is working well with the current configuration anyway.
 

admin

Administrator
Staff member
I`ve been using:

PHP:
   <?php 
		
		function getter($url) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    //curl_setopt($ch, CURLOPT_POST, 1);
    //curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}

echo getter('url goes here'); ?>

Works just fine for me.
 

jaran

New member
un4saken said:
It is enabled for the photos directory, if you move your phpinfo file to your script directory /photos you will see that it is enabled.

Do you want me to enable it for your whole www folder? Your script is working well with the current configuration anyway.

Its okay Admin. I will investigate my script first and then give you report later. Maybe I will take other way to rewrite url image.

@DJB
I dont use CURL because this is only rewrite image url using imagejpeg function to chacing all images.

@Sander
I use free Image API Service so I think I dont need to change CHMOD permission. All image database is getting from there.
 

jaran

New member
un4saken said:
I can see images and no errors at all. Marking as solved

Nope Admin. Images shown because I use header location method. But if I used imagejpeg function is still doesnt work. Here, my script actually :
PHP:
<?php
ini_set('display_errors','ON');
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
ini_set('max_execution_time', 300); //300 seconds = 5 minutes
$url = 'http://imagesite.com/'.$_GET['id'].'/'.$_GET['numb'].'/3.jpg';
header('Content-type: image/jpeg');
imagejpeg(imagecreatefromjpeg($url));
exit;
?>
Also I tried with readfile function is also doesnt work.
 

jaran

New member
PeaceSigns said:
So is GD library only allowed on a person by person basis, and not available by default?

Its not about GD library. I missunderstanding at the first case. Its causing allow_fopen_url was disable by default. (Maybe this case will impact server security).