Code Monkey home page Code Monkey logo

3v4l_org's Introduction

PHPShell - submit and visualize output across multiple versions of PHP

this is deployed on https://3v4l.org

Overview

This application runs on top of Basic_Framework which is an MVCish framework - so for any specific action you can jump right into the Action class. After a user submits code (through library/PhpShell/Action/New.php#76) it is stored in the database and the daemon will be notified.

Setup instructions

If you want to run this, follow these steps:

  • install postgresql, golang, php-fpm, memcached and nginx
  • compile the daemon, it's path is configured in the .service file
  • create two postgresql users, one for the website and one for the daemon
  • load structure.sql in a fresh database
  • update the password for the webiste in config.ini
  • specify the dsn for the daemon in daemon.service
  • it's probably best to use a separate domain or IP for the webserver, configure nginx to pass all requests to index.php
server
{
	listen	80;

	server_name	phpshell.example.com;
	root		/srv/http/example.com/phpshell/htdocs;

	location /
	{
		expires off;

		include	    	fastcgi_params;
		fastcgi_param	SCRIPT_FILENAME $document_root/index.php;
		fastcgi_pass	unix:/var/run/php-fpm/php-fpm.sock;
	}
}

Files of interest if you want to jump right in

  • Handling of submits: library/PhpShell/Action/New.php#76
  • Processing by daemon: daemon.go
  • Visualisation of output: library/PhpShell/Action/Script.php#L68 and tpl/script.html

3v4l_org's People

Contributors

sjonhortensius avatar

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.