Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

santosh-reddy's avatar

site not working in server but in local its fine

The site in the local is working great but when uploaded to the server it is throwing some security warnings. Warning: getenv() has been disabled for security reasons. and even the info.php is not wroking

0 likes
3 replies
Cronix's avatar

getenv() has been disabled for security reasons

Is this your own server, or shared hosting? If it's shared hosting, you should ask them as they would have to enable getenv(). There may also be a way to enable it via the control panel (like cpanel or something). If it's your server, you'd just have to enable getenv() in your php.ini. In php.ini, you'd look for a line with disable_functions and remove it from there so it's enabled.

The same would be true for the phpinfo() function (I assume that's what you mean by "info.php not working").

@jlrdw I think there's enough info to answer lol. It says exactly what's wrong.

Please or to participate in this conversation.