Hamilton Turner 2165c2035e Move to lithium from php-lithium 11 years ago
..
Yii2 9432a262f1 Move Yii2 into properly-named directory 11 years ago
cakephp f1220cd6b3 Started PHP and fixed a Scala 11 years ago
hhvm f1220cd6b3 Started PHP and fixed a Scala 11 years ago
lithium 2165c2035e Move to lithium from php-lithium 11 years ago
php 902ed0e127 Merge pull request #1028 from roman-tsiupa-sociomantic/patch-1 11 years ago
php-codeigniter 4c4119511f Updated setup files for codeigniter 11 years ago
php-fatfree e7c3473e0a Convert setup.py to setup.sh for php-fatfree 11 years ago
php-fuel bd808a10e6 fix typo in setup.sh for php-fuel 11 years ago
php-kohana 190e6c27c4 Update setup.py to setup.sh for php-kohana 11 years ago
php-laravel e8c09372f2 Convert setup.py to setup.sh for php-laravel. Was unable to fully test due 11 years ago
php-micromvc ba7c9a62e3 Convert setup.py to setup.sh for php-micromvc 11 years ago
php-phalcon 84fc15b090 create stand alone install for php-phalcon (for use with php-phalcon 11 years ago
php-phalcon-micro 84fc15b090 create stand alone install for php-phalcon (for use with php-phalcon 11 years ago
php-phpixie 4a0a073cf9 Convert setup.py to setup.sh for php-phpixie. Includes changes to separate 11 years ago
php-pimf 2f8c92ffa5 Convert setup.py and setup-raw.py to setup.sh and setup-raw.sh. Confirmed 11 years ago
php-senthot 9732233479 Attempts to convert setup.py/setup-raw.py to setup.sh/setup-raw.sh for 11 years ago
php-silex 9732233479 Attempts to convert setup.py/setup-raw.py to setup.sh/setup-raw.sh for 11 years ago
php-silex-orm feb766dcfe Convert setup.py to setup.sh for php-silex-orm 11 years ago
php-silica 5f7ec0f8a8 Convert setup.py to setup.sh for php-silica 11 years ago
php-slim 4d9a515714 Convert setup.py to setup.sh for php-slim. 11 years ago
php-symfony2 c6d25304c1 Convert setup.py to setup.sh for php-symfony2 11 years ago
php-symfony2-stripped 1df2cbaf1f correct typo in setup.sh for php-symfony2-stripped 11 years ago
php-yaf 020891ac3c Convert setup.py to setup.sh for php-yaf 11 years ago
php-zend-framework 7944e5b199 Convert setup.py to setup.sh for ZendFramework and ZendFramework1 11 years ago
php-zend-framework1 7944e5b199 Convert setup.py to setup.sh for ZendFramework and ZendFramework1 11 years ago
phreeze 208f363a9e Download phreeze using composer 11 years ago
README.md 81fd70c141 Fix typo 11 years ago

README.md

Tricks to writing PHP-based Frameworks

Many servers use the php, php-fpm, or other binaries. If your server launches with sudo (e.g. sudo php-fpm) then you should be aware that using sudo resets the $PATH environment variable, and your specific binary may not be the one being used. The solution is to always use sudo <full-path-to-my-binary>. For example, cakephp's bash_profile.sh sets the variable $PHP_FPM to be the full path to the php-fpm binary that cakephp wants, and then uses sudo $PHP_FPM to ensure that the php-fpm binary used by sudo is the exact binary desired.

Dependency Management Using Composer

Many PHP apps use Composer for dependency management. To support this, setup your install.sh with these two commands

# Note the order! Composer depends on PHP so it has to come second
fw_depends php composer 

# Download dependencies
${IROOT}/php-5.5.17/bin/php $IROOT/composer.phar install \
--no-interaction --working-dir $TROOT --no-progress \
--optimize-autoloader 

Add your composer.json file to your framework's folder, e.g. php-fuel/composer.json. After installation runs, your framework folder will have a new vendor folder, e.g. php-fuel/vendor that contains all dependencies.

One-time Composer Setup

Composer uses Github a lot, enough so that it is common for it to exceed the API limit and cause infinite hangs or installation failures. To avoid this, it is necessary to generate a composer.lock file by manually running the installation one time - this file will list the exact github URLs that are needed for this project, which is then used by subsequent composer commands to avoid Github's rate limits. More on this here and here

You need to generate composer.lock manually, and then add it to your framework's folder. Use these steps

# Run one installation to ensure PHP is installed
cd FrameworkBenchmarks
toolset/run-tests.py --install server --install-only --test <your test>

# Switch to the user that runs tests
sudo su testrunner

# Define the environment variables you need (modify as needed)
export IROOT=/home/you/FrameworkBenchmarks/installs
export TROOT=/home/you/FrameworkBenchmarks/frameworks/PHP/php-yii2

# Run the installation shown above
#
# This will manually prompt you for your Github credentials 
# to avoid the Github rate limit, and when this command
# finishes running you will have a new file composer.lock
${IROOT}/php-5.5.17/bin/php $IROOT/composer.phar install \
  --working-dir $TROOT

# Add the lock file to this repository so it's used for all 
# future installations
git add -f composer.lock

NOTE: You should run this process manually once to generate the composer.lock file

php), and then add $IROOT/php-composer to the PATH in your bash_profile.sh. For example:

export COMPOSER_HOME=${IROOT}/php-composer
export PATH="$COMPOSER_HOME:$PATH"

Debugging PHP Frameworks

The first stop for HTTP 500 errors is to enable stack traces. Update config/php-fpm.conf to include php_flag[display_errors] = on.