Jump to content

Phpinfo() Disabling Can Break Scripts


Recommended Posts

I just spent an entire 12 hour work day trying to figure out what was breaking my photo uploads only to find that phpinfo() was disabled and the script was calling on it to determine the gd status.


As a heads up to others, if you're experiencing problems check your upload or other scripts that might be calling on this function.


As a note to TCH, please, please, please start notifying us of these changes (no matter how small they may seem). It may seem that the only consequence of disabling phpinfo() is not being able to pull up the info page but for those of us using extensive scripting, changes such as this can wreak havoc on our sites causing us to try to track down a problem that we should have been informed of in the first place.


A new forum or extensive thread announcing changes (the seemingly "little ones") seems like a great idea, giving us a reference to check changes so we can save time trying to figure out for ourselves why things aren't working.


Thanks for the ears.

Link to comment
Share on other sites

I'm just curious what script broke, whether it was one other customers may have or one you wrote yourself.


The reason I ask is twofold. The first is so others can know it may become a problem for them and the other is to see what non-standard scripts are out there in common use. I'm no PHP pro but it seems the "normal" way to check to see if gd is loaded is to use


Maybe you could incorporate this into your script instead of trying to parse phpinfo?


Hope it helps.

Link to comment
Share on other sites

It's a pretty common check for the gd version found in image upload scripts:


function checkgd(){







$phpinfo=stristr($phpinfo,"gd version");



if ($gd[0]=='2'){$gd2="yes";}

return $gd2;



Thanks for the alternate means, but, honestly, it was no problem for me to find a solution once I knew phpinfo() had been disabled. The problem is that I spent 12 hours trying to find the source of the problem because no one informed me that the function was no longer available. This has happened more than once that I've had to spend entire days tracking down a problem that could have been prevented had a change been widely announced. Can we please have some sort of announcement system for minor changes? I'm subscribed to everything I know of but critical information is being missed and I simply can't afford any more days like this. I'm pooped!

Edited by cherryo
Link to comment
Share on other sites



I am sorry that you had problems but do to the severity of the issues the upgrade needed be done.

We did post in our Scheduled Server Maintenance and Updates forum about this as soon as we knew we were going to proceed with the upgrade.

You can review upgrade notices like this one

and can also set your self up to be notified of any furhter upgrades or server maintenance by subscribing to that forum by simply clicking on Forum Options and clicking on Subscribe to this forum.

This way you will be alerted for future planned upgrades.



Link to comment
Share on other sites

I just saw that info in the link you sent, so my bad for missing that.


Have there been any changes in our ability to modify settings for php.ini via .htacess? Scripts that ran perfectly before (after my own modifications) are now timing out big time and I have to keep refreshing the page over and over and over again until they complete.

Edited by cherryo
Link to comment
Share on other sites

  • 3 weeks later...

I do image uploading in the guestbook script I maintain but the script just uses


if (is_function(imagejpeg))


to see if GD is installed when making thumbnails. But as Jim says using extension_loaded('GD') would seem a far better method of checking if it is installed not to mention less cpu intensive as parsing the phpinfo().

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...