How to create phpinfo pages

Do you want to know PHP/Apache information? The easiest way is to use the phpinfo() function. 1. Log in to your control panel (cPanel, DirectAdmin, CWP etc) 2. Go to the File Manager and create a new file - phpinfo.php…

Continue Reading How to create phpinfo pages

How to get PHP information when phpinfo() function is disabled

Many web hosting companies choose to block the phpinfo function. When you try to run the function, you will get a PHP warning in the error_log file: [04-Apr-2018 17:23:48 UTC] PHP Warning: phpinfo() has been disabled for security reasons in /home/test/public_html/test2.php on…

Continue Reading How to get PHP information when phpinfo() function is disabled

Disable dangerous PHP functions on your web hosting server

Not dangerous by design, some PHP functions can be used for malicious purposes. Many web hosting providers choose to disable such functions. Some of the functions are: apache_child_terminateapache_get_modulesapache_noteapache_setenvdefine_syslog_variablesdisk_free_spacedisk_total_spacediskfreespacedlescapeshellargescapeshellcmdexecextractget_cfg_varget_current_usergetcwdgetenvgetlastmogetmygidgetmyinodegetmypidgetmyuidini_restoreini_setpassthrupcntl_alarmpcntl_execpcntl_forkpcntl_get_last_errorpcntl_getprioritypcntl_setprioritypcntl_signalpcntl_signal_dispatchpcntl_sigprocmaskpcntl_sigtimedwaitpcntl_sigwaitinfopcntl_strerrorppcntl_waitpcntl_waitpidpcntl_wexitstatuspcntl_wifexitedpcntl_wifsignaledpcntl_wifstoppedpcntl_wstopsigpcntl_wtermsigphp_unamephpinfopopenposix_getloginposix_getpwuidposix_killposix_mkfifoposix_setpgidposix_setsidposix_setuidposix_ttynameposix_unameposixcproc_closeproc_get_statusproc_niceproc_openproc_terminateps_auxputenvreadlinkrunkit_function_renameshell_execshow_sourcesymlinksyslogsystem For more details on these functions please search the PHP site at…

Continue Reading Disable dangerous PHP functions on your web hosting server

How to list compiled PHP Modules

Sometimes is useful to see what modules are compiled in your PHP installation.Let's see how we can check this both on the server/root level and on the user level. 1. On the server/root levelOn the server level, you can use…

Continue Reading How to list compiled PHP Modules