These instructions are for new installs of WebSmart 11 ILE, PHP (on IBM i) and Clover (or higher) only. Please log in to myFrescheSolutions.com to access the New Features and Upgrade Guide as well as the User Guide. If you don't have an IBM i, use these instructions to install WebSmart PHP on your PC.
Step 9: Set a Default User Profile for WebSmart PHP Programs.
This step is only required for WebSmart PHP, where you will be running PHP programs on your IBM i and/or MySQL server. If you will not use WebSmart PHP, skip to the next step.
After installing WebSmart PHP you need to set a number of connection defaults so your programs can access your IBM i and database. While there are a few ways to handle this requirement, the WebSmart PHP program templates are set up to retrieve the connection values from a file on your IFS. When you execute WebSmart PHP programs, the first thing they attempt to do is load a preferences file, xl_defaults.php, by executing this statement at the top of the code:
This file includes a section where you can specify default user profiles and system names (among other things). This file is not overwritten, but a new one is created whenever a new version of WebSmart is installed.
- In your IBM i IFS open the file /esdi/websmart/vX/include/xl_defaults.php (where 'X' is the current release).
- Inside xl_defaults, enter the values for the connections you will be using. Some examples are described below.
Note: It is possible that your environment will work without changing any values at all, so it is recommended to test a couple programs beforehand and determine what it is that you would prefer to modify.
$pf_i5UserID and $pf_i5Password IBM i user profile and password to use for all i5 connections. If this value is left blank, PHP will use the special profile 'NOBODY'. Note that these values are only necessary if your applications will use the i5-specific PHP functions. $pf_i5IPAddress Unless you are by default connecting from your IBM i to another one, use the loopback value 127.0.0.1 here. $pf_db2SystemName Enter your IBM i system name for all database file access. $pf_db2UserID and $pf_db2Password IBM i user profile and password to use by default for all DB2 access. $pf_mysqlUrl Default MySQL server to connect to. $pf_mysqlUserId and $pf_mysqlPassword Default MySQL server user profile and password. $pf_mysqlDataBase Default MySQL database.
When you create your own application you may want to load your User IDs another way (for example, by prompting the user to enter one), but this approach will get you started.