Upgrading CA SAM 4.2.x to PHP7

Document ID:  TEC1582072
Last Modified Date:  07/05/2017
{{active ? 'Hide' : 'Show'}} Technical Document Details

Products

  • CA Software Asset Manager

Components

  • CA SOFTWARE ASSET MANAGER:CASAM
Introduction:

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.

Background:

Upgrading the PHP to 7 entails manual steps and verifications for a successful application of CA SAM 4.2.x

Instructions:

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:

1)     http://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe

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:

http://windows.php.net/download#php-7.0

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

                    PHP -v

                          PHP Version.PNG

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

 

 

 

  • Verify PHP7.PNG
  • ---or this can be run using a command line:

    PHP -i

  • PHP -i.PNG

 

Download SourceGuardian

SourceGuardian is replacing Zend Guard loader from older versions.

1)   Download the SourceGuardian package according to your system.

https://www.sourceguardian.com/loaders.html

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:

    extension=ixed.7.0.win

 

Test the Extension by running Check phpinfo() from the IIS Manager, if you have a section like this, you have the right config:

 

 

  • -Confirm SourceGuard.PNG
  •  

    Downloading the SQL PHP driver

     

    1.      Download SQL Server Driver for PHP. You need version 4.0.

     https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=20098

    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

    a.      extension=php_sqlsrv_7_nts_x64.dll

    5.      To verify do PHPinfo from IIS, you should see this section:

     

 

SQL PHP Driver.PNG

 

****You are now ready to upgrade the CA SAM application****

Upgrading SAM 

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

      executable_files_path =

      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

presents you with.PNG

Opt to Update and then again Update ..

This will take some time.. Once it is done you will see a Status page:

 

Status page.PNG

Scroll through the page and ensure that there is no Errors.

Start the URL again and log in.

***Note - If you were issued a special license file you will need to copy it from include\prod_old\st\custom\ca\license.ini-->include\prod\st\custom\ca\license.ini

 

Connectors

The SQL Server and MySQL driver has changed with PHP7. Therefore you cannot use the mssql and mysql system settings; they need to be sqlsrv and mysqli.

Even though SAM is the current version, understand the substitute driver value:

connector.PNG

 We recommend that you change all Connector settings in the Browse Configuration as shown below:

connector settings.PNG

Please help us improve!

Will this information enable you to resolve your issue?

Please tell us what we can do better.

{{feedbackText.length ? feedbackText.length : '0'}}/255

{{status}}

Not what you were looking for?

Search Again >

Product Information

Support by Product >

Communities

Join a Community >

Chat with CA

Just give us some brief information and we'll connect you to the right CA ExpertCA sales representative.

Our hours of availability are 8AM - 5PM CST.

All Fields Required

connecting

We're matching your request.

Unfortunately, we can't connect you to an agent. If you are not automatically redirected please click here.

  • {{message.agentProfile.name}} will be helping you today.

    View Profile


  • Transfered to {{message.agentProfile.name}}

    {{message.agentProfile.name}} joined the conversation

    {{message.agentProfile.name}} left the conversation

  • Your chat with {{$storage.chatSession.messages[$index - 1].agentProfile.name}} has ended.
    Thank you for your interest in CA.


    Rate Your Chat Experience.

    {{chat.statusMsg}}

agent is typing