How to fix not working returns blank instead of php information

How to fix not working

At time you may be faced with the issue of <? phpinfo(); ?> not working or its returning black page. I ran into this issue on my AlmaLinux system. I run laravel app to be specific.

Now when I entered <? phpinfo(); ?> it just wasn’t printing the information that is needed other than a blank page. Below we have explained how you can fix such issues.

If you have faced this issue it means that is the reason why you are here and we are going to solve the issues together.

Now how do you fix <? phpinfo(); ?> now working issue on your system? Look below

To fix this error simply change your code as seen below.

Wrong code: <? phpinfo(); ?>

Valid code: <?php phpinfo(); ?>

The above solution works at almost all the time but if it doesn’t work I suggest that you try the second option below.

In your PHP.ini you have Short_Open_Tag turned off (which is probably not a bad idea).

Remember you have to restart the IIS too to make the php.ini changes get affected

Leave a Reply

Your email address will not be published.