GithubHelp home page GithubHelp logo

phpuush's Introduction

phpuush

So, you're probably confused as to what this is. Well, it's a proxy for puush. The developers for puush decided to be all stupid and refused to implement useless features like SFTP and FTP.

So, my absolutely brilliant friend @jannispl decided to write a new proxy for puush in node.js. This, as far as we know, was the first alternative implementation of puush.

Almost half a decade on, I thought I would improve it to make it better.

How do I migrate to the new version?

Preamble

Firstly, install composer.

There are three files and folders you'll need to find:

  • configuration.php
  • databases/phpuush.db (or whatever your database file is)
  • uploads/ (or whatever your upload folder is)

You can either copy or move - but make sure that you have a backup of this stuff first.

Now you figure out where those files and folders are, you'll need to create a separate installation of phpuush.

If you are lazy like me, and want everything in one folder so when you're developing whilst drunk you can simply run git pull and things are magically fixed, just clone the repo using git.

If you are security conscious (like some of my friends) then you can download master as a compressed archive, extract it to somewhere, move certain folders around then edit the APP_DIR constant within index.php but you shouldn't even need to do this, if you properly re-configure everything.

Make backups!

Moving files to new homes

  • configuration.php must be relocated to app/configuration.php. You may notice that the format of the configuration has changed - there is no need to change this as the configuration itself is backwards compatible.

  • databases/phpuush.db can be located anywhere that PHP has write access, however for the purposes of this example, move it to app/databases/phpuush-demo.db. You need to update the database.sql property with the absolute path to this file within the config.

  • uploads/ can be located anywhere that PHP has write access, however for the purposes of this example, move it to app/uploads. You need to update the files.upload property with the absolute path to this folder within the config.

Then, you'll need to run composer install --no-dev

Please make sure that your phpuush.db file is not accessible to the outside world. The best thing to do is to make it so that every request to that folder is handled by index.php. If you can download your phpuush.db or composer.json through your browser you've configured it incorrectly.

Bonus: Environment variables

You can completely skip the idea of a boring old configuration file and use environment variables instead! Create .env or app/.env (or even assigned via your web service) and assign the following:

PHPUUSH_DATABASE=/dsn/or/path-to-sqlite.db
PHPUUSH_FILES_DOMAIN=http://your-domain
PHPUUSH_FILES_UPLOAD=/your/upload/path

As long it's accessible by your web service, it'll work.

phpuush's People

Contributors

ishaqazmi avatar jannispl avatar westie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpuush's Issues

Port used in the OS X binary

What port is used for the OS X replacement binary?

I am trying to use it in conjunction with puushproxy which I have set to listen on port 1000. I can't set it to listen on port 80 (otherwise it won't run). Should I just use phpuush instead or is there a way to get this to work?

/page/register doesn't work (Apache, Ubuntu)

Hi. My address is http://with-you.pw/, which shows This is a phpuush endpoint. when accessed. I can't register with /page/register though, it returns a 404, and error.log says [Thu Jun 20 10:30:23 2013] [error] [client 124.148.85.208] File does not exist: /home/blha/phpuush/page

My apache config section for the site:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /home/blha/phpuush
    ServerName with-you.pw
    <Directory /home/blha/phpuush/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.