Cacti (home)ForumsDocumentation

Install PHP

  1. Download the latest version of PHP 5.5 from http://windows.php.net.

PHP 5.6 has known issues with Cacti 0.8.8, do NOT use.

  • IIS: Get the VC11 x86 or x64 Non Thread Safe (NTS) release.
  • Apache: Get the VC11 x86 or x64 Thread Safe (TS) release.
  1. Extract the ZIP file to C:\PHP\
  2. Add C:\PHP\ to your Windows PATH environment variable.
  • The Windows path variable can be accessed via the Control Panel at: System | Advanced | Environment Variables
  • In the System Variables groupbox, find Path and click Edit and add: C:\PHP\
  1. Add a new system variable called PHPRC. Its value should be: C:\PHP\
  2. Add a new system variable called MIBDIRS. Its value should be: C:\PHP\Extras\mibs
  3. Rename C:\PHP\php.ini-production to C:\PHP\php.ini
  4. Find and then uncomment/modify the following lines in C:\PHP\php.ini.
    doc_root = C:\inetpub\wwwroot\
    expose_php = Off
    safe_mode = Off
    extension_dir = C:\PHP\ext
    fastcgi.impersonate = 1
    fastcgi.logging = 0
    register_argc_argv = On
    cgi.fix_pathinfo = 1
    cgi.force_redirect = 0
    upload_tmp_dir = C:\PHP\Uploadtemp
    session.save_path = C:\PHP\Session
    error_log = C:\php\php_errors.txt
    Date date.timezone = "America/Los_Angeles"  //(set your correct zone from http://php.net/manual/en/timezones.php)//
  5. Uncomment the following extensions in C:\PHP\php.ini
    php_gd2.dll
    php_ldap.dll
    php_mysql.dll
    php_mysqli.dll
    php_snmp.dll
    php_sockets.dll
  6. The following resource limits should be changed from their defaults. Depending on the scripts, amount of data being returned and number of devices you use, they might need to be further increased at a later period in time.
    max_execution_time = 60 ; Maximum execution time of each script, in seconds
    max_input_time = 120 ; Maximum amount of time each script may spend parsing request data
    memory_limit = 128M ; Maximum amount of memory a script may consume (8MB)
  7. Verify PHP is functional by running the following at the command prompt:
    php -m

Make sure the MySQL, SNMP and Sockets PHP modules are in the list.

If messages with, Cannot find module appearing, then there is something wrong with the MIBDIRS variable or missing mib files in the PHP\Extras\mib folder.

  1. If you have had previous versions of PHP installed, you had likely moved the PHP system files to in the Windows directory structure. If so, you will have to remove those files. Please review your PHP installation documentation for instructions on removing those files.
  2. Change NTFS permissions on C:\PHP\Uploadtemp and C:\PHP\Session to grant Modify rights to the IUSR_ and IIS_WPG users for only files in the directory.
  3. Give the user who will be running the scheduled task, Modify rights to: c:\php\extras\mibs\.index





Personal Tools