Download the PHP package orange35/phpv without Composer

On this page you can find all versions of the php package orange35/phpv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpv

Automatic PHP CLI Version

orange35/phpv is a php wrapper which replaces the php command and executes a PHP CLI version specified in the one of the following files:

For example:

When you run the following command

php -v

PHP Wrapper searches for first of following files:

If it is either a .htaccess_dev or .htaccess file it is looks for a string like:

SetHandler proxy:fcgi://php71

or

AddHandler application/x-httpd-php71 .php

if it is a .phpv file the wrapper reads its content which will be a cli command name e.g.:

php71

and executes php71 -v instead of php -v

The commands like php71, php72 and so on must be available in your system. If not, please see the installation notes #4-6 below.

If there is no PHP version specified in the .phpv, .htaccess_dev or .htaccess file then either:


Installation

  1. Install composer if not available

  2. Install the package

    composer global require orange35/phpv
  3. If there are already commands like php71, php72 and so on in your system then skip the steps 4-6.

  4. Make sure the PATHs order is the following in your ~/.bashrc or ~/.profile:

    PATH=$HOME/bin:$HOME/.composer/vendor/bin:$PATH
  5. Logout your bash/SSH console and log in again to execute new changes in the ~/.bashrc or ~/.profile.

  6. Create symlinks in the ~/bin to different php version, e.g:

    php70 -> /opt/php7.0/bin/php
    php71 -> /opt/php7.1/bin/php
    php72 -> /opt/php7.2/bin/php
    php73 -> /opt/php7.3/bin/php
    php74 -> /opt/php7.4/bin/php

Usage

  1. go to your project

    cd ~/public_html/example.com
  2. check what is php version

    $ php -v
    PHP 7.0.33 (cli) ...
  3. create an .htaccess_dev file if doesn't exist

    cp .htaccess .htaccess_dev
  4. specify a PHP version in the .htaccess_dev file

    # The next line affects the Apache +  mod_suphp configuration 
    AddHandler application/x-httpd-php73 .php
    #
    # The next lines affects the Apache + php-fpm configuration
    <IfModule !mod_suphp.c>
        <FilesMatch \.php$>
            SetHandler proxy:fcgi://php73
        </FilesMatch>
    </IfModule>
  5. check what is php version now

    $ php -v
    PHP 7.3.9 (cli) ...

Notes

*1 - The .htaccess_dev file may be used (if exists) instead of .htaccess if you have the following Apache configuration:

    AccessFileName .htaccess_dev .htaccess

It is very convenient to have a development version of .htaccess file which doesn't affect the production version.


All versions of phpv with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package orange35/phpv contains the following files

Loading the files please wait ...