GithubHelp home page GithubHelp logo

classicvalues / web-pecl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from php/web-pecl

0.0 1.0 0.0 6.27 MB

The PECL website

Home Page: http://pecl.php.net

License: Other

PHP 96.94% CSS 0.40% JavaScript 2.29% Makefile 0.16% Perl 0.07% Roff 0.14%

web-pecl's Introduction

PHP Extension Community Library

PECL

The PHP Extension Community Library (PECL) (pronounced pickle) is a repository for C and C++ extensions for compiling into the PHP language. This web application is hosted online at pecl.php.net.

Index

About

To learn more how to add new PECL extensions or how to install PECL extensions using command line tools visit pecl.php.net and PHP manual.

Bugs and support

Report bugs to bugs.php.net. The PECL project has a mailing list. More information about support can be found at pecl.php.net/support.php.

Contributing

Git repository is located at git.php.net. Contributions to the web application source code are most welcome by forking the GitHub mirror repository and sending a pull request.

git clone [email protected]:your-username/web-pecl
cd web-pecl
git checkout -b patch-1
git add .
git commit -m "Describe changes"
git push origin patch-1

A good practice is to also set the upstream remote in case the upstream master branch updates. This way your master branch will track remote upstream master branch of the root repository.

git checkout master
git remote add upstream git://github.com/php/web-pecl
git config branch.master.remote upstream
git pull --rebase

Directory structure

Source code of this application is structured in the following directories:

<web-pecl>/
 ├─ .git/            # Git configuration and source directory
 └─ bin/             # Command line development tools and scripts
    ├─ cron/         # Various systems scripts to run periodically on the server
    └─ ...
 └─ config/          # Application configuration files
    ├─ app_prod.php  # Production specific environment configuration
    └─ app.php       # Default configuration to be overridden
 └─ include/         # Application helper functions and configuration
    ├─ jpgraph/      # Bundled JpGraph library https://jpgraph.net
    ├─ bootstrap.php # Autoloader, DB connection, container, app initialization
    └─ ...
 └─ public_html/     # Publicly accessible directory for online pecl.php.net
    ├─ css/          # Stylesheets
    ├─ img/          # Images
    ├─ js/           # JavaScript assets
    ├─ packages/     # Uploaded packages releases static files
    ├─ rest/         # Static REST API generated XML files
    └─ ...
 ├─ sql/             # Database schema
 ├─ src/             # Application source code classes
 ├─ templates/       # Application templates
 ├─ tests/           # Application automated tests
 └─ var/             # Temporary generated application files
    ├─ uploads/      # Temporary uploaded packages releases
    └─ ...
 ├─ vendor/          # Dependencies generated by Composer
 ├─ .env.dist        # Distributed environment variables file for development
 ├─ composer.json    # Composer dependencies and project meta definition
 ├─ composer.lock    # Dependencies versions currently installed
 ├─ phpunit.xml.dist # PHPUnit's default XML configuration
 └─ ...

Installation

The pecl.php.net is written for PHP 5.6+, MySQL, and Apache 2.4.

1. Dependencies

Install dependencies with Composer:

composer install

2. Configuration

Application configuration is located in the config directory. The main file config/app.php includes default application settings. When installing application with Composer in the development environment, the .env file with environment variables is created from the .env.dist.

If it hasn't been created yet copy default distributed settings manually and adjust it for your development environment:

cp .env.dist .env

The config/app_prod.php is a configuration file for production environment at pecl.php.net. Configuration precedence order is (first that is encountered):

  • Environment variables (either set in the .env file for development or via server for production).
  • config/app_prod.php
  • config/app.php

3. Database

The database schema is available in the SQL file pecl_full_structure_prod.sql.

To create the database, run make create. To remove the created database run make destroy in the sql directory. On systems where make is not available, for example, FreeBSD, use gmake instead.

Create demo data fixtures for the development environment:

bin/console app:generate-fixtures

This will create user admin with password password to be able to login on localhost.

4. Apache configuration

These are typical Apache directives you need to set up for a development site. This installation has PEAR installed in /usr/share/pear.

<VirtualHost *>
    ServerName pecl.localhost

    DocumentRoot /path/to/pecl/public_html
    DirectoryIndex index.php index.html

    php_value include_path .:/path/to/pecl/include:/usr/share/pear
    php_value auto_prepend_file pear-prepend.php

    ErrorDocument 404 /error/404.php

    Alias /package /path/to/pecl/public_html/package-info.php

    RewriteEngine On
    RewriteRule   /rss.php              /feeds/latest.rss [R=301]

    # Rewrite rules for the RSS feeds
    RewriteRule   /feeds/(.+)\.rss$ /feeds/feeds.php?type=$1

    # Rewrite rules for the account info /user/handle
    RewriteRule   /user/(.+)$ /account-info.php?handle=$1

    # Rewrite rule for account info /package/pkgname/version
    RewriteRule   /package/(.+)/(.+)/windows$ /package-info-win.php?package=$1&version=$2
    RewriteRule   /package/(.+)/(.+)$ /package-info.php?package=$1&version=$2
    RewriteRule   /package/(.+)$ /package-info.php?package=$1

    <Location /get>
        ForceType application/x-httpd-php
    </Location>
</VirtualHost>

5. Tests

In development environment after installing development dependencies run phpunit to execute application unit tests:

phpunit

Credits

This page would not be possible without a continuous effort of maintainers of PECL extensions, open source contributors, hosting infrastructure sponsors, and people involved in maintaining this site. Big thanks to everyone involved.

Evolution

PECL, formerly known as PHP Extension Code Library, has been initially started under the PEAR umbrella. In October 2003 it has been renamed to PHP Extension Community Library and has evolved from the pearweb application. Under the hood, pearweb uses a set of utility classes called Damblan (name derived from the Nepalese summit Ama Dablam) by a lead developer Martin Jansen.

Since then, PECL related services have been moved to online community repository pecl.php.net exclusively dedicated to extensions written in C programming language to efficiently extend the PHP language. Today, many widely used PECL extensions written in C and C++ are hosted and distributed via PECL.

License and copyrights

This repository is released under the PHP license. Visit the copyright page for more information.

web-pecl's People

Contributors

bjori avatar chregu avatar cmb69 avatar derickr avatar felipensp avatar gemorroj avatar gloob avatar golgote avatar helgi avatar helly25 avatar jimwins avatar jmcastagnetto avatar johannes avatar jparise avatar kallez avatar maikuolan avatar mj avatar petk avatar philip avatar pierrejoye avatar rlerdorf avatar roojs avatar saundefined avatar sgolemon avatar sobak avatar stigsb avatar tvvcox avatar tyrael avatar weltling avatar wez avatar

Watchers

 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.