LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Need PHP/Pear extension GD (https://www.linuxquestions.org/questions/slackware-14/need-php-pear-extension-gd-843536/)

enine 11-10-2010 05:26 PM

Need PHP/Pear extension GD
 
Code:

pear/Image_Color requires PHP extension "gd"
It looks like I have to recompile php to include the pear extensions I need but how can I tell what all configure switches were used to compile the original Slackware php package

GrapefruiTgirl 11-10-2010 05:27 PM

Grab yourself the original Slackbuild script used to build the package. It will be on your installation media in the sources (DVD) or on any mirror that holds your version of Slack, or get one from slackbuilds.org.

Modify the original, adding the extra flags you need, and rebuild.

EDIT: For example, look in here (if you were running -current):
http://ftp.belnet.be/mirror/ftp.slac.../source/n/php/

enine 11-10-2010 07:21 PM

Ok, I didn't realize the slack source was made from slackbuild scripts.
So I downloaded php and added the --with-gd at the end of the configure, then it needed alpine so I downloaded it and its compiling now.

enine 11-10-2010 07:35 PM

well, another roadblock'

checking for utf8_mime2text signature... new
checking for U8T_DECOMPOSE...
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
make: *** No targets specified and no makefile found. Stop.
make: *** No targets specified and no makefile found. Stop.


looks like something to do with imap-ssl which I shouldn't need, trying without.

took out both --with-imap options and got this far

configure: error: libXpm.(a|so) not found.

which says I need libXpm

which needs xorg-macros

I'm not finding either of these on slackware or slackbuilds so I wonder how the original slackbuild worked, or maybe these are not needed without GD which is why GD was not included.
documenting in case anyone else ever tries.

niels.horn 11-10-2010 09:10 PM

Well, first of all, you can simply type:
Code:

php -i | less
on the command line to see all the options php was compiled with.

Second, I use Image_Color here as well and never needed to rebuild my own php...

enine 11-10-2010 09:32 PM

How did you get it to install? Mine says that extension is missing and stops.
even the php that came with slack doesn't look right, I started up apache and I get the listing of the php source when I browse to it instead of it actually running it.

niels.horn 11-11-2010 03:41 AM

I needed three extensions and simply typed:
Code:

  # pear install Image_Color-1.0.4
  # pear install Image_Canvas-0.3.2
  # pear install Image_Graph-0.7.2

as simple as that...

Just tried it on a clean Slackware 13.1 system and it works.

Niels

enine 11-11-2010 07:11 AM

This is a new install of 13.1

pear install Image_Color-1.0.4
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/gd.so' - libX11.so.6: cannot open shared object file: No such file or directory in Unknown on line 0
pear/Image_Color requires PHP extension "gd"
No valid packages found
install failed

OK, I need to back up a step, I see gd.so but libX11.so.6 is missing. I did an install all of slack so I need to see where to find that.

GrapefruiTgirl 11-11-2010 09:46 AM

Code:

root@reactor: grep libX11.so /var/log/packages/*
/var/log/packages/libX11-1.3.3-x86_64-1:usr/lib64/libX11.so.6.3.0
root@reactor:

Note I'm not running the exact same Slack version as you, but above, you can see the package that your (apparently) missing thing comes from. With a full install however, you shouldn't be missing this.

niels.horn 11-11-2010 10:43 AM

@enine: It really looks like your Slackware installation is not complete then... :(

I did that test a few posts back on a clean box, fresh, full, stock Slackware 13.1 installation.
Run that 'grep' line GrapefruiTgirl posted and tell us the result.

enine 11-11-2010 11:17 AM

I don't know what happened, others seem missing as well, guessing maybe I missed a section during the install or something, I reinstalled the whole thing again.

niels.horn 11-11-2010 01:01 PM

Well, I hope this way it works out fine then :)

mRgOBLIN 11-11-2010 02:17 PM

Yep GD links with a few packages from X

Refer to http://www.linuxquestions.org/questi...9/#post3367759

enine 11-11-2010 05:28 PM

Yes, worked fine after a reinstall, I don't know how I missed those packages the first time.
I still have the same php problem though but its unrelated.

niels.horn 11-11-2010 06:36 PM

Well, glad it was solved :)

enine 11-11-2010 06:44 PM

I figured even thought I installed a half dozen packages to get pear going I may have problems in the future as there could be other packages missing. Its pretty quick to start clean, I have my .iso on a nfs share then ESX mounts it as storage so I just map an .iso to the guest and reboot. Took maybe 30 minutes even on my underpowered hardware.


All times are GMT -5. The time now is 09:18 PM.