LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   GD Library not support Slackware 12.1 (http://www.linuxquestions.org/questions/slackware-14/gd-library-not-support-slackware-12-1-a-676046/)

Slackwan 10-13-2008 09:00 AM

GD Library not support Slackware 12.1
 
Hello!

I Fresh install slackware 12.1 with httpd, php, mysql and more... Not KDE X Application

I try to test php script with gd library it's not support

My File
PHP Code:

<?php

/* Displays details of GD support on your server */

echo '<div style="margin: 10px;">';

echo 
'<p style="color: #444444; font-size: 130%;">GD is ';

if (
function_exists("gd_info")) {

    echo 
'<span style="color: #00AA00; font-weight: bold;">supported</span> by your server!</p>';

    
$gd gd_info();
        
    foreach (
$gd as $k => $v) {

        echo 
'<div style="width: 340px; border-bottom: 1px solid #DDDDDD; padding: 2px;">';
        echo 
'<span style="float: left;width: 300px;">' $k '</span> ';

        if (
$v)
            echo 
'<span style="color: #00AA00; font-weight: bold;">Yes</span>';
        else
            echo 
'<span style="color: #EE0000; font-weight: bold;">No</span>';

        echo 
'<div style="clear:both;"><!-- --></div></div>';
    }

} else {

    echo 
'<span style="color: #EE0000; font-weight: bold;">not supported</span> by your server!</p>';

}

</
p>';

echo '
</div>;

?>


#################
Out put

#################

GD is not supported by your server!

#################

In phpinfo GD Not show

Help me please!

How to work?

Alien Bob 10-13-2008 09:25 AM

On my Slackware-current machine I checked for GD support in PHP using the following code and putting it into a file phpinfo.php in my webserver's DocumentRoot:
Code:

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
//phpinfo(INFO_MODULES);

?>

The output (copying only the gd relevant part) from opening http://localhost/phpinfo.php is:
Code:

gd

  GD Support                      enabled
  GD Version                      bundled (2.0.34 compatible)
  FreeType Support                enabled
  FreeType Linkage                with freetype
  FreeType Version                2.3.5
  T1Lib Support                    enabled
  GIF Read Support                enabled
  GIF Create Support              enabled
  JPG Support                      enabled
  PNG Support                      enabled
  WBMP Support                    enabled
  XPM Support                      enabled
  XBM Support                      enabled
  JIS-mapped Japanese Font Support enabled

So GD support is very much present.
What do you see if you use this phpinfo file?

Eric

Edit: by the way, your code example has syntax errors, but when I fix them and use them on my server, I get the same confirmative output as from my own "phpinfo.php" file.

TL_CLD 10-13-2008 09:27 AM

Hey Slackwan,

Do you have this line uncommented in your php.ini file:

extension=gd.so

If not, add it, save php.ini and restart Apache.

:)
/Thomas

Slackwan 10-13-2008 10:36 PM

Thank you.

My phpinfo

Quote:

System Linux serv1 2.6.24.5-smp #2 SMP Wed Apr 30 13:41:38 CDT 2008 i686
Build Date Nov 10 2007 14:06:00
Configure Command './configure' '--prefix=/usr' '--with-apxs2=/usr/sbin/apxs' '--prefix=/usr' '--sysconfdir=/etc' '--disable-safe-mode' '--enable-apc' '--enable-apc-mmap' '--enable-memory-limit' '--enable-suhosin' '--disable-magic-quotes' '--enable-zend-multibyte' '--enable-mbregex' '--enable-tokenizer=shared' '--with-config-file-scan-dir=/etc/php' '--with-config-file-path=/etc/httpd' '--with-mod_charset' '--with-layout=PHP' '--enable-sigchild' '--enable-xml' '--with-libxml-dir=/usr' '--enable-simplexml' '--enable-spl' '--enable-filter' '--disable-debug' '--with-openssl=shared' '--with-pcre-regex=/usr' '--with-zlib=shared,/usr' '--enable-bcmath=shared' '--with-bz2=shared,/usr' '--enable-calendar=shared' '--enable-ctype=shared' '--with-curl=shared' '--with-curlwrappers' '--enable-dba=shared' '--with-gdbm=/usr' '--with-db4=/usr' '--enable-dbase=shared' '--enable-exif=shared' '--enable-ftp=shared' '--with-gd=shared' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib-dir=/usr' '--with-xpm-dir=/usr' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-native-ttf' '--enable-gd-jis-conv' '--with-gettext=shared,/usr' '--with-gmp=shared,/usr' '--with-iconv=shared' '--with-imap-ssl=/usr' '--with-imap=/usr/local/lib/c-client' '--with-ldap=shared' '--enable-mbstring=shared' '--with-hash' '--with-mhash=shared,/usr' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/bin/mysql_config' '--enable-pdo=shared' '--with-pdo-mysql=shared,/usr' '--with-pdo-sqlite=shared' '--with-pspell=shared,/usr' '--with-mm=/usr' '--enable-shmop=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--enable-sockets' '--with-sqlite=shared' '--enable-sqlite-utf8' '--with-regex=php' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx=shared' '--with-xsl=shared,/usr' '--enable-zip=shared' '--with-tsrm-pthreads' '--enable-shared=yes' '--enable-static=no' '--with-gnu-ld' '--with-pic' '--build=i486-slackware-linux'
Quote:

