restart ubuntu nginx not running

sudo systemctl enable nginx.service // try a reboot sudo reboot // check status of nginx sudo systemctl status nginx.service // can start it with this to see if it's running properly sudo systemctl start nginx.service ...

View More
  Dibaca 828 kali

Ubuntu Cannot Ping Domain

Create a file called /etc/resolv.conf write fill in the contents: nameserver For example if your want to use googles dns-service: nameserver 8.8.8.8 nameserver 8.8.4.4 This is likely caused by DHCP configuration when you first installed Ubuntu. Try this 3-step process to handle this auto configuration issue. First Edit your interface configuration, which is located in: /etc/network/interfaces Add this line below iface lo inet loopback: dns-nameservers yourdns youraltdns As ...

View More
  Dibaca 932 kali

How can I disable MySQL Strict Mode?

This is enabled by default, but you can disable it in one of a couple ways. First, verify which mode(s) MYSQL is running with: $ mysql -u root -p -e "SHOW VARIABLES LIKE 'sql_mode';" You'll need to replace root with whatever username has superuser permissions on your server (but, it's usually just root). You'll also be prompted for the password. This will print out something like this (but much prettier): sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_D ...

View More
  Dibaca 993 kali

PHP Session not Saving

Your session directory (probably /tmp/) is not writable. Check with session_save_path() if it is writable. if (!is_writable(session_save_path())) { echo 'Session path "'.session_save_path().'" is not writable for PHP!'; } ...

View More
  Dibaca 1816 kali

Force Showing all errors and warnings in PHP

You can turn it on in the script: error_reporting(E_ALL); ini_set('display_errors', 1); ...

View More
  Dibaca 922 kali

MySQL alter table add column with primary key

ALTER TABLE t_dataDROP PRIMARY KEY,ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST,ADD PRIMARY KEY (id);   if not a primary key ALTER TABLE t_dataADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST,ADD PRIMARY KEY (id); ...

View More
  Dibaca 806 kali

Could not find com.android.tools.build:gradle:3.0.1

add the repository also in the app/build.gradle file: classpath 'com.android.tools.build:gradle:3.0.1' TOdependencies { classpath 'com.android.tools.build:gradle:3.1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'} ...

View More
  Dibaca 1000 kali

Android Studio Could not find com.android.tools.lint:lint-gradle:26.1.2

in proj.android-studio/app/build.gradle Fixed after I added google() to repositories repositories {jcenter()google()}   ...

View More
  Dibaca 1693 kali