Showing posts with label PHP. Show all posts

Tuesday, October 2, 2018

Install PHP Imagick on Mac

  No comments
October 02, 2018

To isntall php extension imagick you must using pecl. After you install PHP, you get pecl too. and you can do this step on terminal.



brew install imagemagick
brew install pkg-config
pecl install imagick

the extension automaticly enable on php ini.

Read More

Tuesday, August 7, 2018

How to allow remote connection to mysql

  1 comment
August 07, 2018

What is disabled by default is remote root access. If you want to enable that, run this SQL command locally:


 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
 FLUSH PRIVILEGES;

And then find the following line and comment it out in your my.cnf file, which usually lives on /etc/mysql/my.cnf on Unix/OSX systems. In some cases the location for the file is /etc/mysql/mysql.conf.d/mysqld.cnf).


If it's a Windows system, you can find it in the MySQL installation directory, usually something like C:\Program Files\MySQL\MySQL Server 5.5\ and the filename will be my.ini.


Change line


 bind-address = 127.0.0.1

to


 #bind-address = 127.0.0.1

And restart the MySQL server (Unix/OSX, and Windows) for the changes to take effect.


if this not working. check the 3306 port.


sudo ufw status


run this command to enable port



sudo ufw allow 3306



restart mysql

Read More

Wednesday, November 29, 2017

Install PHP Imagick in Windows

  No comments
November 29, 2017

How to install php_imagick.dll in windows php. you need to know the exact version of your PHP. To do this: open a command prompt and enter these commands

Determine the PHP version:
php -i|find "PHP Version"

Determine the thread safety
php -i|find "Thread Safety"
You’ll have enabled for thread safe or disable for not thread safe

Determine the architecture
php -i|find "Architecture"
You’ll have x86 for 32 bits and x64 for 64 bits

PHP Imagick

after knowing your php version,  you have to download the dll of the PHP extension and the ImageMagick archive using the following table:

VersionThread Safe# of bitsEstensionImageMagick
5.5Yes32php_imagick-3.4.3-5.5-ts-vc11-x86.zipImageMagick-6.9.3-7-vc11-x86.zip
5.5Yes64php_imagick-3.4.3-5.5-ts-vc11-x64.zipImageMagick-6.9.3-7-vc11-x64.zip
5.5No32php_imagick-3.4.3-5.5-nts-vc11-x86.zipImageMagick-6.9.3-7-vc11-x86.zip
5.5No64php_imagick-3.4.3-5.5-nts-vc11-x64.zipImageMagick-6.9.3-7-vc11-x64.zip
5.6Yes32php_imagick-3.4.3-5.6-ts-vc11-x86.zipImageMagick-6.9.3-7-vc11-x86.zip
5.6Yes64php_imagick-3.4.3-5.6-ts-vc11-x64.zipImageMagick-6.9.3-7-vc11-x64.zip
5.6No32php_imagick-3.4.3-5.6-nts-vc11-x86.zipImageMagick-6.9.3-7-vc11-x86.zip
5.6No64php_imagick-3.4.3-5.6-nts-vc11-x64.zipImageMagick-6.9.3-7-vc11-x64.zip
7.0Yes32php_imagick-3.4.3-7.0-ts-vc14-x86.zipImageMagick-6.9.3-7-vc14-x86.zip
7.0Yes64php_imagick-3.4.3-7.0-ts-vc14-x64.zipImageMagick-6.9.3-7-vc14-x64.zip
7.0No32php_imagick-3.4.3-7.0-nts-vc14-x86.zipImageMagick-6.9.3-7-vc14-x86.zip
7.0No64php_imagick-3.4.3-7.0-nts-vc14-x64.zipImageMagick-6.9.3-7-vc14-x64.zip
7.1Yes32php_imagick-3.4.3-7.1-ts-vc14-x86.zipImageMagick-6.9.3-7-vc14-x86.zip
7.1Yes64php_imagick-3.4.3-7.1-ts-vc14-x64.zipImageMagick-6.9.3-7-vc14-x64.zip
7.1No32php_imagick-3.4.3-7.1-nts-vc14-x86.zipImageMagick-6.9.3-7-vc14-x86.zip
7.1No64php_imagick-3.4.3-7.1-nts-vc14-x64.zipImageMagick-6.9.3-7-vc14-x64.zip

Download the file properly and do it this way


  • Extract from php_imagick-….zip to the ext directory the php_imagick.dll file of your PHP installation
  • Extract from ImageMagick-….zip to the root PHP directory (where php.exe resides) the DLL files that start with:
    CORE_RL_
    IM_MOD_RL_
  • Add this line to your php.ini file: extension=php_imagick.dll
Restart your php and your server. Done. your php imagick  on windows has been active

Read More

Friday, November 10, 2017

Add Pemanently to the PATH on MAC OS

  1 comment
November 10, 2017

Sometime after you install binary, example composer and package from composer. You must add composer to PATH, so many tutorial export PATH but is temporarly. Then how to add the path permanent.

  1. open terminal and type
    sudo nano /etc/paths

  2. Enter your password, when prompted.
  3. Go to the bottom of the file, and enter the path you wish to add
  4. Hit control-x to quit. and enter Y
  5. Open new terminal and type
    echo $PATH
You should see something similar to this (including the path you’ve added!):
add composer to PATH
add composer to PATH

Read More

Monday, February 6, 2017

How to detect php.ini on mac

  No comments
February 06, 2017

How to detect php.ini on mac,

easy to detect php.ini folder. you can use 2 way.

1. create file info.php and put this script

<?php
phpinfo();
?>

2. open terminal and type this command

php -i | grep php.ini    

and terminal will show the path folder of php.ini


Read More

Tuesday, March 22, 2016

Installing Composer on Mac OS X Mountain Lion

  No comments
March 22, 2016

Composer untuk windows bisa langsung di download di getcomposer.org. tapi bagaimana dengan mac atau linux. kalian bisa menggunakan cara ini untuk install composer di mac os atau linux.

composer


Running the curl command with terminal
$ cd /path/to/my/project
$ curl -s http://getcomposer.org/installer | php
setelah itu kalian bisa menggunakannya composer di folder project tersebut dengan cara

$ php composer.phar

atau bisa mencoba cara yang ini untuk globaly

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer 

selamat mencoba

Read More

Saturday, July 23, 2011

Tutorial Membuat Buku Tamu Menggunakan PHP

  4 comments
July 23, 2011

Tutorial Membuat Buku Tamu Menggunakan PHP - Bagi kalian yang sedang belajar atau baru mulai ingin memelajari PHP, mungkin tutorial ini berguna untuk refrensi dalam belajar. Tutorial ini dibuat dengan singkat dan mudah dipelajari. Silahkan membaca dan mendowload secara gratis. Bila ada kritik dan saran silahkan sampaikan di blog ini, terima kasih.

Download E-book Tutorial Membuat Buku Tamu Menggunakan PHP

Download E-book Tutorial Membuat Buku Tamu Menggunakan PHP

Read More