note 75184 added to function.imagecreatefromjpeg
| From: | huguowen at cn dot ibm dot com | Date: | Thu, 17 May 2007 06:57:14 +0000 |
| Subject: | note 75184 added to function.imagecreatefromjpeg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126652@lists.php.net to get a copy of this message | ||
Tips for Windows User to Set up GD(dynamic graphic lib) with PHP.
Problem I meet:
When i run following function, which terminates at
$img = @imagecreatefromjpeg($image_path);
error message is : undefined function imagecreatefromjpeg();
no other code of the script gets executed.
Solution:
In one word, you need to turn on gd lib,
which hold the implementation of imagecreatefromjpeg();
please follow below steps:
my php install dir is: c:/php/
first you must try to find:
c:/php/php.ini
c:/php/ext/php_gd2.dll(php 5)
c:/php/extension/php_gd2.dll(php 4)
The php_gd2.dll is included in a standard PHP installation for Windows,
however, it's not enabled by default.
You have to turn it on,
You may simply uncomment the line "extension=php_gd2.dll" in php.ini and restart the PHP
extension.
Change:
,extension=php_gd2.dll
To:
extension=php_gd2.dll
You may also have to correct the extension directory setting
from:
extension_dir = "./"
extension_dir = "./extensions"
To (FOR WINDOWS):
extension_dir = "c:/php/extensions"(php 4)
extension_dir = "c:/php/ext"(php 5)
Cheers!
----
Server IP: 221.130.191.66
Probable Submitter: 202.108.130.138
----
Manual Page -- http://www.php.net/manual/en/function.imagecreatefromjpeg.php
Edit -- https://master.php.net/note/edit/75184
Del: integrated -- https://master.php.net/note/delete/75184/integrated
Del: useless -- https://master.php.net/note/delete/75184/useless
Del: bad code -- https://master.php.net/note/delete/75184/bad+code
Del: spam -- https://master.php.net/note/delete/75184/spam
Del: non-english -- https://master.php.net/note/delete/75184/non-english
Del: in docs -- https://master.php.net/note/delete/75184/in+docs
Del: other reasons-- https://master.php.net/note/delete/75184
Reject -- https://master.php.net/note/reject/75184
Search -- https://master.php.net/manage/user-notes.php