+ Responder ao Tópico



  1. #1
    vandemberg
    Visitante

    Padrão Install PHP com gd2

    Colegas,
    A mais de mês estou tentando instalar o php com supote ao gd2.
    Sem o gd eu instalo beleza mais quando eu ativo a opção no configure é onde meus problemas começam. PHP-4.3.10
    veja a linha que estou digitando:
    ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-zlib-dir=/usr --with-freetype-dir=/usr --with-xpm-dir=/usr/X11R6
    VEJA O ERRO:
    checking for GD support... yes
    checking for the location of libjpeg... /usr
    checking for the location of libpng... /usr
    checking for the location of libXpm... /usr/X11R6
    checking for FreeType 1.x support... no
    checking for FreeType 2... /usr
    checking for T1lib support... no
    checking whether to enable truetype string function in GD... no
    checking whether to enable JIS-mapped Japanese font support in GD... no
    checking for jpeg_read_header in -ljpeg... (cached) yes
    checking for png_write_image in -lpng... (cached) yes
    checking for XpmFreeXpmImage in -lXpm... no
    configure: error: Problem with libXpm.(a|so) or libX11.(a|so). Please check con
    ig.log for more information.
    ----
    sinceramente eu nao quero a opção de xpm pro php.. só quero o gd com jpeg e png mais ele nao vai sem que eu coloque todas as opções acima.. quando eu coloco --disable-xpm ele mostra:
    checking for the location of libXpm... no
    If configure fails try --with-xpm-dir=<DIR>
    configure: error: freetype2 not found!
    --
    e ai nao vai!!

    Alguem teria alguma dica pra me dar????? ja descompactei um arquivo xpm-3.4k-linux que achei na net e copiei os arquivos para os devidos cantos e nada de da certo.
    Alguma dica... cancei de apanhar

  2. #2
    jamba
    Visitante

    Padrão Install PHP com gd2

    Tenta outro pacote do Gd..eu tb nao consegui, posta ai se rolar contigo

  3. #3

    Padrão Install PHP com gd2

    kra

    quando vc configurou o gd, como vc fez? ele encontrou no configure os modulos q vc queria compilar?

    pq o suporte as libs q vc quer usar no php, tem q estar compilados no seu gd tbm, se nao o php naum vai achar mesmo??

    o segredo ae, eh saber se tua gd tah bem configurada

    []'s

  4. #4
    vandemberg
    Visitante

    Padrão Install PHP com gd2

    Cara,
    Ok, vc me atentou para um detalhe.. mas veja:
    Quando compilo o gd 2.0.33 no final ele me mostra o seguinte:
    ./configure --with-png=/usr --with-freetype2=/usr --with-jpeg=/usr --with-xpm=/root/xpm-3.4k-linux

    ** Configuration summary for gd 2.0.33: (nao sei pq nao ativou o freetype nem o xpm)

    Support for PNG library: yes
    Support for JPEG library: yes
    Support for Freetype 2.x library: no
    Support for Fontconfig library: no
    Support for Xpm library: no
    Support for pthreads: yes
    ...
    ja no php.. executo a seguinte linha.
    ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-zlib-dir=/usr --disable-freetype2 --disable-xpm

    justamente pra ativar apenas os modulos que foi compilado no gd.. ai me da o segunte erro:

    checking for GD support... yes
    checking for the location of libjpeg... /usr
    checking for the location of libpng... /usr
    checking for the location of libXpm... no
    checking for FreeType 1.x support... no
    checking for FreeType 2... no
    checking for T1lib support... no
    checking whether to enable truetype string function in GD... no
    checking whether to enable JIS-mapped Japanese font support in GD... no
    checking for jpeg_read_header in -ljpeg... (cached) yes
    checking for png_write_image in -lpng... (cached) yes
    If configure fails try --with-xpm-dir=<DIR>
    If configure fails try --with-freetype-dir=<DIR>
    configure: error: Unable to find gd.h anywhere under /usr

    Alguma luz??

  5. #5

    Padrão Install PHP com gd2

    desativa o suporte a xp no gd... alias.. tira ele da sintaxe do conifgure soh

    e tenta variacoes do path do freetype na hora d compilar o gd... tipow

    /usr/lib ou
    /usr/lib/freetype2

    em algum desses paths ele tem q encontrar o freetype, ele tem q saber onde estah o .h (header) do freetype...

    []'s

  6. #6
    vandemberg
    Visitante

    Padrão Install PHP com gd2

    fiz como vc indicou no gd... ficou a mesma configuração..
    Support for PNG library: yes
    Support for JPEG library: yes
    Support for Freetype 2.x library: no
    Support for Fontconfig library: no
    Support for Xpm library: no
    Support for pthreads: yes
    ---
    Ai vou no php-4.3.10 e dou o seguinte configure..
    ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-zlib-dir=/usr --without-freetype --without-xpm
    --
    Ai me passa o seguinte erro..
    checking for GD support... yes
    checking for the location of libjpeg... /usr
    checking for the location of libpng... /usr
    checking for the location of libXpm... no
    checking for FreeType 1.x support... no
    checking for FreeType 2... no
    checking for T1lib support... no
    checking whether to enable truetype string function in GD... no
    checking whether to enable JIS-mapped Japanese font support in GD... no
    checking for jpeg_read_header in -ljpeg... (cached) yes
    checking for png_write_image in -lpng... (cached) yes
    If configure fails try --with-xpm-dir=<DIR>
    If configure fails try --with-freetype-dir=<DIR>
    configure: error: Unable to find gd.h anywhere under /usr
    .---
    e quando dou...
    ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-zlib-dir=/usr --with-freetype-dir=/usr --with-xpm-dir=/usr
    ele me mostra..
    checking for GD support... yes
    checking for the location of libjpeg... /usr
    checking for the location of libpng... /usr
    checking for the location of libXpm... /usr
    checking for FreeType 1.x support... no
    checking for FreeType 2... /usr
    checking for T1lib support... no
    checking whether to enable truetype string function in GD... no
    checking whether to enable JIS-mapped Japanese font support in GD... no
    checking for jpeg_read_header in -ljpeg... (cached) yes
    checking for png_write_image in -lpng... (cached) yes
    checking for XpmFreeXpmImage in -lXpm... no
    configure: error: Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information.
    --
    ja instalei o pacotes libXpm-4.3.99.903-5.i386.rpm, copiei tudo que tinha em xpm-3.4k-linux.tgz para os devidos cantos e por ultimo tentei compilar o pacote xpm-3.4g mais da um erro..
    [root@server xpm-3.4g]# imake
    Imakefile.c:34: Imake.tmpl: Arquivo ou diretório não encontrado
    imake: Exit code 1.
    Stop.
    [root@server xpm-3.4g]#

    O que eu faço meu povo?!?!?!

  7. #7

    Padrão Install PHP com gd2

    tenta assim

    Código :
    ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-gd --with-gd2=/usr/lib --with-zlib --with-jpeg --with-png --with-mysql

    se vc naum quer freetype nem xpm, nao chegue a mencionar ele na sintaxe do configure

    []'s

  8. #8
    vandemberg
    Visitante

    Padrão Install PHP com gd2

    Putzzz cara... Deu certo!!!!!!
    Muuito obrigado.

    Mas me responde uma coisa:
    eu baixei e compilei esses pacotes.. jpeg-6b, libpng-1.2.7 e zlib-1.1.4..
    Foi necessário ou nao precisava fazer isso?

    E mais uma vez... obrigado.

  9. #9

    Padrão Install PHP com gd2

    vc precisa do header desses pacotes pra compilar a gd com suporte a eles...

    geralmente, os .rpms naum trazems os headers, logo, eh necessario baixar os fontes, como vc fez, e instalar, pq assim os headers saum gravados no disco em /usr/lib/include

    []'s

  10. #10
    jamba
    Visitante

    Padrão Install PHP com gd2

    Dando continuacao nesse topico.

    Estou com o mesmo problema que nosso amigo dono do topico porem ja resolvi 90%. Estou configurando meu php assim

    Código :
    ./configure --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc/ --with-gettext --with-xml --with-mcrypt=../libmcrypt-2.5.7/ --with-pear=/usr/share/pea
    r --with-imap-ssl=../openssl-0.9.7e --with-imap=/usr/local/imap2004a --with-mysql --with-gd=/usr/local/include --with-freetype-dir=/usr/lib --with-png-dir=/
    usr/lib --with-jpeg-dir=/usr/lib --with-zlib-dir=/usr/include --with-xpm-dir=/usr/X11R6/lib

    O gd.h eh encontrado porem me retorna outro erro
    configure: error: Unable to find libgd.(a|so) anywhere under /usr/local/include

    A libgd.a e libgd.so.2.0.0 encontram-se em /usr/local/lib . E agora?? Danou-se. Se troco a path no 'configure' da outro erro falando que nao encontra o gd.h na path informada.

  11. #11
    jamba
    Visitante

    Padrão Install PHP com gd2

    Consegui, basta colocar --with-gd-sir=/usr/local ou onde estiver instalado seu gd