Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Base application

fballiano edited this page Aug 28, 2012 · 1 revision

A simple application to extend for every day applications.

Features

  • user authentication
  • user management
  • application menu management

Download

License warning

Both base application releases (the official for P4A 2.2 and the unofficial for P4A 3) are released under GPL2 so check compatibility with your P4A version license.

Install

Installation usually vary from OS to OS. However, because newbies would try this application as the first to test p4a working then having at least one installation procedure is better than nothing.

Ubuntu 9.10 Karmic Koala

 wget http://www.asis.it/base_application.zip -O /tmp/base_application.zip
 cd /usr/share/php/p4a/p4a
 sudo -s
 unzip /tmp/base_application.zip
 cd base_application
 mysql --verbose --user=root --password=<PASSWORD>
     CREATE DATABASE p4a_base_application;
     quit;
 mysql --verbose --user=root --password=<PASSWORD> p4a_base_application < _private/baseapplication.sql
 cp -f index.php index.php.orig
 sed -e "s,root@,root:<PASSWORD>@," index.php.orig > index.php
 mkdir -p /var/www/p4a/p4a/base_application/uploads
 chown .www-data /var/www/p4a/p4a/base_application/uploads
 chmod g+xw /var/www/p4a/p4a/base_application/uploads

bugfix

If you got this error message

 Fatal error: Class 'p4a_base_application' not found in /usr/share/php/p4a/p4a/objects/p4a.php on line 301

then you should apply this patch

 --- index.php.orig	2010-02-24 17:51:31.083444395 +0100
 +++ index.php	2010-02-24 18:09:46.299445722 +0100
 @@ -43,6 +43,7 @@ define("P4A_DSN", 'mysql://root@localhos
  //define("P4A_AJAX_DEBUG", "/tmp/p4a_ajax_debug.txt");
  
  require_once( dirname(__FILE__) . '/../../p4a.php' );
 +require_once( dirname(__FILE__) . '/objects/p4a_base_application.php' ); 
  
  // Check Installation and configuration.
  // This lines should be removed after the first run.