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

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. This must be done manually because it will require you to provide input. 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

Updating Composer setup

If you update composer.json, you need to re-run the above process to generate a new composer.lock file. If you forget to do this, you will see this error message when running the framework:

Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.

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.