Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.
/ php_piscine Public archive

PHP_piscine is a two week intensive, on which students have an opportunity to learn PHP/Mysql/HTML/CSS/Javascript(jQuery, Ajax). Piscine took place in 42 School Kiev(aka UNIT Factory)

Notifications You must be signed in to change notification settings

Millon15/php_piscine

Repository files navigation

Hello cheatera!

FiRsT of aLL

Introducing brand new way to run your php-piscine named docker-compose To make this thing run you just need to have docker installed on your school mac. You can install it from managed software centere or by running ./docker_init.sh in your terminal, for terminal installation brew42 is mandatory(google it, if you don't know how to install brew42).

To up your local web server(with mysql and phpmyadmin onboard) fire following commands

docker-machine start default
eval $(docker-machine env default)
docker-compose up -d

Now your web server is running and available via address, that can be get by the command below:

echo web server - $(docker-machine ip default):8989

Correspondingly you can get access to the phpmyadmin on:

echo phpmyadmin - $(docker-machine ip default):8181

BTW, below you can find environment variables, that help you access to mysql database via docker-compose exec mysql bash or via phpmyadmin It can help you with both Rushes and day05.

MYSQL_DATABASE=d05
MYSQL_USER=sql42
MYSQL_PASSWORD=sql42
MYSQL_ROOT_PASSWORD=sql42

If, with mysql, you will have troubles like this:

ERROR 1044 (42000): Access denied for user 'sql42'@'%' to database

Please enter your mysql session as root user, for user root password same as sql42 user.

mysql -uroot -psql42

If you would appear to be stuck with the procedures subscribed above, please follow docker docs on internet!

Some of us use checkers time to time, some of us haven't used it before, but today everything will change! Introducing Checker for php_piscine!!!

So you can ask me: How can we use these gorgeous unit-tests? I can easily answer: You just need to...

1. Open unit-test folder

2. Watch out for an appropriate test for you

For example you need to test day01 of your piscine: test_d01.py fits perfectly

3. Then you need to configure this test for your purposes

Go to unit-tests folder and run the configurator.sh script with one argument:

Usage:

./configurator.sh <Path_to_your_php_piscine_folder>

Example:

./configurator.sh /Users/vbrazas/projects/archive/php_piscine/
~OR~
./configurator.sh ../

Now you can easely use all tests!

About

PHP_piscine is a two week intensive, on which students have an opportunity to learn PHP/Mysql/HTML/CSS/Javascript(jQuery, Ajax). Piscine took place in 42 School Kiev(aka UNIT Factory)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published