Categories
linux PHP Technology

How to debug if phpinfo() is Disabled ?

Some server (hosting) providers choose to disable the PHP function phpinfo() for security reasons or say vulnerability in PHP 5.3 CVE-2014-4721, because it displays information which can be used to compromise the server that your site is running on. phpinfo() outputs almost every information about PHP’s configuration, such as the values of PHP directives, loaded extensions and environment variables.

In cases where phpinfo() is disabled, debugging problems in PHP is much more difficult. But, even though phpinfo() is disabled, you can still find that information using php’s core functions:

<?php
//PHP directives
echo ini_get(upload_max_filesize); // 2M

//Extensions/modules
print_r(get_loaded_extensions());

//Environment variables
print_r($_ENV);

//PHP or extension version
echo phpversion(); // 5.3.26
echo phpversion('pdo_mysql'); // 1.0.2
?>

In case you have SSH access to the server, “php -i” can also be used to get PHP configuration settings. For example, to get the configuration for the PDO – MySQL extension:

$ php -i|grep pdo_mysql

Or to get the version of PHP:

$ php -v

Though you can get lot of information without need of enabling phpinfo() but still if you want to enable it, learn “How to Enable and disable phpinfo()“.

'Coz sharing is caring
Categories
linux Microsoft

What are .deb, .rpm and .msi?


Files such as .deb and .rpm are more akin to a .zip file. They’re a directory tree of files and sub-directories that contain files related to a particular application and/or library of files.

Distros

The .deb files are meant for distributions of Linux that derive from Debian (Ubuntu, Linux Mint, etc.). The .rpm files are used primarily by distributions that derive from Redhat based distros (Fedora, CentOS, RHEL) as well as by the openSuSE distro.

What’s special about them?

These files have one other special trait that sets them apart from .zip files, in that they can include a specification that contains rules that tell the package manager software running on a system that’s installing one of these files to do additional tasks. These tasks would include things such as:

  • creating user accounts on the system
  • creating/modifying configuration files that aren’t actually contained in the .deb or .rpm file
  • set ownership/permissions on the files after installation
  • run commands as root on the system that’s installing the package
  • dependencies, both formats can include names or packages and/or service names that they require to be present on a system, prior to installation.

What about .msi files?

.msi files are similar to .deb & .rpm files but likely even more sophisticated. The .msi files are utilized by the Windows Installer and offer additional features such as:

  • GUI Framework
  • generation of uninstall sequences
  • A framework within itself – for use by 3rd party installers
  • Rollbacks
  • Advertisement
  • User Interface
  • etc.

I’d suggest taking a look at the various Wikipedia pages on these subjects if you want a more in-depth explanation.

References

'Coz sharing is caring