|
Usage of phpinfo() in gd_version() of captcha.php
|
|
09-16-2008, 01:35 PM
Post: #1
|
|||
|
|||
|
Usage of phpinfo() in gd_version() of captcha.php
In gd_version() of captcha.php, you parse the phpinfo() result to retreive the GD version if GD is loaded.
GD provide the method gd_info() which return the version. It's: -> More easy to code -> More easy to read -> More efficient when phpinfo() is disabled by web hoster ;-) |
|||
|
09-19-2008, 09:15 PM
Post: #2
|
|||
|
|||
|
RE: Usage of phpinfo() in gd_version() of captcha.php
Translation please?
|
|||
|
09-20-2008, 03:34 AM
Post: #3
|
|||
|
|||
|
RE: Usage of phpinfo() in gd_version() of captcha.php
It means we should use gd_info() to determine the version of GD installed instead of parsing the output of php_info().
In the comments section of the gd_info() page, a user provided a way to take advantage of gd_info on newer systems (PHP 4.3+) while falling back on php_info() for older versions of PHP. It also caches the gd version so it doesn't have to be recalculated every time. |
|||
|
11-08-2008, 06:30 PM
(This post was last modified: 11-08-2008 06:34 PM by dvb.)
Post: #4
|
|||
|
|||
|
RE: Usage of phpinfo() in gd_version() of captcha.php
MyBB still using phpinfo...
Since PHP 4.3.0 the http://php.net/gd_info func' is available, considering MyBB dropped support for PHP 4, why not gd_info()? We also can read the constant GD_VERSION since PHP 5.2.4, so I would suggest to check it before the use of phpinfo(). Creativity is a drug I cannot live without.
|
|||
|
11-08-2008, 08:50 PM
Post: #5
|
|||
|
|||
|
RE: Usage of phpinfo() in gd_version() of captcha.php
we use gd_info for 1.6 and above. 1.4 still will stay compatible with PHP 4
![]() My Blog - My Mods - My Site - There are no such things as bugs; Just carefully articulated random features. Figures lie, and liars figure |
|||
|
« Next Oldest | Next Newest »
|
Search
Member List
Calendar
Help






![[Image: ryangordon.png]](http://belloman.rctgo.net/stuff/signatures/ryangordon.png)