In normal cases an upgrade of CA-SAM you would use the build in Update Wizard Admin:
Admin -> Maintenance -> System update
This can be used if the PHP version is the same for both the running and the upgrading version. But when you also are upgrading the PHP level you must take a more manual approach.
You can run the PHP 5.6 and 7 layer in parallel, but for the ease of use this doc will just replace the PHP layer. This should eliminate many of the configuration steps.
Upgrading the PHP to 7 entails manual steps and verifications for a successful application of CA SAM 4.2.x
Before you begin any update run a ‘Check Installation’ to ensure that there is no errors especially in the Database area..
You may need to handle problems/errors by rebuilding the tables
You should not continue before the ‘Check Installation’ is returning no errors (Or errors that are knowingly acceptable e.g. an email missing)
Download VC 14 libraries
When upgrading to PHP7 we also switch to a 64bit PHP layer; this requires the Visual studio C++ Redistributable which can be downloaded from the following location:
2) Run and install the .exe
Download PHP 7
Before you start backup your existing PHP.INI.
In a typical installation, the PHP is installed here: C:\Program Files (x86)\CA\SAM\env\php copy the PHP.INI to the folder above naming the file to identify the 5.6 setting e.g.:php_5.6.ini
To get the new version of PHP7 (You need version 4.0) go to:
Download the ZIP file for VC14 x64 Non Thread Safe.. Note that we download the 64bit. This is to allow the handling of larger data sets. You can select the x86 but we recommend the 64 bit as the default.
1) Stop IIS
2) Rename C:\Program Files (x86)\CA\SAM\env\php to C:\Program Files (x86)\CA\SAM\env\php_5.6
3) Unzip the new downloaded file to: C:\Program Files (x86)\CA\SAM\env\php
Verify your PHP Folder is in the PATH and is the default PHP
4) Rename php.ini-production to php.ini
5) Edit PHP.INI according to the Admin Guide Page 9 Step 5: (Currently it resembles this)
output_buffering = Off
zlib.output_compression = Off
ignore_user_abort = On
max_execution_time = 72000
max_input_time = 3600
memory_limit = -1
log_errors = On
error_log = syslog
post_max_size = 1500M ;(or higher)
extension_dir = " C:\Program Files (x86)\CA\SAM\env\php\ext”
cgi.force_redirect = 0
cgi.rfc2616_headers = 0
upload_tmp_dir = " C:\Program Files (x86)\CA\SAM\tmp\upload”
upload_max_filesize = 1500M ;(or higher)
extension = php_gd2.dll
extension = php_mbstring.dll
extension = php_openssl.dll
date.timezone = (Must be set to the application server local timezone, see http://www.php.net/manual/en/timezones.php for a complete list)
session.save_path = "C:\Program Files (x86)\CA\SAM\tmp\session”
session.gc_maxlifetime = 86400
session.use_trans_sid = 0
6) Restart IIS
7) From the IIS Manager
8) Find the PHP setting, and select to Register new PHP version pointing to: C:\Program Files (x86)\CA\SAM\env\php\php-cgi.exe
---or this can be run using a command line:
SourceGuardian is replacing Zend Guard loader from older versions.
1) Download the SourceGuardian package according to your system.
2) Select the Windows 64-bit ZIP file.
3) Add the driver file ixed.7.0.win from the zip file to the PHP extensions directory:
(C:\Program Files (x86)\CA\SAM\env\php\ext)
4) Add the following line to the extensions section of php.ini:
Test the Extension by running Check phpinfo() from the IIS Manager, if you have a section like this, you have the right config:
Downloading the SQL PHP driver
1. Download SQL Server Driver for PHP. You need version 4.0.
2. Extract the .dll files from the package.
3. Copy php_sqlsrv_7_nts_x64.dll to php's extension directory
(default: C:\Program Files (x86)\CA\SAM\env\php\ext) corresponding to your PHP installation.
4. Add the following line to the extension section of the PHP.INI file
5. To verify do PHPinfo from IIS, you should see this section:
****You are now ready to upgrade the CA SAM application****
Download the 4.2.x from support.ca.com by selecting "IT Asset Manager" from the Download Products option.
Take a backup of the old Version
C:\Program Files (x86)\CA\SAM\app\htdocs\prod -> prod_old
C:\Program Files (x86)\CA\SAM\app\includes\prod -> prod_old
Copy the following 2 folders from the CA SAM.zip file:
Htdocs -> htdocs\prod
Includes -> includes\prod
Edit C:\Program Files (x86)\CA\SAM\app\includes\prod\st\config.ini, adjust all values to your system, at least the following; these values are found in the backed up file:
Include\prod_old\st to ensure all settings are moved to the new Config.ini from the old settings.
relative_app_root = "/prod/”
upload_path = C:\Program Files (x86)\CA\SAM\app\uploads\prod
java_executable = "<Path to Java installation>\\bin\\java.exe"
php_cli_executable = "C:\\Program Files(x86)\\CA\\SAM\\env\\php\\php.exe"
Under [database] add the data for your database connection
system = mssql
host = localhost
db = samprod
user = sa
password = CAdemo12
Then go to the Browser and start SAM e.g. http://localhost:90/prod
The system will present you with the Database upgrade
Opt to Update and then again Update ..
This will take some time.. Once it is done you will see a Status page:
Scroll through the page and ensure that there is no Errors.