cancel
Showing results for 
Search instead for 
Did you mean: 

Php info

FIXED
chrisandaud
Dabbler
Posts: 15
Thanks: 8
Fixes: 2
Registered: ‎17-02-2014

Php info

Please can someone point me in the right direction to find out the modules available in php?  phpinfo() is disabled for security reasons.  I have tried to use password_hash() and password_verify() but they are not available.  As I spent some time developing my site at home before uploading it this was time wasted.  I'd like to avoid that in future.

Incidentally I raised a ticket asking this question and was told not only that support couldn't help but they couldn't suggest anyone who could!

Any help appreciated.

5 REPLIES 5
chrisandaud
Dabbler
Posts: 15
Thanks: 8
Fixes: 2
Registered: ‎17-02-2014

php error_reporting(0);

Does anybody know why error_reporting(0); seems to have no effect on php sites in free webspace and both my error handler (set using $old_error_handler = set_error_handler("userErrorHandler");) and my exception handler (set using $old_exception_handler = set_exception_handler('handleException');) fail to execute?  When I test by inserting a call to a nonexistent function I get a page with no header and a body containing Fatal error: Call to undefined method ....

Any help appreciated.

 

Strat
Community Veteran
Posts: 31,320
Thanks: 1,609
Fixes: 565
Registered: ‎14-04-2007

Re: php error_reporting(0);

Moderator Note by Dick (Strat)

PHP topics merged.

Windows 10 Firefox 109.0 (64-bit)
To argue with someone who has renounced the use of reason is like administering medicine to the dead - Thomas Paine
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Php info

You can find out which extensions have been loaded by calling the get_loaded_extensions function. and printing out the returned array yourself. The linked PHP manual page provides an example for dumping this. You need to wrap the dump output in <pre> ... </pre> tags for line-by-line display.

To get PHP errors to display you need to turn display_errors on and set error reporting to  32767 in .htaccess. Note:please check names; this post is from memory, I'm currently installing apps after doing a clean install of W10 on my PC. My reference files are still on backup media.

The mods have merged both your questions into the one file which makes answering easier. If more questions crop up postthem in this topic. Smiley

David
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Php info


@spraxyt wrote:

To get PHP errors to display you need to turn display_errors on and set error reporting to  32767 in .htaccess.


Having retrieved my files from backup I can confirm the .htaccess settings you need are

php_value display_errors 1
php_value error_reporting 32767

These need to go in  the .htaccess file in /public.

David
chrisandaud
Dabbler
Posts: 15
Thanks: 8
Fixes: 2
Registered: ‎17-02-2014

Re: Php info

Fix

Many thanks, spraxyt for the quick helpful pointer to an area of php I had completely overlooked in my self-tuition.  It is what Donald Rumsfeld once called an "unknown unknown"!  Now at least it is a known unknown and by the end of the day I hope it will be a known known!

Tags (1)