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

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.