To upgrade phpLens
If you prefer to setup manually, use the following instructions instead:
<?php phpinfo();?>Run the script from your Web browser and check the output of test.php for the version number of PHP that the Zend Optimizer is installed. The following picture shows you what to search for:

Session Support and see if it is enabled.
http://yourserver/php/phplens.
This means the phplens-*.inc.php files are in this directory. Make
sure that that if you are using unzip or ftp that you use the binary safe
mode otherwise the Zend encoded .php files will be corrupted.
Make sure that PHPLENS_PATH (in .inc.php) is set to URL path to the phplens directory (without trailing /). Eg:
$PHPLENS_PATH = "/php/phplens";
Read the Grid Builder setup instructions to add more databases to the Grid Builder. The Grid Builder also has a SQL query tool included.
We provide three debugging scripts:
You can place the phpLens tables in an existing database or create a new database from the command line (assuming that MySQL is on localhost) with:
mysqladmin create phplens
This will create a database named "phplens".
Create the phpLens table using the supplied phplens.sql file from the command line:mysql phplens < phplens.sql
where "phplens" is the name of your database. This completes the MySQL part of the installation.
You can place the phpLens tables in an existing database or create a new database from psql with:
create database phplens; \c phplens \i phplens.sql \q
You might need to set the permissions of the tables using
GRANT ALL ON "phplens", "sessions" TO public.
This completes the PostgreSQL part of the installation.
sqlplus scott/tiger@connectstring start /path/to/phplens/oracle.sql quit
This completes the Oracle part of the installation.
Create the phplens table using the supplied access.sql file. From Microsoft Access, open the database you will be using and create a new SQL query with access.sql. After saving the query, execute the query to create the table. Alternately, use the Table Wizard to create an equivalent table.
When you use dynamic editing, we need to save your configuration changes in a database. We store these changes in the phplens table you created in the supplied phplens.sql file. The connection settings to connect to your database are set in the following variables in phplens.config.inc.php:
Access (using ODBC) example:
$PHPLENS_SESSION_DRIVER='access'; // access odbc driver $PHPLENS_SESSION_CONNECT='system_DSN_name'; $PHPLENS_SESSION_USER =''; $PHPLENS_SESSION_PWD =''; $PHPLENS_SESSION_DB =''; // not used
Microsoft SQL Server example:
$PHPLENS_SESSION_DRIVER='mssql'; $PHPLENS_SESSION_CONNECT='mangrove'; $PHPLENS_SESSION_USER ='sa'; $PHPLENS_SESSION_PWD ='secret'; $PHPLENS_SESSION_DB ='phplens_db';
MySql example:
$PHPLENS_SESSION_DRIVER='mysql'; $PHPLENS_SESSION_CONNECT='mangrove'; $PHPLENS_SESSION_USER ='root'; $PHPLENS_SESSION_PWD ='secret'; $PHPLENS_SESSION_DB ='lensdb';
Postgres example:
$PHPLENS_SESSION_DRIVER='postgres'; $PHPLENS_SESSION_CONNECT='mangrove'; $PHPLENS_SESSION_USER ='root'; $PHPLENS_SESSION_PWD ='secret'; $PHPLENS_SESSION_DB ='pglens';
Generic ODBC example:
$PHPLENS_SESSION_DRIVER='odbc'; $PHPLENS_SESSION_CONNECT='system_DSN_name'; $PHPLENS_SESSION_USER ='root'; $PHPLENS_SESSION_PWD ='secret'; $PHPLENS_SESSION_DB =''; // not used
Oracle Oci8 example 1:
$PHPLENS_SESSION_DRIVER='oci8'; $PHPLENS_SESSION_CONNECT=''; $PHPLENS_SESSION_USER ='scott'; $PHPLENS_SESSION_PWD ='tiger'; $PHPLENS_SESSION_DB ='tnsname'; // TNSNAMES.ORA entry
Oracle Oci8 example 2:
$PHPLENS_SESSION_DRIVER='oci8'; $PHPLENS_SESSION_CONNECT='192.168.0.10'; // ip address of rdbms $PHPLENS_SESSION_USER ='scott'; $PHPLENS_SESSION_PWD ='tiger'; $PHPLENS_SESSION_DB ='dbname'; // database name