This is a discussion on compile php 4.3.3 with gd within the PHP Language forums, part of the PHP Programming Forums category; I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt show in phpinfo(). ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
kecebong wrote:
> I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt show > in phpinfo(). My system is redhat 9 and apache 2.0.47 webserver. > From PHP 4.3.0 GD2 is built in and I believe on by default so try compiling without worrying about GD and it may not show up but try to use functions and they will probably work. -- John Downey http://delusive.dyn.ee http://sage.dev.box.sk http://blacksun.box.sk |
|
|||
|
John Downey wrote:
> kecebong wrote: > >> I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt >> show in phpinfo(). My system is redhat 9 and apache 2.0.47 webserver. >> > From PHP 4.3.0 GD2 is built in and I believe on by default so try > compiling without worrying about GD and it may not show up but try to > use functions and they will probably work. > it still does not work, I used gd_info() function and nothing came up. and then I tried to change my php.ini (overwrite it)and now there's an error message, how can I restore my php.ini? |
|
|||
|
kecebong wrote:
> it still does not work, I used gd_info() function and nothing came up. > and then I tried to change my php.ini (overwrite it)and now there's an > error message, how can I restore my php.ini? > PHP has its php.ini-dist and php.ini-recommended in the folder you uncompressed it to. As for the compilation try configuring using --with-gd2 and don't specify a path that should use the bundled version. -- John Downey http://delusive.dyn.ee http://sage.dev.box.sk http://blacksun.box.sk |
|
|||
|
"kecebong" <cebong@plungky.com> wrote in message news:avsmb.34216$Rd4.18244@fed1read07... > I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt show > in phpinfo(). My system is redhat 9 and apache 2.0.47 webserver. > What are your "configure" arguements? I have PHP configured on Apache 1.3.28 - When I compiled PHP I used the following: ../configure --with-mysql \ --with-apache=$src/apache \ --with-mcrypt \ --with-jpeg-dir \ --enable-exif \ --with-zlib-dir \ --with-gd \ --with-ttf \ --enable-gd-native-ttf \ --with-freetype-dir \ --with-mime-magic \ --disable-session \ --disable-cgi |
|
|||
|
Randell D. wrote:
> "kecebong" <cebong@plungky.com> wrote in message > news:avsmb.34216$Rd4.18244@fed1read07... > >>I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt show >>in phpinfo(). My system is redhat 9 and apache 2.0.47 webserver. >> > > > What are your "configure" arguements? > > I have PHP configured on Apache 1.3.28 - When I compiled PHP I used the > following: > > ./configure --with-mysql \ > --with-apache=$src/apache \ > --with-mcrypt \ > --with-jpeg-dir \ > --enable-exif \ > --with-zlib-dir \ > --with-gd \ > --with-ttf \ > --enable-gd-native-ttf \ > --with-freetype-dir \ > --with-mime-magic \ > --disable-session \ > --disable-cgi > > > > ../configure --with-gd2 --with-zlib-dir --with-openssl --disable-cli --with-apxs2=/usr/local/apache2/bin/apxs --with-jpeg-dir --with-ttf --enable-gd2-native-ttf --disable-cgi I followed some of your configuration, but it still doesnt show any graphics, I wonder what I did wrong? I use this script as to display graphic <?php // set up image $height = 200; $width = 200; $im = ImageCreate($width, $height); $white = ImageColorAllocate ($im, 255, 255, 255); $black = ImageColorAllocate ($im, 0, 0, 0); // draw on image ImageFill($im, 0, 0, $black); ImageLine($im, 0, 0, $width, $height, $white); ImageString($im, 4, 50, 150, 'Sales', $white); // output image Header ('Content-type: image/png'); ImagePng ($im); // clean up ImageDestroy($im); ?> and also > <?php > var_dump(gd_info()); > ?> to get information about my gd setup. but it displayed just blank white page. |
|
|||
|
John Downey wrote:
> kecebong wrote: > >> it still does not work, I used gd_info() function and nothing came up. >> and then I tried to change my php.ini (overwrite it)and now there's an >> error message, how can I restore my php.ini? >> > PHP has its php.ini-dist and php.ini-recommended in the folder you > uncompressed it to. As for the compilation try configuring using > --with-gd2 and don't specify a path that should use the bundled version. > thanks for the info how to restoring php.ini, it works. |
|
|||
|
kecebong wrote:
> Randell D. wrote: > >> "kecebong" <cebong@plungky.com> wrote in message >> news:avsmb.34216$Rd4.18244@fed1read07... >> >>> I tried to compile php 4.3.3 with gd but it doesn't work, it wasnt show >>> in phpinfo(). My system is redhat 9 and apache 2.0.47 webserver. >>> >> >> >> What are your "configure" arguements? >> >> I have PHP configured on Apache 1.3.28 - When I compiled PHP I used the >> following: >> >> ./configure --with-mysql \ >> --with-apache=$src/apache \ >> --with-mcrypt \ >> --with-jpeg-dir \ >> --enable-exif \ >> --with-zlib-dir \ >> --with-gd \ >> --with-ttf \ >> --enable-gd-native-ttf \ >> --with-freetype-dir \ >> --with-mime-magic \ >> --disable-session \ >> --disable-cgi >> >> >> >> > > > ./configure --with-gd2 --with-zlib-dir --with-openssl --disable-cli > --with-apxs2=/usr/local/apache2/bin/apxs --with-jpeg-dir --with-ttf > --enable-gd2-native-ttf --disable-cgi > I followed some of your configuration, but it still doesnt show any > graphics, I wonder what I did wrong? > > I use this script as to display graphic > > <?php > // set up image > $height = 200; > $width = 200; > $im = ImageCreate($width, $height); > $white = ImageColorAllocate ($im, 255, 255, 255); > $black = ImageColorAllocate ($im, 0, 0, 0); > > > // draw on image > ImageFill($im, 0, 0, $black); > ImageLine($im, 0, 0, $width, $height, $white); > ImageString($im, 4, 50, 150, 'Sales', $white); > > > // output image > Header ('Content-type: image/png'); > ImagePng ($im); > > > // clean up > ImageDestroy($im); > ?> > > and also > >> <?php >> var_dump(gd_info()); >> ?> > > > to get information about my gd setup. but it displayed just blank white > page. > well I finally got gd enabled by doing $ make clean and $ rm config.cache before $ ./configure new param. Thanks for all of the response. I got my answer from: http://www.php.net/manual/en/install.linux.php |