phpuush is an alternative puush implementation in PHP, complete with all the functionality of the original.
Currently, phpuush comes with two storage solutions, SQLite and MySQL.
phpuush works by intercepting requests to the puush service and not forwarding them.
Requirements for operation of phpuush differ by the storage system. The following are tested and working:
- PHP 5.4 or higher (lower versions such as 5.3 may work but are not guaranteed)
- HTTP server capable of URL rewriting (configuration for Apache, nginx and lighttpd is supplied)
- MySQL 5 or higher
- PHP PDO driver with MySQL support (php5-pdo on Debian / Ubuntu and php-pdo on CentOS)
- SQLite3 PHP library (php5-sqlite on Debian / Ubuntu)
- Full read/write permissions on the database file
The phpuush.sql
file located inside the databases
directory provides the base table structures. You can import this using any method you wish.
For example, you could use this command to import it in Linux:
mysql -u username -ppassword -h hostname -D database < databases/phpuush.sql
A blank phpuush.db-dist
file is provided in the databases
directory, ready for use. Simply rename this to phpuush.db
.
All configuration directives are stored in configuration.php
. Changes must be made before phpuush can be used.
The entire mysql
section will need modification to include your MySQL username, password, hostname and database.
The default value for this directive points to the databases/phpuush.db
file. If you have already created this, you do not need to make any further changes.
There are a lot of different ways to set this up, and sample configurations are supplied in the setup/httpdconf
directory for:
- Apache with mod_rewrite
- nginx with HttpRewriteModule
- lighttpd with mod_rewrite
Any other HTTP server with rewriting and PHP capability should work fine.
You can register new accounts with phpuush by visiting http://your-domain/page/register
.
Once you have registered, you have the option to make the registration page self-destruct. Please note that if you do not do this, your registration will be publically available.
Windows configuration is the simplest with the built in ProxyServer
and ProxyPort
settings that puush has.
- Close the puush client if it is open
- Set the
ProxyServer = ip-address-of-your-phpuush
directive - Set the
ProxyPort = port-number-of-your-phpuush
directive - Re-open puush and authenticate for the first time
- Close the puush client if it is open
- Edit the
/private/etc/hosts
file with elevated privileges - Add a new entry with
<ip address of your phpuush> phpuushed
- Replace your
puush.app/Contents/MacOS/puush
binary file with the copy supplied insetup/binaries/OS X/puush
- Re-open puush and authenticate for the first time