Web Hosting Talk







View Full Version : HELP with PHP.INI


certify
11-01-2002, 08:31 AM
I use a Linux RedHat 7.1 with plesk 2.0. I wanted to load php_gd.dll, how do I do that in Linux? In my windows pc I uncomment it and restart PHP and it worked, however it won't work on the Linux. Please help.


;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automaticly, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.


;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
;
;extension=php_bz2.dll
;extension=php_ctype.dll
;extension=php_cpdf.dll
;extension=php_curl.dll
;extension=php_cybercash.dll
;extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_domxml.dll
;extension=php_dotnet.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd.dll
;extension=php_gettext.dll
;extension=php_hyperwave.dll
;extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_ingres.dll
;extension=php_interbase.dll
;extension=php_java.dll

The Prohacker
11-01-2002, 08:39 AM
Dynamic link libaries are only supported in windows.. To enable GD support in PHP your are going to need to recompile PHP with --with-gd=/path/to/gd

certify
11-01-2002, 08:48 AM
can you provide me with the steps?

The Prohacker
11-01-2002, 08:56 AM
Originally posted by certify
can you provide me with the steps?

Download the latest PHP from php.net: Currently 4.2.3..

View a phpInfo() page on your server to get the configure line, it will look something like this:

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd=../gd-1.8.4' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-imap=../imap-2001.BETA.SNAP-0105220031' '--with-mcrypt' '--with-ming=../ming-0.1.1' '--enable-magic-quotes' '--with-mysql' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-safe-mode' '--enable-track-vars' '--with-ttf' '--with-zlib'

Remove all ' ' so it looks like this:

./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-bcmath --enable-calendar --with-curl --with-swf=/usr/local/flash --enable-ftp --with-gd=../gd-1.8.4 --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-imap=../imap-2001.BETA.SNAP-0105220031 --with-mcrypt --with-ming=../ming-0.1.1 --enable-magic-quotes --with-mysql --with-pear --enable-xslt --with-xslt-sablot --enable-safe-mode --enable-track-vars --with-ttf --with-zlib


Notice my bolded area above, thats where you apply it to your config line...

Now untar your PHP tarball and change to the directory..

Run your configure command with the needed features..

After its done running do:

make

And then:

make install

Restart apache, and check your phpInfo() to make sure you now have GD support :D

certify
11-01-2002, 09:41 AM
'./configure' '--with-apxs=/usr/local/psa/apache/bin/apxs' '--prefix=/usr/local/psa/apache' '--with-system-regex' '--with-config-file-path=/usr/local/psa/apache/conf' '--disable-debug' '--disable-pear' '--enable-sockets' '--enable-track-vars' '--without-gd' '--with-mysql=/usr/local/psa/mysql' '--with-iodbc=/usr/lib' '--with-imap=/usr/local/src/imap-2001a'

./configure --with-apxs=/usr/local/psa/apache/bin/apxs --prefix=/usr/local/psa/apache --with-system-regex --with-config- file-path=/usr/local/psa/apache/conf --disable-debug --disable-pear --enable-sockets --enable-track-vars --with-gd=../gd-1.8.4 --with-mysql=/usr/local/psa/mysql --with-iodbc=/usr/lib --with-imap=/usr/local/src/imap-2001a

Ok I have copy and remove all the ' and now I should run the configure in the root?

certify
11-02-2002, 05:28 AM
I understand now... but I got this error


configure: error: Unable to find libgd.(a|so) anywhere under /usr/lib



[root@cheng php-4.2.3]# locate libgd
/usr/lib/libgdbm.so.2
/usr/lib/libgdbm.so.2.0.0
/usr/lib/libgd.so
/usr/lib/libgd.so.1
/usr/lib/libgd.so.1.8
/usr/lib/libgd.so.1.8.3
/usr/lib/libgd.a
/usr/lib/libgdbm.a
/usr/lib/libgdbm.la
/usr/lib/libgdbm.so


What should I do now?

certify
11-02-2002, 06:05 AM
Getting nearer.


[root@cheng libexec]# /usr/local/psa/apache/bin/apachectl start
PHP Warning: Unable to load dynamic library './php_gd.so' - ./php_gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
/usr/local/psa/apache/bin/apachectl start: httpd started

certify
11-02-2002, 06:12 AM
Ok the GD support is running but I still received the error when I start httpd