sudo apt install simplexml php5.6-curl rewrite
sudo a2enmod rewrite
sudo a2enmod simplexml
sudo a2enmod php5.6-curl
systemctl restart apache2
///////////////////////////////////////////
sudo add-apt-repository ppa:ondrej/php
Выбрать версию по умолчанию
sudo update-alternatives --set php /usr/bin/php5.6
sudo update-alternatives --config php
(for Apache) sudo apt install php5.6
(for Nginx ) sudo apt install php5.6-fpm
Для Apache2 активируем PHP модуль
sudo a2enmod php7.1
sudo service apache2 restart
////////////////////////////////////////////////////////
sudo apt-get install php5.6-mysql
sudo apt-get install php5.6-mbstring
sudo phpenmod mbstring
sudo service apache2 restart
////////////////////////////////////////////////////
SHOW CREATE TABLE tablename - show sql command to create this table tablename
mysqldump -u <userName> -p <dataBasename> > <fileName.sql> Експортироваль базу даных
mysql -u <userName> -p <dataBasename> < <fileName.sql> Импортировать базу даных
sudo mysqldump -u admin -p M2_3_0 > ~/Downloads/M2.3.1-Clean+SimpleData.sql
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
phpMyAdmin 1698 - access denied for user 'root'@'localhost'
CREATE USER 'userName'@'%' IDENTIFIED BY 'password_here';
GRANT ALL PRIVILEGES ON *.* TO 'userName'@'%' WITH GRANT OPTION;
SHOW CREATE TABLE tablename
import SQL
mysql -u admin -p DB_name < /var/www/test.sql
create DB
mysql> CREATE DATABASE acc00337_db;
xdebag
sudo apt-get install php-xdebug
Run below command in terminal to ensure xdebug is installed properly. You’ll find xdebug in the list.
php -m
Make sure your php mods-available folder contains xdebug.ini file and this file contains below line:
zend_extension=xdebug.so
** Default xdebug location: /etc/php/7.0/mods-available/xdebug.ini
Now, add below lines at the bottom of your php.ini
file:
[XDebug]
xdebug.remote_enable=1
xdebug.remote_autostart=1
sudo systemctl restart php7.0-fpm
sudo systemctl restart nginx
//=================//
Now edit the xdebug.ini
sudo nano /etc/php/7.0/mods-available/xdebug.ini
Then paste the following configuration
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_log = /tmp/xdebug_remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9005 #if you want to change the port you can change
cat /proc/sys/fs/inotify/max_user_watches
The limit can be increased to its maximum by editing /etc/sysctl.conf
and adding this line to the end of the file:
fs.inotify.max_user_watches=524288