Problem in configuring PHP
| From: | garbepat at ifrance dot com | Date: | Sat, 18 Nov 2000 22:26:12 +0000 |
| Subject: | Problem in configuring PHP | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-840@lists.php.net to get a copy of this message | ||
I had a quite big problem configuring my PHP4.0 with
the "gd" lib.
The problem is completely described in the file
joined
to that message. I hope you will help me to resolve
it.
I also encountered another little problem which comes
maybe from my lack of knowledge in configuring PHP :
- I modified the "httpd.conf" of my Apache server to
change the document root.
- That change succeeded but when I use the "require"
directive in my PHP code the pre-processor do not
find
the included file. But the fact is my script worked
with the old document root !
So what can I do to make PHP find my files ? Do I
have
to set the "include_path" value in "php.ini" ?
But the problem is that I use relative paths ->
Example :
include_path = "/home/devhtml/[...]/htdocs"
I will work with :
require "lib/mylib.php" - called from the homepage.
but not with :
require "../lib/mylib.php" - called from another.
I hope you will help me to be less ignorant...
______________________________________________________________________________
Vous avez un site perso ?
2 millions de francs à gagner sur i(france) !
Webmasters : ZE CONCOURS ! http://www.ifrance.com/_reloc/concours.emailif
Taken from the "configure" output : checking whether to include GD support... yes (static) checking for gdImageString16 in -lgd... no checking for gdImagePaletteCopy in -lgd... no checking for gdImageColorClosestHWB in -lgd... no checking for compress in -lz... no checking for png_info_init in -lpng... no checking for gdImageColorResolve in -lgd... no checking for gdImageCreateFromPng in -lgd... no checking for gdImageCreateFromGif in -lgd... no checking for gdImageCreateFromXbm in -lgd... no checking for gdImageWBMP in -lgd... no debug.log : CONFIGURE: './configure' '--with-gd' CC: gcc CFLAGS: -g -O2 CPPFLAGS: CXX: CXXFLAGS: INCLUDES: -I$(top_builddir)/Zend -I$(top_srcdir) -I/usr/local/php-4.0.3pl1/ ext/mysql/libmysql LDFLAGS: LIBS: -lgd -lresolv -lm -ldl -lcrypt -lnsl -lresolv DLIBS: SAPI: cgi PHP_RPATHS: uname -a: Linux localhost.localdomain 2.2.17-21mdk #1 Thu Oct 5 13:16:08 CEST 2000 i686 unknown gcc -o conftest -g -O2 conftest.c -lgd -lresolv -lm -ldl -lcrypt -lnsl -lreso lv 1>&5 /usr/bin/ld: cannot find -lgd collect2: ld returned 1 exit status And here's the "make" result : Making all in Zend make[1]: Entre dans le répertoire `/usr/local/php-4.0.3pl1/Zend' make[1]: Rien à faire pour `all'. make[1]: Quitte le répertoire `/usr/local/php-4.0.3pl1/Zend' Making all in main make[1]: Entre dans le répertoire `/usr/local/php-4.0.3pl1/main' make[2]: Entre dans le répertoire `/usr/local/php-4.0.3pl1/main' gcc -I. -I/usr/local/php-4.0.3pl1/main -I/usr/local/php-4.0..3pl1 -I/usr/local/php-4.0.3pl1/main -I/usr/local/php-4.0.3pl1/Zend -I/usr/local/php-4.0.3pl1 -I/usr/local/php-4.0.3pl1/ext/mysql/libmysql -I/usr/local/php-4.0.3pl1/ext/xml/expat/xmltok -I/usr/local/php-4.0.3pl1/ext/xml/expat/xmlparse -I/usr/local/php-4.0.3pl1/TSRM -DXML_BYTE_ORDER=12 -g -O2 -c internal_functions.c && touch internal_functions.lo In file included from internal_functions.c:39: /usr/local/php-4.0.3pl1/ext/gd/php_gd.h:33: gd.h: Aucun fichier ou répertoire de ce type make[2]: *** [internal_functions.lo] Erreur 1 make[2]: Quitte le répertoire `/usr/local/php-4.0.3pl1/main' make[1]: *** [all-recursive] Erreur 1 make[1]: Quitte le répertoire `/usr/local/php-4.0.3pl1/main' make: *** [all-recursive] Erreur 1 The error means "gd.h" called in "php_gd.h" do not exist. But it is supposed to be included if you watch these few lines* : #if HAVE_LIBGD #include <gd.h> *You can also see the same lines in "gd.c". I think the better solution for me (for the moment) is to download the "gd" lib. on its website hoping that I will work. However, as It is supposed to work normally with the "gd" included package, I think that problem is quite serious and is to consider as a bug or something like that.
Taken from the "configure" output : checking whether to include GD support... yes (static) checking for gdImageString16 in -lgd... no checking for gdImagePaletteCopy in -lgd... no checking for gdImageColorClosestHWB in -lgd... no checking for compress in -lz... no checking for png_info_init in -lpng... no checking for gdImageColorResolve in -lgd... no checking for gdImageCreateFromPng in -lgd... no checking for gdImageCreateFromGif in -lgd... no checking for gdImageCreateFromXbm in -lgd... no checking for gdImageWBMP in -lgd... no debug.log : CONFIGURE: './configure' '--with-gd' CC: gcc CFLAGS: -g -O2 CPPFLAGS: CXX: CXXFLAGS: INCLUDES: -I$(top_builddir)/Zend -I$(top_srcdir) -I/usr/local/php-4.0.3pl1/ ext/mysql/libmysql LDFLAGS: LIBS: -lgd -lresolv -lm -ldl -lcrypt -lnsl -lresolv DLIBS: SAPI: cgi PHP_RPATHS: uname -a: Linux localhost.localdomain 2.2.17-21mdk #1 Thu Oct 5 13:16:08 CEST 2000 i686 unknown gcc -o conftest -g -O2 conftest.c -lgd -lresolv -lm -ldl -lcrypt -lnsl -lreso lv 1>&5 /usr/bin/ld: cannot find -lgd collect2: ld returned 1 exit status And here's the "make" result : Making all in Zend make[1]: Entre dans le répertoire `/usr/local/php-4.0.3pl1/Zend' make[1]: Rien à faire pour `all'. make[1]: Quitte le répertoire `/usr/local/php-4.0.3pl1/Zend' Making all in main make[1]: Entre dans le répertoire `/usr/local/php-4.0.3pl1/main' make[2]: Entre dans le répertoire `/usr/local/php-4.0.3pl1/main' gcc -I. -I/usr/local/php-4.0.3pl1/main -I/usr/local/php-4.0..3pl1 -I/usr/local/php-4.0.3pl1/main -I/usr/local/php-4.0.3pl1/Zend -I/usr/local/php-4.0.3pl1 -I/usr/local/php-4.0.3pl1/ext/mysql/libmysql -I/usr/local/php-4.0.3pl1/ext/xml/expat/xmltok -I/usr/local/php-4.0.3pl1/ext/xml/expat/xmlparse -I/usr/local/php-4.0.3pl1/TSRM -DXML_BYTE_ORDER=12 -g -O2 -c internal_functions.c && touch internal_functions.lo In file included from internal_functions.c:39: /usr/local/php-4.0.3pl1/ext/gd/php_gd.h:33: gd.h: Aucun fichier ou répertoire de ce type make[2]: *** [internal_functions.lo] Erreur 1 make[2]: Quitte le répertoire `/usr/local/php-4.0.3pl1/main' make[1]: *** [all-recursive] Erreur 1 make[1]: Quitte le répertoire `/usr/local/php-4.0.3pl1/main' make: *** [all-recursive] Erreur 1 The error means "gd.h" called in "php_gd.h" do not exist. But it is supposed to be included if you watch these few lines* : #if HAVE_LIBGD #include <gd.h> *You can also see the same lines in "gd.c". I think the better solution for me (for the moment) is to download the "gd" lib. on its website hoping that I will work. However, as It is supposed to work normally with the "gd" included package, I think that problem is quite serious and is to consider as a bug or something like that.