Setting it up
Example Steps for Getting the Examples Going
Getting the LiveUser examples working can be somewhat difficult for
developers who are new to PHP and PEAR.
Here is a list of steps necessary to get the example4
and GVN examples working with a MySQL database in LiveUser
0.16.12.
- Install PHP and MySQL OR Sign up with a web host that provides PHP and MySQL.
-
Install PEAR. This is done either with the
command line installer,
or by uploading
go-pear.phpto your web host through FTP. -
Now install the PEAR packages
LiveUser,MDB2,MDB2_Driver_mysql,HTML_Template_IT,HTML_QuickForm, andVar_Dump. Command line will be something like pear install --alldeps LiveUser-beta (repeat for each package). If you used thego-pear.php, there's some web-based way to install packages through that, but I haven't used it. - Now create your empty database in MySQL.
-
Now copy the files of
example4to your web root. On my Linux system the examples ended up in/usr/share/pear/docs/LiveUser/docs/examplesand my Apache web root is at/var/www. You can find out where the examples are by executing pear list-files LiveUser. -
Create the database by viewing the
demodata.phpthrough your web browser with a URL likehttp://www.example.com/LU/demodata.php?dsn=mysql://dbuser:pwd@localhost/databasename&file=/var/www/LU/demodata.xml&create=1. You must replace the file path values and the databaseuser,password,host, anddatabase namewith values appropriate for your own system. If this gives you a "success" message and you have phpMyAdmin or something, you should be able to look at the database now and see tables with data in them.It is reported that on some systems, you must make alterations to the
demodata.xmlfile before this will run properly. Within all <is_active>..</is_active> tags replace the value "Y" with "1" and "N" with "0". -
Edit the
conf.phpfile and enter your database information. -
At this point you should be able to view the
index.htmlpage through a web browser and log in and useexample4. - To get the GVN samples going, first create a "GVN" folder under your web root.
- Go through the GVN tutorials, starting from the beginning because there are dependencies, and save all of the sample files.
-
In most of the files I found that the include to
LiveUser/LiveUser.phphad to be corrected to just beLiveUser.php. -
Copy the file
Auth_XML.xmlfromexample4into the GVN folder. -
Copy your database information and the LiveUser configuration array from
example4/conf.phpinto GVN'sconf.phpandconf_admin.phpfiles. -
In example4, the users that are in the database are deactivated for some reason...
in the
peoplestable change the values in theisactivecolumn to1.
The above steps got me to the point where I have the working sample app and pages that demonstrate adding users, etc.