Langsung ke konten utama

Postingan

Switch PHP version

Interactive switching mode sudo update-alternatives --config php Manual Switching From PHP 5.6 => PHP 7.1 Default PHP 5.6 is set on your system and you need to switch to PHP 7.1. Apache: $ sudo a2dismod php5 . 6 $ sudo a2enmod php7 . 1 $ sudo service apache2 restart Command Line: $ sudo update - alternatives -- set php / usr / bin / php7 . 1 From PHP 7.1 => PHP 5.6 Default PHP 7.1 is set on your system and you need to switch to PHP 5.6. Apache: $ sudo a2dismod php7 . 1 $ sudo a2enmod php5 . 6 $ sudo service apache2 restart Command Line: $ sudo update - alternatives -- set php / usr / bin / php5 . 6

Mengatasi Error DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled

Jika di mysql mendapatkan error seperti dibawah ini: 1418 (HY000) at line 10185: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) dapat diselesaikan dengan cara: 1. jalan kan di cmd/terminal: SET GLOBAL log_bin_trust_function_creators = 1; 2. Masukan di konfgurasi my.cnf : log_bin_trust_function_creators = 1;

“Copying to tmp table” extremely slow

You may need to try setting certain variables within your session tmp_table_size max_heap_table_size These particular values may be too small for your DB Connection to fulfill the query efficiently. These can be set within as follows: To see what values these settings have currently do the following: SHOW VARIABLES LIKE 'max_heap_table_size'; SHOW VARIABLES LIKE 'tmp_table_size'; To set max_heap_table_size to 64M do the following: SET max_heap_table_size = 1024 * 1024 * 64; To set tmp_table_size to 32M do the following: SET tmp_table_size = 1024 * 1024 * 32; If you cannot set these values within your own session, contact your hosting provider to dynamically set them in your my.cnf. Give it a Try !!!

ORA-00257: archiver error. Connect internal only | Automatic archival Disabled

Then as root switch to this user so have to have all the oracle variables in your path, You MUST log on as sysdba that's the only internal user allowed to access the database in such situations. eg if the owner owner/user is oradba # su - oradba Now you can invoke sqlplus $sqlplus /nolog SQL>conn / as sysdba SQL> archive log list; Database log mode        Archive Mode Automatic archival        Enabled Archive destination        USE_DB_RECOVERY_FILE_DEST Oldest online log sequence     482 Next log sequence to archive   482 Current log sequence        487 Check the Archive destination and delete all the logs SQL> shutdown immediate Database closed. Database dismounted. SQL> startup mount ORACLE instance started. Total System Global Area 3240239104 bytes Fixed Size     2217712 bytes Variable Size 2835351824 bytes Database Buffers   385875968 bytes Redo Buffers    16793600 bytes Database mounted. SQL> alter database noar

install php5.3 ubuntu 14.04, 16.04, 18.04 with cgi not fcgi

Halo, kali ini saya akan membagikan tutorial mudah untuk compile dan install php5.3 di ubuntu 14.04, btw.. di 18.04 juga bisa sebenernya, asalakan perinsipnya tahu.  kenapa saya pake cgi tidak fcgi? ya karena lebih enteng dari fcgi, dan fpm. nah biasanya, kita sering dihadapkan dengan kondisi dimana diharuskan memasang aplikasi lama, di server yang OS nya ke-kinian. oke.. bisa dipahami? untuk install php5.3 diubuntu, diperlukan keahlian dalam mengatasi error dan mencarinya di google. yuk mulai 1. Unduh file compile PHP wget -O php-5.3.29.tar.gz http://de1.php.net/get/php-5.3.29.tar.gz/from/this/mirror 2. install depedensi yang dibutuhkan: apt-get install apache2 apt-get install build-essential apt-get install libxml2-dev apt-get install libcurl4-openssl-dev pkg-config apt-get install libbz2-dev apt-get install libjpeg-turbo8-dev apt-get install libpng-dev apt-get install libfreetype6-dev apt-get install libmcrypt-dev libreadline-dev apt-get install libmysqlclient15-de

Membuat auto backup pada sql server

Tidak usah bertele tele.. aku tau pasti langsung scroll script nya Berikut script  T-sql nya: DECLARE @name VARCHAR(50) -- database name  DECLARE @path VARCHAR(256) -- path for backup files  DECLARE @fileName VARCHAR(256) -- filename for backup  DECLARE @fileDate VARCHAR(20) -- used for file name -- specify database backup directory SET @path = 'C:\Backup\'  -- specify filename format SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112) DECLARE db_cursor CURSOR READ_ONLY FOR  SELECT name FROM master.sys.databases WHERE name NOT IN ('master','model','msdb','tempdb')  -- exclude these databases AND state = 0 -- database is online AND is_in_standby = 0 -- database is not read only for log shipping OPEN db_cursor  FETCH NEXT FROM db_cursor INTO @name  WHILE @@FETCH_STATUS = 0  BEGIN     SET @fileName = @path + @name + '_' + @fileDate + '.BAK'     BACKUP DATABASE @name TO DISK = @fileName     FETCH NEXT

How to install OCI8 on Ubuntu 17.10 and PHP 7.1

Install Oracle Instant Client and SDK Step 1 Download the latest Oracle Instant Client and SDK from the Oracle website (Yeah, fuck you Oracle, you need to create an account to download the files). http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html Look for instantclient-basic-linux.x64-12.2.0.1.0.zip and instantclient-sdk-linux.x64-12.2.0.1.0.zip. Step 2 Create a new folder to store the Oracle Instant Client files on your machine. mkdir /opt/oracle And move your files to /opt/oracle. Step 3 Extract the files cd /opt/oracle unzip instantclient-basic-linux.x64-12.2.0.1.0.zip unzip instantclient-sdk-linux.x64-12.2.0.1.0.zip Step 4 Next, we need to symlink the .so files. ln -s /opt/oracle/instantclient_12_2/libclntsh.so.12.2 /opt/oracle/instantclient_12_2/libclntsh.so ln -s /opt/oracle/instantclient_12_2/libocci.so.12.2 /opt/oracle/instantclient_12_2/libocci.so Step 5 Now lets add the folder to the ldconfig's config folder. echo /opt/oracl