filter
Input Validation and Filtering enabled
Revision $Revision: 1.52.2.39 $

Directive Local Value Master Value
filter.default unsafe_raw unsafe_raw
filter.default_flags no value no value

ftp
FTP support enabled

gettext
GetText Support enabled

gmp
gmp support enabled
GMP version 4.2.2

hash
hash support enabled
Hashing Engines md2 md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru gost adler32 crc32 crc32b haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

iconv
iconv support enabled
iconv implementation glibc
iconv library version 2.7

Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1

imap
IMAP c-Client Version 2004
SSL Support enabled

NOT GD Library


##############

Hey Slackwan,

Do you have this line uncommented in your php.ini file:

extension=gd.so

If not, add it, save php.ini and restart Apache.
##############

Yes, I already to do.

But No Think change.

Please...

Slackwan 10-13-2008 10:41 PM

I fresh install packages in slackware 12.1 DVD Install

A
AP
D
K
L
N

Which package I did not installed?

TL_CLD 10-14-2008 01:36 AM

Do you have the file gd.so in /usr/lib/php/extensions?

disturbed1 10-14-2008 01:59 AM

Slackware 12.1
<?php
phpinfo();
?>

Code:

GD Support        enabled
GD Version        bundled (2.0.34 compatible)
FreeType Support        enabled
FreeType Linkage        with freetype
FreeType Version        2.3.5
T1Lib Support        enabled
GIF Read Support        enabled
GIF Create Support        enabled
JPG Support        enabled
PNG Support        enabled
WBMP Support        enabled
XPM Support        enabled
XBM Support        enabled
JIS-mapped Japanese Font Support        enabled


GD itself is in the l section.

You also have an older version of PHP installed. Sure you're using Slackware 12.1? Might want to install some security updates ;)
Build Date Nov 10 2007 14:06:00

For 12.1 with stable security updates
Build Date May 7 2008 16:13:11
Quote:

Wed May 7 16:30:09 CDT 2008
patches/packages/php-5.2.6-i486-1_slack12.1.tgz:
Upgraded to php-5.2.6.
This version of PHP contains many fixes and enhancements. Some of the fixes
are security related, and the PHP release announcement provides this list:
* Fixed possible stack buffer overflow in the FastCGI SAPI identified by
Andrei Nigmatulin.
* Fixed integer overflow in printf() identified by Maksymilian Aciemowicz.
* Fixed security issue detailed in CVE-2008-0599 identified by Ryan Permeh.
* Fixed a safe_mode bypass in cURL identified by Maksymilian Arciemowicz.
* Properly address incomplete multibyte chars inside escapeshellcmd()
identified by Stefan Esser.
* Upgraded bundled PCRE to version 7.6
When last checked, CVE-2008-0599 was not yet open. However, additional
information should become available at this URL:
http://cve.mitre.org/cgi-bin/cvename...=CVE-2008-0599
The list reproduced above, as well as additional information about other
fixes in PHP 5.2.6 may be found in the PHP release announcement here:
http://www.php.net/releases/5_2_6.php
(* Security fix *)

Slackwan 10-14-2008 03:39 AM

Thank for disturbed1

I installed from slackware 12.1 DVD install. Downloaded form Slackware mirror site.

Where URL to download For 12.1 with stable security updates
Build Date May 7 2008 16:13:11?

Tell me Please.

Alien Bob 10-14-2008 05:05 AM

Quote:

Originally Posted by Slackwan (Post 3309257)
I fresh install packages in slackware 12.1 DVD Install

A
AP
D
K
L
N

Which package I did not installed?

The Slackware package for GD needs several packages from the "x" series. For instance the fontconfig libX11 and libXpm packages.

Eric

Slackwan 10-14-2008 06:03 AM

Great Thank for Alien Bob

It work!!!!!!!!


All times are GMT -5. The time now is 01:08 AM.