[SOLUTION] PHP 5.4 error ldap_search(): Search: Can’t contact LDAP server

Lately I got problem with my application which need LDAP for authentication process, in my local server there are no problem. However, once I have uploaded into production server there are some problem appear such as cannot connect to LDAP server (error ldap_search(): Search: Can’t contact LDAP server).

I used Centos 7 for my operating system, PHP 5.4.16 and MySQL 5.7.21. I found some solutions, but I here are the solution worked for me :

  1. Install / reinstall php-ldap module.
  2. Add 1 line of PHP code to set option for LDAP connection.

Continue reading

[TESTED] Extend and mount new disk (/dev/sdb/) into your folder in dev/sda – Centos 7

My server has a partition and the disk size just 38GB, whereas I need about 20GB more for save my new files. With this condition I think have just two options between extend the partition before or add new disk and mount it into a folder within my partition before. Then I discuss with my friend which way is the best and the faster, finally I choose the second option which is add new disk (new partition, basically it will named as /dev/sdb/, /dev/sdc/, etc) and mount it into my specific folder, let say I will mount it into /opt/lampp/htdocs/aset.

So, how to extend new disk and mount it into our custom folder? here are the steps. This solution was tested successfully in my server Linux Centos 7.

# Check your which one is your new disk
# you can check that with this
sudo parted -l | grep Error

# or this one
# just make sure the free size still 100%
lsblk

# in my case I got /dev/sdb/
# so I started with this
pvcreate /dev/sdb

vgcreate diskaset /dev/sdb

lvclear

vgdisplay

# Chek these line!
# Alloc PE / Size       12799 / <50.00 GiB
# Free  PE / Size       0 / 0
#
# 12799 refers to Free PE or Alloc PE
lvcreate -l 12799 lv_diskaset diskaset

# Format the disk into XFS
# for "/disk/diskaset/" name it as you wish
sudo mkfs.xfs /dev/diskaset/
sudo mkfs.xfs /dev/diskaset/lv_diskaset

# Create folder for mount the disk
mkdir /opt/lampp/htdocs/aset/

# Mounting
mount /dev/diskaset/lv_diskaset /opt/lampp/htdocs/aset/

# Edit the "/etc/fstab" file for autostart when server startup
# Save
nano /etc/fstab/

# Add this line in the bottom
/dev/diskaset/lv_diskaset /opt/lampp/htdocs/aset        xfs     defaults        0 0

# Reboot your server
reboot

Finish, hope my solution above will help you sometime to extend and mount new disk into your custom folder for expanding storage in Linux Centos 7.

[SOLVED] Failed to load “libpepflashplayer.so” Ubuntu 17

Flash player in my Mozilla Firefox show error message failed to load libpepflashplayer.so, in Ubuntu 17. I tried to install flash player from Software Center but failed. So I tried install from apt-get Ubuntu in terminal with this script :

sudo apt-get install flashplugin-installer

After installation process finished, I try to open a website which has a flash player content, and it said error message above. Finally, I fixed this problem with this way (download from Adobe Website) :

  1. Go to https://get.adobe.com/flashplayer/otherversions/
  2. Set the Step 1 and Step 2 with your operating system, mine like this
  3. Download the PPAPI .tar.gz
  4. When download finished, extract it. You will see a file named libpepflashplayer.so, copy it into /usr/lib/mozilla/plugins/
  5. Restart your Mozilla Firefox and reload the website. DONE.

Hope this will help you out guys 🙂

[TESTED] Remove / Bypass VBA Password in Excel

Here is a solution for you to unlock, remove or bypass password from your Excel VBA Project. A few days ago my friend ask me about this problem. He has an Excel file (macro enabled spreadsheet) which locked by password that he created before, and he forgot the password to open VBA source code.

Well, let’s go to the point. These are what you need :

  1. You need to download and install Hex Editor Neo.
  2. Your locked Excel file.

Continue reading

User REVIEW for PostgreSQL

Sometimes we need a database user only for review (read-only) purposes, this user used just for view some data or all data in a database, not for insert, delete and other CRUD activities in a database.

