RE: [PHP] Adding GD libraries after compile

2002-06-28 Thread Martin Towell

dl() is your friend here - well it works fine on the win version at least...
:)

-Original Message-
From: PHPCoder [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 28, 2002 5:03 PM
To: php-general
Subject: [PHP] Adding GD libraries after compile


Hi
I have a working PHP build on my webserver, but it seems it was compiled 
without support for gd or pdflib and a couple of others.
Since rebuilding PHP requires a rebuild of apache as well, I really 
don't want to go that route unless 100% essential.
So, is there a way I can add these libs now without recompiling?
If not, what is the safest and easiest way for me to get apache php and 
mysql running again without major upsets.
Ta



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Adding GD libraries after compile

2002-06-28 Thread Jason Wong

On Friday 28 June 2002 15:03, PHPCoder wrote:
 Hi
 I have a working PHP build on my webserver, but it seems it was compiled
 without support for gd or pdflib and a couple of others.
 Since rebuilding PHP requires a rebuild of apache as well, I really
 don't want to go that route unless 100% essential.
 So, is there a way I can add these libs now without recompiling?
 If not, what is the safest and easiest way for me to get apache php and
 mysql running again without major upsets.

If you're using PHP as an Apache module then recompiling PHP does not mean you 
have to recompile Apache as well. Maybe including some information on your 
setup will enable others to ascertain what your best options are.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Root nameservers are out of sync
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Adding GD libraries after compile

2002-06-28 Thread Justin French

I've just done a little reading on dl(), and it would appear that I can
dynamically load the GD lib at run time.

Although it isn't really clear to me exactly how this is done, given that I
have the gd-1.8.4 directory in my doc root (although I haven't compiled it
as yet).

Quote the manual:

bool dl ( string library)

Loads the PHP extension given by the parameter library. The library
parameter is only the filename of the extension to load which also depends
on your platform. For example, the sockets extension (if compiled as a
shared module, not the default!) would be called sockets.so on unix
platforms whereas it is called php_sockets.dll on the windows platform.

/quote

If string library is just the file name (eg gd.so), then I don't see how I
can specify the directory which I'm storing the gd.so file AFTER I've
compiled it.

Does this mean that the gd.so library would have to be placed inside the
extension_dir as specified by php.ini?

This pretty much rules me out, since I'm on a shared server, and won't be
granted access to this directory.  Unless I could use ini_set to set the
extension directory.


Has any one got some sample code of how all this might string together?


Justin French


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Adding GD libraries after compile

2002-06-28 Thread Marek Kilimajer

Yes, you are ruled out, unless you can convice your administrator to 
include it.
Extensions are pure machine code, so if anybody could load his/her own 
extension,
he/she could easily gain http server priviledges.

Justin French wrote:

I've just done a little reading on dl(), and it would appear that I can
dynamically load the GD lib at run time.

Although it isn't really clear to me exactly how this is done, given that I
have the gd-1.8.4 directory in my doc root (although I haven't compiled it
as yet).

Quote the manual:

bool dl ( string library)

Loads the PHP extension given by the parameter library. The library
parameter is only the filename of the extension to load which also depends
on your platform. For example, the sockets extension (if compiled as a
shared module, not the default!) would be called sockets.so on unix
platforms whereas it is called php_sockets.dll on the windows platform.

/quote

If string library is just the file name (eg gd.so), then I don't see how I
can specify the directory which I'm storing the gd.so file AFTER I've
compiled it.

Does this mean that the gd.so library would have to be placed inside the
extension_dir as specified by php.ini?

This pretty much rules me out, since I'm on a shared server, and won't be
granted access to this directory.  Unless I could use ini_set to set the
extension directory.


Has any one got some sample code of how all this might string together?


Justin French


  




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php