LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-28-2004, 11:46 AM   #1
sonaatti
LQ Newbie
 
Registered: Sep 2004
Posts: 17

Rep: Reputation: 0
compile php with gd ?


I didnīt get the php package that came with the installation to work, so I compiled php4 from source and it worked great until now when I want to use some php functions that needs gd http://www.boutell.com/gd/ , Iīve tried adding extension=gd.so into php.ini and restarted apache, but still didnīt work, do I have to compile php with gd, if so how do I do that ?
Also is the php package from slackware.com compiled with gd ?

Slackware 10
kernel 2.6...
 
Old 11-28-2004, 11:55 AM   #2
cccc828
Member
 
Registered: Feb 2004
Location: Austria
Distribution: Slackware
Posts: 95

Rep: Reputation: 15
The Slackware package comes with gd, and PHP comes with gd boundled, just pass --with-gd to the configure script.

cccc828
 
Old 11-28-2004, 12:09 PM   #3
sonaatti
LQ Newbie
 
Registered: Sep 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Yes indeed I found this in confiure
--with-gd[=DIR] Include GD support where DIR is GD install prefix.
If DIR is not set, the bundled GD library will be used."

so I guess itīs ok ?
but it doesnīt work.

Fatal error: Call to undefined function: imagecreate()

thatīs what Iīm trying to run, which needs gd... :/

Another thing is that when I restart apache it says itīs skipping the php4 module since itīs already loaded, how do I restart php ?
 
Old 11-29-2004, 10:46 AM   #4
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Quote:
Originally posted by sonaatti

Another thing is that when I restart apache it says itīs skipping the php4 module since itīs already loaded, how do I restart php ?

The makefile for PHP has likely added the module to your httpd.conf file again. It does that everytime you run "make install".

Also watch the configure process for any errors related to the inclusion of GD and check the config.log. You'll also probably want to have a look at phpinfo() in your browser. The GD info and formats it supports will be listed there if present:
Code:
<?php
phpinfo();
?>
If you're using one of the photo albums, you'll probably also need jpeg support, which is not included in the bundled GD. You can add it by compiling jpeg-6b, which you can get at ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz. Once you have that, then just add the "--with-jpeg-dir=pathtojpeg-6bsource" & "--with-jpeg-6b" switches to the PHP configure. You may also want exif, ie --enable-exif. Here is my config.nice script for reference:
Code:
#! /bin/sh
#
# Created by configure

'./configure' \
'--with-mysql=/usr/local/mysql' \
'--with-apache=../apache_1.3.33' \
'--with-jpeg-dir=../jpeg-6b' \
'--enable-safe-mode' \
'--with-zlib' \
'--with-gd' \
'--enable-exif' \
'--with-jpeg-6b' \
"$@"
Note though that I'm compiling the PHP module into Apache vs using it as a DSO module though.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Compile Problem xemoflyerx Linux - Software 2 01-23-2005 04:36 PM
can't compile php 4.3.3 adrianmak Linux - Software 3 11-20-2003 08:06 PM
Apache 2 and PHP 4.3.3 compile help gquiring Red Hat 1 11-03-2003 07:14 PM
PHP 4.3 compile on Redhat 9 men$an Linux - Software 1 05-23-2003 02:48 PM
Compile php grubjo Linux - Software 7 09-09-2002 03:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration