i finally got the right answer.. the wiringpi wrapper for php doesn't work. it is because the wiringpi.ini is not chmod 777. all i need is to change its privileges
sudo chmod 777 wiringpi.ini
then reload php5-fpm, restart it
reload nginx , restart it
It's good to go. Functionally.