Graphicals libraries not loaded.

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
cheikhbouchihda
Forum Commoner
Posts: 51
Joined: Thu Mar 02, 2006 2:08 pm
Location: France.

Graphicals libraries not loaded.

Post by cheikhbouchihda »

Hello,
The graphical libraries had been well installed, with Debian Linux, in the directory /usr/share/doc.
In the file, php.ini, I have decommented the ligne: extension=gd2.so, and added the path for the directory extension:
extension_dir=/usr/share/doc.
However, after the reboot of the pc(and apache), I look to the phpinfo and notice that the "table" gd does not exist!
I tryed to do an essay, by executing the following php file(let's call it gd.php):

Code: Select all

//gd.php 
 <?php 
    print "<pre>"; 
    print_r (gd_info()); 
    print "</pre>"; 
    ?>



Here is the result of the execution of gd.php:

Code: Select all

lynx http://localhost/gd.php
Fatal error: Call to undefined function: gd_info() in /var/www/gd.php on line
3



That mean: the graphical libraries that I have installed, are not loaded.
Ma question is: what must I do in order that the gd will be activated?
Thanks in advence for the help.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Try typing:

Code: Select all

dl('gd.so');
at the top of the file. dl() tries to load the extension its passed.

Not too sure how to get gd loaded at at start up - seems like you've got everything in order.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply