install moodle in apache2 and php7.2 and ubuntu 18
apt-get install php-intl
apt-get install php-soap
apt-get install php-xmlrpc
edit php.ini and remove ; from :
extension=intl
extension=soap
extension=xmlrpc
and restart apache2
apt-get install php-intl
apt-get install php-soap
apt-get install php-xmlrpc
edit php.ini and remove ; from :
extension=intl
extension=soap
extension=xmlrpc
and restart apache2
in php.ini:
extension=soap
My problem was solved by running the lower commands in the terminal:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2-soap
restart apache
sudo apt-get install php7.2-mysql
sudo service apache2 restart
If you are using Apache as your web server to install PHP and Apache PHP module run the following command:
sudo apt install php libapache2-mod-php
Once the packages are installed restart the Apache service:
sudo systemctl restart apache2
sudo a2enmod rewrite
service apache2 restart
I wanted to create the absolute most basic routing code in PHP, so here it is. We will direct ALL traffic to index.php and route to the new files from there.
In the root of your project, create a .htaccess file that will redirect all requests to index.php.
.htaccess
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php [QSA,L]Get the requested path with $_SERVER['REQUEST_URI'], and require the page you want to display. I have '' and '/' for both url.com/ and url.com.
index.php
Create the views
Create a /views directory and place the files.
/views/index.php
Main
/views/about.php
About
/views/404.php
404
That's it!