1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-13 21:52:29 +01:00
polr/README.md

130 lines
5.1 KiB
Markdown
Raw Normal View History

2014-06-22 15:40:21 +02:00
Polr
2014-02-14 16:41:47 +01:00
==================
2014-10-05 02:27:10 +02:00
###A beautiful, modern, fast, minimalist, and open-source URL shortening platform in vanilla PHP.
2014-06-23 15:49:27 +02:00
Demo: http://polr-c9-cydrobolt.c9.io/
2014-07-17 21:40:57 +02:00
2014-07-18 22:44:03 +02:00
######Prerelease Beta 1.0.0: https://github.com/Cydrobolt/polr/releases/download/1.0.0b-c/polr-1.0.0-beta.zip
######Stable 0.2.3: https://github.com/Cydrobolt/polr/releases/download/v0.23-Alpha/polr-0.23-alpha.zip
2014-06-23 15:55:12 +02:00
Polr will use Semantic Versioning http://semver.org/ starting at ver 1.0.0
2014-07-17 21:40:57 +02:00
2014-07-16 17:39:03 +02:00
Do you use Polr? We'll add your website to the list at the bottom of the page, just email one of the collaborators, or support@polr.cf .
2014-06-23 15:49:38 +02:00
2014-07-17 21:40:57 +02:00
Useful Links:
- http://github.com/Cydrobolt/polr-cli Command-line interface for Polr
- http://github.com/Cydrobolt/polr-PaaS Polr Platform-as-a-Service (http://polr.cf)
2014-06-21 02:24:44 +02:00
==================
2014-06-21 16:02:37 +02:00
Installation
==================
- Unpack Polr, or clone the git repo
- Go to the root of your Polr folder (on webserver)
- Read each setup item carefully, and then click "create config"
2014-10-31 23:22:18 +01:00
- *MySQL warning: Set your character set to UTF8. Some character sets are vulnerable to a certain bug in MySQL and mysqli_real_escape_string. For more information, please see http://stackoverflow.com/questions/5741187/sql-injection-that-gets-around-mysql-real-escape-string*
2014-06-21 16:02:37 +02:00
- You're ready to go!
2014-06-22 14:46:52 +02:00
Prerequisites:
2014-06-21 02:24:44 +02:00
2014-06-22 14:46:52 +02:00
- mod_rewrite (install help: https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite)
- MySQL or MariaDB equivalent >= 5.5
- PHP >= 5.4
- Apache httpd
2014-06-22 15:12:27 +02:00
- MySQLi extension for PHP
2014-06-22 15:23:51 +02:00
- MySQLnd (native driver; i.e php5-mysql on Ubuntu)
2014-06-22 15:39:53 +02:00
- MCrypt (http://www.php.net//manual/en/book.mcrypt.php)
2014-06-22 15:41:28 +02:00
This list may be long, but most hosts include these prerequisites, so you don't have to install them yourself.
2014-06-22 15:39:53 +02:00
==================
Troubleshooting
==================
###I get a blank page at the user dashboard (ucp.php)
This error occurs when your PHP installation's version is older than 5.3, or because you do not have either the PHP mysqli extension or do not have the MySQLnd (native driver). On Ubuntu, you simply need to `sudo apt-get install php5-mysql` and restart apache2 `service apache2 restart`. You should have the mysqli.so extension enabled. Ask on IRC if you need further support.
###I get a blank page when trying to register (registerproc.php)
This may mean you do not have the MCrypt extension for PHP. To install this on Ubuntu, run the following commands:
```
sudo apt-get install php5-mcrypt
sudo mv -i /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/
sudo php5enmod mcrypt
sudo service apache2 restart
```
On Fedora/Centos:
```
yum update
yum install php-mcrypt*
sudo php5enmod mcrypt
sudo service apache2 restart
```
###I have errors enabled, and I get "`Illegal String Offset`"
2014-08-18 17:47:19 +02:00
This usually occurs when you are missing an extension, and thus, the expected associative arrays (e.g `mysqli_fetch_assoc`) are instead strings, and errors occur. The most common cause of this is the missing MySQLi extension or native driver. Refer to the first FAQ, or the `mysqli_fetch_all` FAQ. This issue is usually caused by an
old PHP version.
2014-06-22 15:39:53 +02:00
###The links produced give me 404
You need mod_rewrite in order to use Polr. Please take a look at https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite
###I can't run setup, I get various MySQL errors.
Make sure your host is correct. Some webhosts require you to bind to a certain ip or port, such as 0.0.0.0. You may need to modify the code if you need to use an unconventional port. (option coming soon)
Make sure the database is premade, and that the user has the required permissions to create tables.
2014-06-21 16:02:37 +02:00
2014-08-10 00:10:32 +02:00
###I'm getting an error in the dashboard; Missing mysqli_fetch_all.
This problem occurs when your version of PHP is under 5.5. If you are running PHP 5.3.x, or below, place this in your `req.php` file:
```
function mysqli_fetch_all($res) {
$array = array();
while ($row = $res->fetch_assoc()) {
array_push($array, $row);
}
return $array;
}
```
2014-06-21 16:02:37 +02:00
==================
2014-08-18 17:44:02 +02:00
####Current State: 1.0.0 Beta (download at releases) & 0.2.3 Alpha (latest semi-stable)
2014-03-14 23:25:54 +01:00
2014-05-20 01:03:00 +02:00
Welcome to Polr, the self-hosted version. Read up on some documentation through our github wiki (https://github.com/Cydrobolt/polr/wiki)
2014-02-14 16:41:47 +01:00
2014-05-20 01:03:00 +02:00
Would like to contribute? Submit pull requests through our Github page. Found an issue? Create an issue here: (https://github.com/Cydrobolt/polr/issues)
2014-02-14 16:41:47 +01:00
2014-07-16 17:39:03 +02:00
==================
######List of websites using Polr
2014-08-18 17:44:02 +02:00
- http://polr.me
2014-02-14 16:41:47 +01:00
2014-08-18 17:44:02 +02:00
####License
2014-03-14 23:25:54 +01:00
2014-08-18 17:44:02 +02:00
Copyright (C) 2014 Chaoyi Zha <summermontreal@gmail.com>
2014-02-14 16:41:47 +01:00
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.