Skip to content

Commit 3709ea5

Browse files
committed
[PHP7] upgraded to work with PHP 7.x
1 parent 7aa48cb commit 3709ea5

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ For a deeper introduction into MINI have a look into this blog post:
2323
- commented code
2424
- uses only native PHP code, so people don't have to learn a framework
2525

26-
## Support the project
27-
28-
[![Support](https://supporterhq.com/api/b/9guz00i6rep05k1mwxyquz30k)](https://supporterhq.com/give/9guz00i6rep05k1mwxyquz30k)
29-
3026
## Forks of MINI
3127

3228
### TINY
@@ -48,7 +44,8 @@ classes and real namespaces.
4844

4945
## Requirements
5046

51-
- PHP 5.3.0+ (when first released), now it works fine with current stable versions PHP 5.6 and 7.0
47+
- PHP 5.3.0+ (when first released), now it works fine with current stable versions PHP 5.6 and 7.1, 7.2., 7.3 and 7.4.
48+
The latest PHP 8.0 is not tested yet but should also work fine.
5249
- MySQL
5350
- mod_rewrite activated (tutorials below, but there's also [TINY](https://github.com/panique/tiny), a mod_rewrite-less
5451
version of MINI)
@@ -64,11 +61,11 @@ and runs the demo SQL statements (for demo data). This is 100% automatic, you'll
6461
running installation of MINI2 inside an Ubuntu 14.04 LTS Vagrant box.
6562

6663
To do so, put `Vagrantfile` and `bootstrap.sh` from `_vagrant` inside a folder (and nothing else).
67-
Do `vagrant box add ubuntu/trusty64` to add Ubuntu 14.04 LTS ("Trusty Thar") 64bit to Vagrant (unless you already have
64+
Do `vagrant box add ubuntu/focal64` to add Ubuntu 20.04 LTS 64bit to Vagrant (unless you already have
6865
it), then do `vagrant up` to run the box. When installation is finished you can directly use the fully installed demo
69-
app on `192.168.33.44`. As this just a quick demo environment the MySQL root password and the PHPMyAdmin root password
70-
are set to `12345678`, the project is installed in `/var/www/html/myproject`. You can change this for sure inside
71-
`bootstrap.sh`.
66+
app on `192.168.33.44` (you can change this in the Vagrantfile). As this just a quick demo environment the MySQL
67+
root password and the PHPMyAdmin root password are set to `12345678`, the project is installed in `/var/www/html/myproject`.
68+
You can change this for sure inside `bootstrap.sh`. Shut down the box with `vagrant halt`
7269

7370
## Auto-Installation on Ubuntu 14.04 LTS (in 30 seconds)
7471

@@ -269,6 +266,9 @@ Please commit into the develop branch (which holds the in-development version),
269266

270267
## Changelog
271268

269+
**December 2002**
270+
- [panique] updated Vagrant installer to run with PHP 7.4 and Ubuntu 20.04
271+
272272
**August 2016**
273273
- [codebicycle/panique] renamed Error class to Problem to make it PHP7 compatible #209
274274
- [ynohtna92/panique] URL protocol is now protocol-independent #208

_vagrant/Vagrantfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ VAGRANTFILE_API_VERSION = "2"
77
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
88

99
# Every Vagrant virtual environment requires a box to build off of.
10-
config.vm.box = "ubuntu/trusty64"
10+
# We use the latest Ubuntu 20.04
11+
config.vm.box = "ubuntu/focal64"
1112

1213
# Create a private network, which allows host-only access to the machine using a specific IP.
1314
config.vm.network "private_network", ip: "192.168.33.44"

_vagrant/bootstrap.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ PROJECTFOLDER='myproject'
77
sudo apt-get update
88
sudo apt-get -y upgrade
99

10+
# installs Apache 2.x
1011
sudo apt-get install -y apache2
11-
sudo apt-get install -y php5
12+
# install PHP 7.4
13+
sudo apt-get install -y php
1214

1315
sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password $PASSWORD"
1416
sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password $PASSWORD"
1517
sudo apt-get -y install mysql-server
16-
sudo apt-get install php5-mysql
18+
sudo apt-get install php-mysql
1719

1820
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/dbconfig-install boolean true"
1921
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/app-password-confirm password $PASSWORD"
@@ -23,8 +25,8 @@ sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/reconfigure-webserver mul
2325
sudo apt-get -y install phpmyadmin
2426

2527
# Create project folder, written in 3 single mkdir-statements to make sure this runs everywhere without problems
26-
sudo mkdir "/var/www"
27-
sudo mkdir "/var/www/html"
28+
#sudo mkdir "/var/www"
29+
#sudo mkdir "/var/www/html"
2830
sudo mkdir "/var/www/html/${PROJECTFOLDER}"
2931

3032
# setup hosts file
@@ -72,4 +74,4 @@ sudo mysql -h "localhost" -u "root" "-p${PASSWORD}" < "/var/www/html/${PROJECTFO
7274
sudo sed -i "s/your_password/${PASSWORD}/" "/var/www/html/${PROJECTFOLDER}/application/config/config.php"
7375

7476
# final feedback
75-
echo "Voila!"
77+
echo "Voila! Open the project by putting 192.168.33.44 inside your browser!"

0 commit comments

Comments
 (0)