Close
X

WebSmart logoWebSmartPHP Installation Instructions (No IBM i)

These instructions cover installing WebSmart PHP, where you will NOT be connecting to an IBM i. If you are installing any other version of WebSmart or Clover, please use the general installation instructions.

Step 1. Install the WebSmart IDE on your PC.

You can install the WebSmart IDE (the PC design tool) on any number of PCs that connect to the same server. Follow the steps below to install the WebSmart IDE:

1. If you haven't yet done so, go to the Download Free Software Opens new window page and fill out the form to download WebSmart.

2. Download and save the PC installation files to a new folder on your PC.

3. When the download finishes execute the downloaded file to unpack the install files and initiate the install. The PC install file is named websmart96-pc.exe [the version may vary].

4. Follow the instructions to install the WebSmart executables to your PC. You should be able to accept all the default install options.

5. When it's done, the install will prompt you to launch the software. You can also launch WebSmart from your Start menu.

If this is a new install WebSmart will automatically prompt you to complete your server configuration. Select 'No' and continue with the next step.

  
Troubleshooting   
Installation

The default installation location for WebSmart is C:\Program Files\ESDI\, but on Windows Vista and Windows 7 the software is installed to C:\ESDI\. Keep this in mind if you are looking for one of the installed components (e.g. templates or tutorial solutions).

If you have any trouble installing the PC components call BCD Technical Support at (250) 655-1766, or your network administrator may also be able to help you.

You can also search our Knowledge Base Opens new window for installation issues.

Step 2. Upload the Required Server Files.

When you install the WebSmart IDE on your PC, in the root WebSmart directory (usually C:/ESDI/WebSmart) you'll find a folder named 'Server Files'. This contains our SmartCharts, images, CSS and some PHP includes for the various templates shipped with the software.

Copy the files and folders in the 'Server Files' directory to your PHP server root. So for example, the contents of this directory:

C:/ESDI/WebSmart/Server Files/*

Need to be copied to a directory such as:

/www/websmart/htdocs/*

Please call Technical Support if you aren't sure what directory to use.

Test Your Server Installation
The server files you installed include a sample PHP program you can run to verify that the critical components required to run PHP programs were successfully installed.

To run the sample program, type the following URL into your browser:

http://your_server_path/testcfg.php

Replace your_server_path with the location to which you saved the server files.

If the test program appears, continue with the sections below.

  
Troubleshooting   

Changing Script Paths
You also have the option of changing the paths in your script to match the path on the server after using the templates to create a script. Or you can edit the templates themselves and adjust the paths there once so all new scripts have the correct path at creation time.

Your templates will likely be located in C:\ESDI\WebSmart\Templates v9.6\PHP Templates\ (this will depend on the installation path you chose).

If you are using MySQL or MSSQL choose the MySQL template family. For MSSQL you will have to modify the data base connection code. You can find further information on this in Knowledge Base article 9123.

You can also search our Knowledge Base Opens new window for installation issues.

Step 3. Create an FTP Connection.

You must have at least one FTP connection. Your FTP connections allow you retrieve and work with files related to your application, as well as set defaults for the PHP programs you create.

1. In the WebSmart IDE open the Tools/Options window and click the FTP entry to present these options:


Click the Add button to create an FTP Site:


Configure your options as described here:

Site NameType an informational description of the site you are connecting to.
FTP AddressEnter the IP address or domain name of your server.
Initial DirectoryEnter the initial directory to be displayed. For WebSmart, use this value: '/www/websmart/htdocs/wsphp/' (with no quotes).
Web PathSelect a default path to pre-pend to your program name when you click the Launch button from within the IDE. The default WebSmart Apache HTTP server instance runs on port 8150, so this should normally be set to 'http://your_IBMi_IP:8150/wsphp/' (no quotes).
User/PSWDThe IBM i profile to use to connect to the IBM i when saving the PHP files.
FTP PortEnter the user profile and password to use to connect to the IBM i when saving the PHP files.
Passive ModeCheck this option if you need to establish your FTP connection in passive mode.

After entering the required values, click the Test Connection button to verify that you have entered your configuration details correctly. If the confirmation window tells you that the connection is working, press OK to create the site and continue with the next section.

  
Troubleshooting   

If you don't get a successful connection, double-check your values. If you have established links to the server in another application, compare your settings to those.

You can also create and modify your FTP connections from the window pane at the lower left of the main IDE. Just right-click in the area below the FTP Sites tab to present the available options.

You can also search our Knowledge Base Opens new window on this topic.

Step 4. Create an ODBC Connection.

Before working with WebSmart you need to create an ODBC connection to your target database so WebSmart can load the file layouts.

To create a new ODBC connection, launch the WebSmart IDE and go to the Tools/Options menu. Select the Servers/Databases section and click Add to present these options:


Click the Add button to create an ODBC Connection:


Configure your options as described here:

Name/DescriptionType a name and description for this ODBC connection.
Database TypeSelect whether you are using a database type of MySQL, SQLServer or Oracle.
Server/PortType a server IP and port number.
DatabaseEnter the database name.
User/PSWDType the User ID and password to be used to connect to this server.
DriverSelect the driver.

After entering the required values, click the Test Connection button to verify that you have entered your configuration details correctly. If the confirmation window tells you that the connection is working, press OK to create the connection and continue with the next section.

  
Troubleshooting   
Step 5. Set a Default User Profile for WebSmart PHP Programs.

After installing WebSmart PHP you need to set a number of connection defaults so your programs can access your server 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 server. When you execute WebSmart PHP programs, the first thing they attempt to do is load a preferences file, xl_functions001.php, by executing this statement at the top of the code:

require('/esdi/websmart/v9.6/include/xl_functions001.php');

[Adjust this path to your own server files directory (instead of /esdi/websmart/v9.6/).]

This file includes a section where you can specify default user profiles and system names (among other things). However, because this file is overwritten when you upgrade, it in turn attempts to load some of the defaults from another file, xl_user_preferences.php, which you need to create. (see our online WebSmart PHP KB article 6998 for additional details).

Create xl_user_preferences.php
1. In your IBM i IFS open the file /esdi/websmart/v9.6include/xl_functions001.php (the release level may vary).

2. Save the file as xl_user_preferences.php (or copy and rename xl_functions.php).

3. In the new, copied file delete everything from (and including) this line up to the end of the file:

@include('xl_user_preferences.php');

Note: Leave the ?> at the end of the file!

4. In the section that remains in xl_user_preferences.php enter default values for the connections you will be using, as described here:

$pf_i5UserID and $pf_i5PasswordIBM i user profile and password to use for all i5 connections. If this value is left blank, Zend Core will use the special profile 'NOBODY'. Note that these values are only necessary if your applications will use the i5-specific PHP functions.
$pf_i5IPAddressUnless you are by default connecting from your IBM i to another one, use the loopback value 127.0.0.1 here.
$pf_db2SystemNameEnter your IBM i system name for all database file access.
$pf_db2UserID and $pf_db2PasswordIBM i user profile and password to use by default for all DB2 access.
$pf_mysqlUrlDefault MySQL server to connect to.
$pf_mysqlUserId and $pf_mysqlPasswordDefault 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.

  
Troubleshooting   
Step 6. Moving On.

At this point you should be ready to try running the software and start learning how to use it.

Continue with Step 2 of the 5 Steps to Success for:

If at any point in this process you would like to have an informal chat with someone to get some suggestions on how to address your particular needs, then by all means get in touch with our Sales or Technical Support teams.

We look forward to hearing from you soon.