★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/000710.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  PHP
  Apache + PHP + gd + freetype for image creation

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Apache + PHP + gd + freetype for image creation
rycamor
Member
posted March 10, 2000 01:09 AM     Click Here to See the Profile for rycamor   Click Here to Email rycamor     Edit/Delete Message Reply w/Quote
No matter what i try, I cannot get the above combination. I can configure, make and compile each of them until I get to the last step: Apache. I can ./configure Apache, but when I try make, I invariably get as far as:

<=== src/modules
(etc...)
-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -lpam -lmysqlclient -lttf -lgd -lm -lcrypt -lcrypt
modules/php4/libphp4.a(internal_functions.o): In function `php_global_shutdown_internal_extensions':
/usr/local/php-4.0b4pl1/internal_functions.c(.data+0x68): undefined reference to `gd_module_entry'
*** Error code 1

Stop.

I am running FreeBSD 3.4, Apache 1.3.12, PHP Beta 4.4, gd 1.7.3, and Freetype 1.3.1

Any ideas?

Thanx much,

Rick

falcon
Member
posted March 10, 2000 02:28 AM     Click Here to See the Profile for falcon   Click Here to Email falcon     Edit/Delete Message Reply w/Quote
I run Linux and find that some versions are incompatible with other software. It could be that you are using the latest version of Apache. Try using 11 instead of 12. If that doesn't work various other stable releases of the other apps. Its very much try it and see.

I hope that you find the answer soon.

Falcon

[This message has been edited by falcon (edited March 10, 2000).]

eduany
Member
posted March 13, 2000 09:13 PM     Click Here to See the Profile for eduany   Click Here to Email eduany     Edit/Delete Message Reply w/Quote
RYCAMOR
i have a question for yaaa... thankx for taking the time to read....
how do i configure/install php3 on a linux 6.1 box? any good links?

eduany
Member
posted March 13, 2000 09:14 PM     Click Here to See the Profile for eduany   Click Here to Email eduany     Edit/Delete Message Reply w/Quote
RYCAMOR or Falcon
i have a question for yaaa... thankx for taking the time to read....
how do i configure/install php3 on a linux 6.1 box? any good links?


thankx your hepl is greatly appreciated
mike (eduany)

[This message has been edited by eduany (edited March 13, 2000).]

rycamor
Member
posted March 14, 2000 12:34 AM     Click Here to See the Profile for rycamor   Click Here to Email rycamor     Edit/Delete Message Reply w/Quote
Mike,
http://dcfonline.sfu.ca/ying/linux/ is about the best place for php/mysql beginners. Click on the Web Database Step-by-Step guide. It won't tell you everything, but it will get you started in the most direct way possible.

Other than that, just do things in this order: install MySQL first, (or whatever database you want to use), Then do the basic configuration of Apache, then configure and install PHP, then go back and do the full configuration and install of Apache. (this all goes according to the PHP documentation, it's pretty straightforward, the only trouble is when you get into the poorly documented install of gd and FreeType)

Enjoy playing with the most powerful web-based application tool in existence.

Rick

------------------
¼....½.....¾.....1 __// | | \\\\__ ..... ö

rycamor
Member
posted March 17, 2000 09:41 AM     Click Here to See the Profile for rycamor   Click Here to Email rycamor     Edit/Delete Message Reply w/Quote
Well, I finally managed to get gd working with PHP, but not with FreeBSD, and not by compiling all apps from source code.

I Used Turbolinux 6 with the precompiled binaries to Freetype 1.3, gd 1.7.3, and Apache 1.3.9, and I compiled PHP 1.3.15 to be a loadable module of Apache. It worked right away, and produces graphics lightning-fast on a AMD K6-2 350.

Eventually, though, I won't be completely happy with this solution, because I prefer FreeBSD, and I would rather have PHP be compiled into Apache, and I would rather have PHP 4 so I can use the Zend optimizer.

Anyone managing to do this, please let me know.

rycamor
Member
posted August 10, 2000 10:06 AM     Click Here to See the Profile for rycamor   Click Here to Email rycamor     Edit/Delete Message Reply w/Quote
Here is what I had to do to get gd and Freetype compiled on FreeBSD4.0; I hope this is at least somewhat helpful to Linux users also:

(Notes: I used gmake instead of make, but if you don't have gmake, it should still work with 'make' and 'make install'. I used the DSO install method with Apache; I have not yet done this as a static linked install)

1. Assume X-windows, libpng, mysql, gmake and automake are already
installed.

2. Install libjpeg (from
ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz )
a) ./configure --enable-shared
b) gmake, gmake install

3. Install Freetype 1.3.1 (from http://www.freetype.org)
a) ./configure --enable-shared --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
b) gmake, gmake install
c) if freetype creates a freetype/ directory inside /usr/local/lib, copy all contents into /usr/local/lib

4. Install zlib 1.1.3 (from http://www.info-zip.org/pub/infozip/zlib/)
a) ./configure --shared
b) gmake, gmake install

5. Install gd (gd-1.8.3) (from http://www.boutell.com/gd)
a) edit Makefile for correct include and lib dirs, and uncomment the lines that enable all options, while commenting out the default lines
b) edit gd.c; remove 1st three lines (if - endif for malloc.h)
c) edit gdcache.h and ...php-src/ext/gd/gdcache.h (if exists) and replace <malloc.h> with <stdlib.h>
d) copy /usr/X11R6/include/X11 to /usr/X11R6/include/X11/X11 (gd looks recursively inside X11 to X11/*)
e) gmake, gmake install

6. Install apache-1.3.12
a) ./configure --prefix=/usr/local/apache --enable-module=all --enable-shared=max
b) gmake, gmake install

7. Install PHP4 (php-4.0.1pl2)
a) ./configure --prefix=/usr/local/php4 --with-mysql
--with-apxs=/usr/local/apache/bin/apxs --enable-track-vars --with-gd=/usr/local/ --with-jpeg-dir=/usr/local --with-xpm-dir=/usr/X11R6 --with-zlib-dir=shared
b) gmake, gmake install
c) sometimes I have found you need to reboot the system completely instead of just restart httpd

have fun ;-)

All times are MST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.