You are here: Re: Attempt to compile PHP 5.2.0 with mysql and gd (2.0.33) « PHP Programming Language « IT news, forums, messages
Re: Attempt to compile PHP 5.2.0 with mysql and gd (2.0.33)

Posted by F Laupretre on 12/13/06 23:26

There are 2 possible solutions :

1. The simple one: The PHP source tree contains a GD library. If you want
to use it (and I don't see why you wouldn't), just add '--with-gd' or
'--with-gd=shared' to your configure line. Then run 'make' and the
embedded GD library will be compiled and linked with your PHP.

2. The more complex one. If you don't want to use the embedded GD library,
you will have to expand the GD sources, run configure in this directory,
compile, link , install GD, and only after this, you will run configure in
the PHP source tree and add '--with-gd=<dir>' where <dir> is the directory
GD was installed in (not the directory of the sources).

Now, something else: if you want to use imagecreatefromjpeg, you will need
the jpeg library, even if you link PHP with its embedded GD library.
There, it becomes quite complex to explain here.

Read the document at
http://www.tekwire.net/joomla/building/apache/comp_apache_rhel3.htm : it
is a step by step tutorial explaining how to build a complete Apache/PHP
environment on Linux RHEL 3. The document was validated with PHP 5.1.6 but
it should be OK for 5.2.

Francois

Le Wed, 13 Dec 2006 07:16:20 +0100, eholz1 <ewholz@gmail.com> a écrit:

> Hello newsgroup members,
>
> I had an install of php without gd, this seemed to work ok. I decided
> I would like to use the gd package with php. I have Redhat 3.0AS, and
> php 5.2.0, and gd-2.0.33. the phpinfo file looks like it has gd (shows
> up in info page).
>
> I get a failure running one of the gd functions:
> Fatal error: Call to undefined function imagecreatefromjpeg() in
> usr/local/apache2/htdocs/thumbnail_generator.php on line 42
>
> That function is supposed to be ok in gd.
>
> I assume that I must start all over. What directory should I be using
> for --with-gd=/??????
> I have tried the unzipped location (gd-2.0.33) where i do the
> ./configure, etc - the php config fails, saying it cannot find
> libgd.(a|so) (which is in .libs) or at times gd.h. I have used
> /usr/lib as well - seems everything fails in some form. I am using
> apache 2.0. How can I remove php 5.2, and gd, and start over
> "correctly".
>
> I followed the install and readmes for both php and gd - but no luck.
>
> Any tips or experience with help.
>
> Thanks
> ewholz
>



--
Utilisant le client e-mail révolutionnaire d'Opera :
http://www.opera.com/mail/

 

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

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