php extension woes

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mynameisdan
Forum Newbie
Posts: 2
Joined: Wed May 25, 2005 11:22 am

php extension woes

Post by mynameisdan »

Hi, I am trying to find a way to switch on the GD Image Manipulation Library
. I can do this easily on my local machine, it's just a case of enabling it
in the php.ini file.

My problem is that I have to find a way to do it on someone else's server wh
ere they have virtual hosting and therefore cannot alter the php.ini file di
rectly - I am assuming the gd library is there but not enabled (since it is
bundled with php 4). Is there a way to enable it using something like ini_se
t() or similar? Please help, I am very tired... (Also, I know I could/should phone the webspace administrators, but what I really want is to develop the most generic, automatic solution possible)

dan
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

OK firstly, if it's there but not enabled ini_set() may do it. But guessing that since they administer their own server they could have the extension dir set to anything and may not even have the file at all.

Essentially, what I'm trying to say is, ask the server admin to do it for you, otherwise you're not gonna manage it without shell access.
mynameisdan
Forum Newbie
Posts: 2
Joined: Wed May 25, 2005 11:22 am

woes less than before

Post by mynameisdan »

Thanks for the reply, I thought that was where this was going but it's good to get comfirmation. I have also discovered the getimagesize() function which doesn't need the GD library and does 95% of what I needed, so it's all ok. Thanks for taking the time though :)

Dan
Post Reply