So if you want to create a REVIEW user in PostgreSQL, you have to grant access for SELECT and EXECUTE in a schema or database, and you have to grant access that user into schema itself. These script will help you out to create review user in PostgreSQL :

CREATE USER review WITH PASSWORD 'password_review';

GRANT SELECT ON ALL TABLES IN SCHEMA schema_name TO review;
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA schema_name TO review;
GRANT USAGE ON SCHEMA schema_name TO review;

[SOLVED] Problem : Could not connect to server: connection timed out (0x0000274c/10060)

I have a problem when I tried to remote PostgreSQL Server (in Linux Centos) from my PgAdmin Client (in Windows), there’s an error message displayed on screen said “could not connect to server: connection timed out (0x0000274c/10060) is the server running on host and accepting tcp/ip connections on port 5432?”

I checked my firewall status with :
systemctl status firewalld

Condition : Not Normal

It said that my firewall status was Active: failed. From here I’m sure there’s problem with my firewall process, because if the firewall stopped successfully, the status will be inactive like this image below :

Condition : Normal

SOLUTION

After tried many solution, I ended-up with this one :
systemctl unmask firewalld

Next step after run unmask syntax, I tried to restart my firewall and it runs flawlessly :). Hope this thread help you guys.

Link Tidak Bisa Dibuka di WebView Android

Beberapa hari yang ada keperluan untuk membuat launcher sebuah website berupa aplikasi Android. Sudah pasti yang saya manfaatkan adalah modul WebView Android untuk menampilkan sebuah website, tanpa harus menggunakan browser default dari Smartphone Android.

Kurang lebih script untuk menampilkan website melalui WebView Android sebagai berikut : Continue reading

Script Link HTML Membuka Aplikasi WhatsApp, SMS dan Telepon Dari Website

Apakah Anda pernah kepikiran ketika menampilkan Nomor Telepon di Website milik Anda, lalu ingin agar pengunjung website tersebut bisa langsung melakukan komunikasi dengan Anda bisa itu menggunakan WhatsApp, SMS, Telepon atau Email tanpa harus menambahkan daftar kontak di HP pengunjung website Anda tadi? Seperti tombol Call yang biasa ada di Facebook atau Instagram.

Jika ingin Website Anda lebih interaktif seperti itu, saya yakin script HTML sederhana berikut ini akan cukup bermanfaat :

Link HTML Untuk Membuka Aplikasi WhatsApp

<a href="intent://send/+62NoTeleponAnda#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end">Hubungi Kami Lewat WhatsApp</a>

Link HTML Untuk Membuka Aplikasi SMS

<a href="intent://send/+62NoTeleponAnda#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end">Hubungi Kami Lewat WhatsApp</a>

Link HTML Untuk Membuka Aplikasi Telepon

<a href="tel://NoTeleponAnda">Hubungi Kami Lewat SMS</a>

Link HTML Untuk Membuka Aplikasi Email

<a href="mailto://AlamatEmailAnda">Hubungi Kami Lewat Email</a>

Semoga script link html tersebut diatas bisa bermanfaat dan semakin membuat website Anda lebih interaktif bagi pengunjung.

Kekurangan iPhone Jepang, iPhone Korea dan iPhone Arab

Berencana beli iPhone bekas atau iPhone garansi ditributor (refurbished)? Sangat saya sarankan kalian baca artikel mengenai bagaimana cara mengetahui iphone itu masih kondisi bagus atau sudah tidak layak dipilih. Poin pentingnya adalah harus sabar dan ulet dalam mencari sampai ketemu mana iPhone yang benar-benar cocok untuk kalian.

Saat ini sudah sangat banyak iPhone yang dijual dengan harga miring (lebih murah dibanding pasarannya), mau itu iPhone 4, 4S, 5, 5S atau seri iPhone yang baru. Kita musti jeli dalam memilih, pastikan semua fitur yang ada berjalan normal sesuai kebutuhan kita (sebagai warga Indonesia) dan kondisi fisik dari iPhone itu sendiri. Hal-hal yang perlu kalian cek ketika ingin membeli iPhone bekas / garansi distributor adalah : Continue reading