Current time: 01-09-2009, 06:49 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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 ;-)
Visit this user's website Find all posts by this user
Quote this message in a reply
09-19-2008, 09:15 PM
Post: #2
RE: Usage of phpinfo() in gd_version() of captcha.php
Translation please?
Find all posts by this user
Quote this message in a reply
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.
Find all posts by this user
Quote this message in a reply
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.

Visit this user's website Find all posts by this user
Quote this message in a reply
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

[Image: ryangordon.png]

My Blog - My Mods - My Site - There are no such things as bugs;
Just carefully articulated random features.

Figures lie, and liars figure
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: