Skip to main content

Posts

Mac OS MAMP Netbeans Php debug

Reference: http://anthonyringoet.be/post/setting-up-xdebug-mamp-netbeans-for-debugging/ How to debug php at Netbeans at Mac OS. It is easy.  Three steps (1) install MAMP http://www.mamp.info/en/ (2) run a php script for "phpinfo()" to find "php.ini" file (3) modify "php.ini" file [xdebug] zend_extension="/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so" xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_autostart=1

Jersey client post JSON object error

The error message is as follows "MessageBodyWriter not found for media type=application/json  ........ " For a Maven project, please add following line in pom.xml file to solve the issue.         <dependency>             <groupId>org.glassfish.jersey.media</groupId>             <artifactId>jersey-media-moxy</artifactId>             <version>2.11</version>         </dependency>        

Connect MySQL server remotely

For Ubuntu, there are two steps (1)  In MySQL command line,  change privileges GRANT ALL PRIVILEGES ON *.* TO 'USERNAME' @ 'IP' IDENTIFIED BY 'PASSWORD' ; FLUSH PRIVILEGES ; where IP is the IP you want to allow access and USERNAME is the user you use to connect If you want to allow access from any IP just put  %  instead of your IP and then you only have to put FLUSH PRIVILEGES ; Or restart mysql server and that's it. (2) Modify  /etc/mysql/my.cnf  file change "bind-address 127.0.0.1" to "bind-address "your server IP"  Reference: http://stackoverflow.com/questions/8380797/enable-remote-mysql-connection