<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Just Another Dang Blog &#187; WAMP</title>
	<atom:link href="http://blog.lopau.com/category/wamp/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lopau.com</link>
	<description>A tech blog about web development, graphic designs, freelancing, cloud computing, mobile development, innovations and seo.</description>
	<lastBuildDate>Thu, 06 Oct 2011 03:01:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Installing GoDaddy SSL on an EC2 Ubuntu Instance in AWS</title>
		<link>http://blog.lopau.com/installing-godaddy-ssl-on-an-ec2-ubuntu-instance-in-aws/</link>
		<comments>http://blog.lopau.com/installing-godaddy-ssl-on-an-ec2-ubuntu-instance-in-aws/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 07:09:38 +0000</pubDate>
		<dc:creator>lopau</dc:creator>
				<category><![CDATA[WAMP]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[godaddy]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.lopau.com/?p=1440</guid>
		<description><![CDATA[If you have sensitive data on your site, you may want to install an SSL Certificate to make it more secure. Here is a brief tutorial being on AWS EC2 Ubuntu instance on how to set it up. My server settings are Apache2 and Ubuntu 9.x 1. Login to ssh/terminal on your server 2. Enable [...]]]></description>
			<content:encoded><![CDATA[<p>If you have sensitive data on your site, you may want to install an SSL Certificate to make it more secure. Here is a brief tutorial being on AWS EC2 Ubuntu instance on how to set it up. </p>
<p>My server settings are Apache2 and Ubuntu 9.x<br />
<span id="more-1440"></span><br />

<!-- Begin Google Adsense code -->
<div class="googleads">
<script type="text/javascript"><!--
google_ad_client = "pub-4515932012590505";
/* 200x200, created 10/29/08 */
google_ad_slot = "3929428513";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<!-- End Google Adsense code -->
<br />
1. Login to ssh/terminal on your server<br />
2. Enable SSL for WebServer(Apache2)</p>
<blockquote><p>sudo a2enmod SSL</p></blockquote>
<p>3. Create the server SSL Key</p>
<blockquote><p>sudo bash</p></blockquote>
<p> On Ubuntu this changes you to the root user as you cannot access the directory on the next step.</p>
<blockquote><p>cd /etc/ssl/private</p></blockquote>
<blockquote><p>openssl genrsa -des3 -out myserver.com.key 2048</p></blockquote>
<p> Make sure its 2048 and not 1024 bit as this would be required later on GoDaddy.<br />
Enter keyphrase</p>
<p>5. Create the CSR (Certificate Service Request) to be entered on GoDaddy</p>
<blockquote><p>openssl req -new -key myserver.com.key -out myserver.com.csr</p></blockquote>
<p>Upon enter it will ask you for several things but make sure that under Common Name you put your website url (myserver.com). (GoDaddy will throw an error if it is not a correct website)</p>
<p>6. View the CSR and Copy. Paste it later to your GoDaddy SSL Certificate Management</p>
<p>7. On GoDaddy SSL Certificate Management make a Request and choose Third Party, Web Server no Control Panel. And Paste the CSR code.</p>
<blockquote><p>a. Upon Submit you would get the approval. It would check that your domain registry and administrative contacts to verify.<br />
b. If it cannot be verified via the domain registry, you will be emailed a code that you need to create as a file and upload to your server instead.
</p></blockquote>
<p>8. Install your certificate gd_bundle.crt and myserver.com.crt to your server. Upload them to the server and install. Back to shell</p>
<blockquote><p>mv gd_bundle.crt /etc/ssl/gd_bundle.crt<br />
mv myserver.com.crt /etc/ssl/certs/myserver.com.crt
</p></blockquote>
<p>9. Edit the default Apache2 values at /etc/apache2/sites-available/default. Create a new virtualhost</p>
<blockquote><p>NameVirtualHost *:443<br />
<virtualhost *:443><br />
DocumentRoot /var/www/<br />
SSLEngine on<br />
SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire<br />
SSLCertificateFile /etc/ssl/certs/myserver.com.crt<br />
SSLCertificateKeyFile /etc/ssl/private/myserver.com.key<br />
SSLCertificateChainFile /etc/ssl/gd_bundle.crt<br />
</virtualhost></p></blockquote>
<p>10. Make sure Apache2 to listen on port 443, edit the /etc/apache2/ports.conf<br />
Under</p>
<blockquote><p><ifmodule mod_ssl.c><br />
Listen 443</p>
<p></ifmodule></p></blockquote>
<p>10. Restart Apache</p>
<blockquote><p>/etc/init.d/apache2 restart</p></blockquote>
<p>If all went well you should be able to access https</p>
<p>For EC2 make sure Port 443 is enabled as well on the AWS Console</p>
<p>11. Then to force redirect users to https create an htaccess file and upload to your root www folder</p>
<blockquote><p>RewriteEngine On<br />
RewriteCond %{SERVER_PORT} 80<br />
RewriteRule ^(.*)$ https://www.myserver.com/$1 [R,L]</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.lopau.com/installing-godaddy-ssl-on-an-ec2-ubuntu-instance-in-aws/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon RDS instance time zone workarounds</title>
		<link>http://blog.lopau.com/amazon-rds-instance-time-zone-workarounds/</link>
		<comments>http://blog.lopau.com/amazon-rds-instance-time-zone-workarounds/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 05:23:59 +0000</pubDate>
		<dc:creator>lopau</dc:creator>
				<category><![CDATA[WAMP]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[rds]]></category>

		<guid isPermaLink="false">http://blog.lopau.com/?p=1438</guid>
		<description><![CDATA[If you have an EC2 instance to run your application and an RDS instance for your database. On your EC2 instance you are in luck as you can easily change the time zone of the machine. Like set it to GST or by location like below # ln -sf ../usr/share/zoneinfo/Asia/Dubai /etc/localtime The real issue is [...]]]></description>
			<content:encoded><![CDATA[<p>If you have an EC2 instance to run your application and an RDS instance for your database. On your EC2 instance you are in luck as you can easily change the time zone of the machine. Like set it to GST or by location like below</p>
<blockquote><p># ln -sf ../usr/share/zoneinfo/Asia/Dubai /etc/localtime</p></blockquote>
<p><span id="more-1438"></span></p>
<p>
<!-- Begin Google Adsense code -->
<div class="googleads">
<script type="text/javascript"><!--
google_ad_client = "pub-4515932012590505";
/* 200x200, created 10/29/08 */
google_ad_slot = "3929428513";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<!-- End Google Adsense code -->
<br />
The real issue is that you can&#8217;t change your timezone on your MySQL RDS instance its default it UTC and you cannot modify this. Making our timestamp 4 hours behind.</p>
<p>3 Workaround solutions gathered are the following.<br />
1. Set Time Zone per connection </p>
<blockquote><p>eg. SET time_zone = &#8216;Asia/Dubai&#8217;;</p></blockquote>
<p>2. MySQL convert_tz function per insert</p>
<p>insert into table (timestamp) values (convert_tz(now(), &#8216;GST&#8217;, &#8216;Asia/Dubai&#8217;));</p>
<p>3. Manually getting timezone by code</p>
<blockquote><p>$date = date(&#8216;Y-m-d H:i:s&#8217;);<br />
insert into table(date) values (&#8216;&#8221; . $date .&#8221;&#8216;)</p></blockquote>
<p>Another issue I have is to update old timestamp records in my database to adjust it by 4 hours. If you have a table with old records and want to update the timezone by adding/minus (x) hours to adjust you can try this query.</p>
<blockquote><p>UPDATE table SET datefield= DATE_ADD(datefield, INTERVAL 4 HOUR);</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.lopau.com/amazon-rds-instance-time-zone-workarounds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protection from SQL Injection and XSS Attack on CKEditor</title>
		<link>http://blog.lopau.com/protection-from-sql-injection-and-xss-attack-on-ckeditor/</link>
		<comments>http://blog.lopau.com/protection-from-sql-injection-and-xss-attack-on-ckeditor/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 07:08:59 +0000</pubDate>
		<dc:creator>lopau</dc:creator>
				<category><![CDATA[WAMP]]></category>
		<category><![CDATA[sql injection]]></category>
		<category><![CDATA[xss attack]]></category>

		<guid isPermaLink="false">http://blog.lopau.com/?p=1427</guid>
		<description><![CDATA[Lazy coding got the better of me as one of the sites I built got hacked. The site is running on a custom php framework I built. Security wise it was still too infant and alot of security needs to be patched. Through SQL Injection via the URL the hacker was able to get into [...]]]></description>
			<content:encoded><![CDATA[<p>Lazy coding got the better of me as one of the sites I built got hacked. The site is running on a custom php framework I built. Security wise it was still too infant and alot of security needs to be patched. Through SQL Injection via the URL the hacker was able to get into my database and eventually cracked a user&#8217;s password then posted an XSS script on the CKEditor which eventually got the site compromised further. </p>
<p><span id="more-1427"></span></p>
<p>
<!-- Begin Google Adsense code -->
<div class="googleads">
<script type="text/javascript"><!--
google_ad_client = "pub-4515932012590505";
/* 200x200, created 10/29/08 */
google_ad_slot = "3929428513";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<!-- End Google Adsense code -->
So here are some tips on how to patch up your system based on experience, you can do further reading on the topics.<br />
1. To avoid SQL injection, if your query string is something like </p>
<blockquote><p>index.php?page=news</p></blockquote>
<p>script-kiddies and hackers love this, make sure you sanitize the variables before you do a select query on your database, a simple index.php?page=news&#038;1=1 could expose your db.</p>
<p>a. First turn off magic_quotes, you should stop using this as its deprecated and causes a bit of confusion from addslashes/stripslashes.</p>
<p>b. To sanitize here are a couple of functions you can use, strip_tags() and mysql_real_escape_string() functions, use them on your passed variable before you use in a select or insert statement.</p>
<p>c. Learn how to use apache_mod_rewrite, you can rename your query strings plus its a good SEO tool so from</p>
<blockquote><p>index.php?page=news to something like /page/news/ </p></blockquote>
<p>2. If you have users in your system make sure their passwords are strong enough. Use uppercase, lowercase, characters etc.. If a hack was able to do an SQL Injection and got hold of your database info and users, they can reverse md5 a weak password in seconds. </p>
<p>NOTE: For testing I used a tool to try SQL Injection on a copy of the website on my localhost, I was able crack it in less than 5 minutes. Thats how fast a hacker can compromise your system if security is weak.</p>
<p>3. WYSIWG CKEditor is a great tool but it opens alot of vulnerability, without properly sanitizing the input you can put in malicous javascript codes. Test your editor by entering </p>
<blockquote><p>alert(&#8220;Test&#8221;)</p></blockquote>
<p>If you see the alert box your very susceptible to XSS attack.</p>
<p>Since CKEditor outputs HTML you can&#8217;t do strip_tags as it will strip away your HTML unless you pass it some parameters. A better way is to install <a href="http://htmlpurifier.org/">HTMLPurifier</a>, its free and opensource. Using it will dramatically reduce the chances of getting an XSS attack on your editor.</p>
<p>4. If you are using CKFinder you must properly set the CheckAuthentication function, simply stating true will allow anybody who knows the location of the file to upload any file to your system. Good thing CKFinder upload is disabled for files with .php extensions or the renamed shell script from (file.php to file.php.pdf) would have compromised my server further.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lopau.com/protection-from-sql-injection-and-xss-attack-on-ckeditor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Subversion on Bluehost, configuring subversion client on Windows and Mac OS X</title>
		<link>http://blog.lopau.com/install-subversion-on-bluehost-configuring-subversion-client-windows-and-mac-os-x/</link>
		<comments>http://blog.lopau.com/install-subversion-on-bluehost-configuring-subversion-client-windows-and-mac-os-x/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 16:14:37 +0000</pubDate>
		<dc:creator>lopau</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://blog.lopau.com/?p=1382</guid>
		<description><![CDATA[Been using Version Control System on our company projects for a couple of years now. I&#8217;ve installed Subversion before on a dedicated Linux hosting(Known Host) and everything is straightforward since I have root access. Recently my personal hosting account with bluehost got renewed and I&#8217;m not really utilizing the server that much I figured to [...]]]></description>
			<content:encoded><![CDATA[<p>Been using Version Control System on our company projects for a couple of years now. I&#8217;ve installed Subversion before on a dedicated Linux hosting(<a href="http://www.knownhost.com/">Known Host</a>) and everything is straightforward since I have root access.</p>
<p>Recently my personal hosting account with bluehost got renewed and I&#8217;m not really utilizing the server that much I figured to try installing subversion on Bluehost to make my hosting more useful. As far as I have tried I can only connect via svn+ssh and not through http as I dont have access to apache to add mod_dav_svn.so on my shared hosting account unless I upgrade to a dedicated host which is not what I want. I documented the steps I took just in case someone will find them useful on setting up theirs.</p>
<p><span id="more-1382"></span><br />

<!-- Begin Google Adsense code -->
<div class="googleads">
<script type="text/javascript"><!--
google_ad_client = "pub-4515932012590505";
/* 200x200, created 10/29/08 */
google_ad_slot = "3929428513";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<!-- End Google Adsense code -->
<br />
On my initial setup I used a Windows machine(I&#8217;m using Windows 7 64bit)</p>
<p>1. First is you need to enable SSH access on your account. Login to your account and request to enable SSH if not yet enabled. (The SSH option is disabled by default you need to submit a ticket to have it activated) Got mine activated within an hour.</p>
<p>2. Once enabled you should be supplied with a hostname, login user and password</p>
<p>3. Download the following applications: <strong>Putty </strong>and <strong>PuttyGen</strong> from <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html<br />
</a><br />
and TortoiseSVN from <a href="http://tortoisesvn.net/">http://tortoisesvn.net/</a></p>
<p>4. Using putty connect to your host by entering the hostname and default port 22, enter your username and password on the command prompt type window.</p>
<p>5. Next is to create src directory and download the latest subversion package.</p>
<div class="codesnip-container" >mkdir src<br />
cd src<br />
wget http://subversion.tigris.org/downloads/subversion-1.6.9.tar.bz2<br />
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.9.tar.bz2<br />
tar -xvjpf  subversion-1.6.9.tar.bz2<br />
tar -xvjpf  subversion-deps-1.6.9.tar.bz2<br />
cd subversion-1.6.9<br />
./configure &#8211;prefix=$HOME &#8211;without-berkeley-db &#8211;with-ssl LDFLAGS=&#8221;-L/lib64&#8243;<br />
make<br />
make install</div>
<p>that should install subversion on your server<br />
6. Create a svn directory and then the repository folder</p>
<div class="codesnip-container" >cd<br />
mkdir svn<br />
cd svn</div>
<div class="codesnip-container" >svnadmin create &#8211;fs-type fsfs projects<br />
chmod -R 755 projects</div>
<p>7.  If you have an existing website under public_html you can import it now to your repo</p>
<div class="codesnip-container" >svn import /home/USER/public_html/mywebsite file:///home/USER/svn/projects/mywebsite &#8211;message=&#8221;Importing website&#8221;</div>
<p>8. Edit your .bashrc file in vi and add the following then exit and save.</p>
<div class="codesnip-container" >PATH=$PATH:$HOME/bin</div>
<p>9. Next test out if all is working</p>
<div class="codesnip-container" >svn list svn+ssh://<br />
 USER_NAME@www.YOUR_DOMAIN.com/home/USER/svn/projects/mywebsite</div>
<p>10. Next is for setting up your subversion client to connect to the repo URL for Windows. Create a keypair on the server, this is going to be used for authentication.</p>
<div class="codesnip-container" >cd<br />
ssh-keygen -b 1024 -t dsa -f mykey</div>
<div class="codesnip-container" >mkdir ~/.ssh<br />
chmod 700 ~/.ssh<br />
cp mykey.pub ~/.ssh/authorized_keys</div>
<p>11. Download the key to your computer using your FTP client.<br />
12. Convert the key in <strong>puttygen</strong>, open up <strong>puttygen </strong>then on <strong>Conversions </strong>menu load the key and click on <strong>Save Private Key</strong> and save it as <strong>mykey.ppk</strong></p>
<p>13. Test the key<br />
open putty and create a new session like this:<br />
Session->HostName: www.yourdomain.com<br />
Session->Protocol: SSH<br />
Session->Saved Sessions: yourdomain<br />
SSH->Prefered SSH Protocol version: 2<br />
SSH->Auth->Private Key file for auth: browse and select mykey.PKK<br />
Go back to Session node and hit &#8220;save&#8221; button. You will see &#8220;yourdomain&#8221; in the list of available sessions.<br />
Click &#8220;open&#8221; and you should see a telnet login prompt.<br />
Use your username and if everything is ok, you don&#8217;t have to provide a password to your system.</p>
<p>14. On Windows 7 go to config file and edit with notepad.</p>
<div class="codesnip-container" >C:\Users\YOUR_LOCAL_USERNAME\AppData\Roaming\Subversion\config</div>
<p>Look for the section [tunnels] and add the following line</p>
<div class="codesnip-container" >ssh = c:\\Program\ Files\\TortoiseSVN\\bin\\TortoisePlink.exe</div>
<p>15. Finally checkout go to the folder you want to store the files and, if you already installed TortoiseSVN you should have a right click option SVN Checkout. For the URL of the repository simply enter the svn+ssh URL you tested earlier.</p>
<div class="codesnip-container" >svn+ssh://<br />
 USER_NAME@www.YOUR_DOMAIN.com/home/USER/svn/projects/mywebsite</div>
<p>That should get you up and running on your Windows machine.</p>
<p>Now for your Mac machine, first download the <a href="http://scplugin.tigris.org/">scplugin</a>, this is the mac counterpart of TortoiseSVN. Currently the contextual menu and icon badging is not working right on Snow Leopard or on Lion.</p>
<p>1. First launch Terminal from the Utilities and create a key, leave passphrase as blank</p>
<div class="codesnip-container" >ssh-keygen -t dsa</div>
<p>2.  Next is SCP the key to your server using the username, domain name and password</p>
<div class="codesnip-container" >scp ~/.ssh/id_dsa.pub username@domainname.com:</div>
<p>The key should be uploaded successfully to your server</p>
<p>3. Next login to your server</p>
<div class="codesnip-container" >ssh username@domainname.com<br />
mkdir .ssh          # if it&#8217;s not already there<br />
cat id_dsa.pub >>.ssh/authorized_keys<br />
rm id_dsa.pub       # cleanup</div>
<p>4. That should be it you should not be prompted to enter your password when you login to your server either from SSH or SCP and even on the scplugin.</p>
<p>5. Open up Finder and browse to the folder you want to Checkout for your files. On the Finder Toolbar if you installed it right you should see the scplugin toolbar, click on that and choose Checkout, then enter your svn+ssh URL.</p>
<div class="codesnip-container" >svn+ssh://<br />
 USER_NAME@www.YOUR_DOMAIN.com/home/USER/svn/projects/mywebsite</div>
<p>That should be it, you should be up and running. </p>
<p>Resources:<br />
<a href="http://www.tabruyn.com/site/index.php?option=com_content&#038;view=article&#038;id=55:tortoisesvn-subversion-and-bluehost&#038;catid=36:digital&#038;Itemid=58">http://www.tabruyn.com/site/index.php?option=com_content&#038;view=article&#038;id=55:tortoisesvn-subversion-and-bluehost&#038;catid=36:digital&#038;Itemid=58</a><br />
<a href="http://">http://www.bluehostforum.com/showthread.php?12099-Setting-up-Subversion-on-Bluehost</a><br />
<a href="http://blog.macromates.com/2005/subversion-support-and-ssh-key-pairs/">http://blog.macromates.com/2005/subversion-support-and-ssh-key-pairs/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lopau.com/install-subversion-on-bluehost-configuring-subversion-client-windows-and-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java SE Development (JDK) not found installing Android SDK</title>
		<link>http://blog.lopau.com/java-se-development-jdk-not-found-installing-android-sdk/</link>
		<comments>http://blog.lopau.com/java-se-development-jdk-not-found-installing-android-sdk/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 02:50:37 +0000</pubDate>
		<dc:creator>lopau</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://blog.lopau.com/?p=1329</guid>
		<description><![CDATA[This is a simple tutorial for users with Vista/Windows 7 64-bit. So you got Eclipse(Helios, Indigo) 64 bit running on your 64-bit machine and definitely you have Java SE Development and Jave Runtime Environment in check. But when you run the Andriod SDK installer you get this error. Java SE Development (JDK) not found. Android [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple tutorial for users with Vista/Windows 7 64-bit.</p>
<p>So you got Eclipse(Helios, Indigo) 64 bit running on your 64-bit machine and definitely you have Java SE Development and Jave Runtime Environment in check. But when you run the Andriod SDK installer you get this error.</p>
<p>Java SE Development (JDK) not found.</p>
<p>Android SDK relies on Java SE Development Kit(JDK)<br />
Go to http://java.sun.com &gt; Downloads &gt; Java SE &gt; JD to download and install a JDK before continuing.</p>
<p>Note: A Java Runtime (JRE) is not enought to develop for Android.</p>
<p><a href="http://blog.lopau.com/wp-content/uploads/2011/07/jdknotfound.jpg"><img class="aligncenter size-full wp-image-1330" title="jdknotfound" src="http://blog.lopau.com/wp-content/uploads/2011/07/jdknotfound.jpg" alt="" width="496" height="360" /></a></p>
<p>Well its a bug in the installer, for a simple solution simply hit the Back button and click on Next. Your JDK should be detected.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lopau.com/java-se-development-jdk-not-found-installing-android-sdk/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Eclipse PDT 32-bit on Windows 7</title>
		<link>http://blog.lopau.com/eclipse-pdt-32-bit-on-windows-7/</link>
		<comments>http://blog.lopau.com/eclipse-pdt-32-bit-on-windows-7/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 03:47:32 +0000</pubDate>
		<dc:creator>lopau</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://blog.lopau.com/?p=1312</guid>
		<description><![CDATA[Recently I upgraded from Windows XP to Windows 7. Seems that the 32-bit and 64-bit architecture in regards to programs is still a bit confusing. I&#8217;m using Eclipse PDT 32-bit which at the moment the only current all in one version. Can be downloaded here. You have 2 optiona to get started 1. The first [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I upgraded from Windows XP to Windows 7. Seems that the 32-bit and 64-bit architecture in regards to programs is still a bit confusing.</p>
<p>I&#8217;m using Eclipse PDT 32-bit which at the moment the only current all in one version. Can be downloaded <a href="http://www.eclipse.org/pdt/downloads/">here</a>.<br />
<span id="more-1312"></span><br />

<!-- Begin Google Adsense code -->
<div class="googleads">
<script type="text/javascript"><!--
google_ad_client = "pub-4515932012590505";
/* 200x200, created 10/29/08 */
google_ad_slot = "3929428513";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<!-- End Google Adsense code -->
<br />
You have 2 optiona to get started</p>
<p>1. The first option needs a bit of work which is to<br />
download the <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">64 bit JRE and Java SDK</a> then<br />
 download <a href="http://www.eclipse.org/downloads/">Eclipse Classic</a> 64 bit version and manually add the PDT. <a href="http://wiki.eclipse.org/PDT/Installation#Eclipse_3.7_.2F_Indigo_.2F_PDT_3.0">Check tutorial here.</a></p>
<p>2. Second option is download the Eclipse PDT 32 bit version and then download 32 bit JRE and JDK. You should not mix eclipse 32 bit with 64 bit java, it wont work as I found out the long way.  See my screenshot below, it cannot find it since my Java is 64 bit.</p>
<p><a href="http://blog.lopau.com/wp-content/uploads/2011/07/jre-jdk-error.png"><img class="aligncenter size-full wp-image-1314" title="jre-jdk-error" src="http://blog.lopau.com/wp-content/uploads/2011/07/jre-jdk-error.png" alt="" width="401" height="196" /></a></p>
<p>Following option 2 which is the option I took.<br />
Download the 32 bit version of JRE and Java SDK <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">here </a>.</p>
<p>They will be installed on the C:\Program Files (x64)\Java\ folder.</p>
<p>Next download Eclipse PDT and extract this your C drive like C:\eclipse. If try to run it you will likely get this error.</p>
<p>A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:<br />
c:\Program Files\Eclipse\jre\bin\javaw.exe &#8216;javaw.exe&#8217; in your current PATH</p>
<p><a href="http://blog.lopau.com/wp-content/uploads/2011/07/eclipse-error.png"><img class="aligncenter size-medium wp-image-1316" title="eclipse-error" src="http://blog.lopau.com/wp-content/uploads/2011/07/eclipse-error-300x155.png" alt="" width="300" height="155" /></a></p>
<p>To resolve this<br />
1. Create a shortcut to your desktop</p>
<p>2. Right click on the shortcut and choose properties</p>
<p>3. Edit the target path to</p>
<p>C:\eclipse\eclipse.exe -vm &#8220;C:\Program Files\Java\jdk1.6.0_26\bin&#8221;</p>
<p>Dont forget the quotes as spaces in the target path returns strange results in Windows 7.</p>
<p>That should be it you should be up and running.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lopau.com/eclipse-pdt-32-bit-on-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Setup PHP, MySQL and phpMyAdmin on Mac OS X Snow Leopard</title>
		<link>http://blog.lopau.com/how-to-setup-php-mysql-and-phpmyadmin-on-mac-os-x-snow-leopard/</link>
		<comments>http://blog.lopau.com/how-to-setup-php-mysql-and-phpmyadmin-on-mac-os-x-snow-leopard/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 15:11:07 +0000</pubDate>
		<dc:creator>lopau</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://blog.lopau.com/?p=1151</guid>
		<description><![CDATA[My previous working setup was on WAMP( Windows, Apache, MySQL and PHP). On Windows I used a bundled app WampServer that did the job, just install the executable and your all set. On Mac it kinda needs a bit of work but basically you have to configure PHP, download-install MySQL and phpMyAdmin. I wrote a [...]]]></description>
			<content:encoded><![CDATA[<p>My previous working setup was on WAMP( Windows, Apache, MySQL and PHP). On Windows I used a bundled app WampServer that did the job, just install the executable and your all set.</p>
<p>On Mac it kinda needs a bit of work but basically you have to configure PHP, download-install MySQL and phpMyAdmin.<br />
<span id="more-1151"></span><br />
I wrote a short tutorial below to cover the installation.<br />

<!-- Begin Google Adsense code -->
<div class="googleads">
<script type="text/javascript"><!--
google_ad_client = "pub-4515932012590505";
/* 200x200, created 10/29/08 */
google_ad_slot = "3929428513";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<!-- End Google Adsense code -->
<br />
1. Setup php</p>
<p>Mac OS X Snow Leopard includes <strong>PHP 5.3.x</strong> version by default, you simply need to enable it to start using it.</p>
<p>You can use a text editor or use the <strong>Terminal</strong>, I prefer to use the latter.</p>
<p>a. To launch Terminal go to Applications &gt; Utilities &gt; Terminal</p>
<p>b. On Terminal change directory to <strong>/etc/apache2</strong></p>
<p># cd /etc/apache2</p>
<p>c. Use your favorite editor, I use Vi, open up <strong>httpd.conf </strong></p>
<p>NOTE: The file has write permission, so you need to sudo in order to make changes, if you haven&#8217;t created a password yet for your account, this is the perfect time to create one.</p>
<p>Go to  System Preference &gt; Accounts &gt; Set the password for your account. Once done continue with the terminal</p>
<p># sudo vi httpd.conf</p>
<p>If prompted for your password enter the password.</p>
<p>d. Do a search for .php and uncomment the line</p>
<p>#LoadModule php5_module        libexec/apache2/libphp5.so</p>
<p>To do a search type /.php on the vi editor and hit Enter</p>
<p>e. Exit and Save</p>
<p>Hit the Esc key and type <img src='http://blog.lopau.com/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' />  to exit and save</p>
<p><!-- p.p1 {margin: 0.0px 0.0px 15.0px 0.0px; text-align: justify; line-height: 21.0px; font: 12.0px Helvetica; color: #cccccc} -->2. Start Sharing by opening System Preferences, clicking on <strong>“Sharing” </strong>under Internet &amp; Wireless and then check  <strong>“Web Sharing”</strong>.</p>
<p>Congrats PHP is enabled.</p>
<p>2. Install MySQL</p>
<p>a. Download the package from http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg</p>
<p>b. Pick the 64 bit version.</p>
<p>c. After mounting, go over the readme.txt for more information.  Install the mysql-5.1.56-osx10.6-x86_64.pkg, go through the wizard. </p>
<p>d. Then also install the startup package which will start the MySQL server when you start your Mac.</p>
<p>e. You should be able to connect to the MySQL server, byrunning `/usr/local/mysql/bin/mysql&#8217; on the command line</p>
<p>3. Next for managing your database with a GUI </p>
<p>a. Go ahead and download phpMyAdmin from</p>
<p>http://www.phpmyadmin.net/home_page/downloads.php</p>
<p>b. I extracted the folder inside my local folder.</p>
<p>c. Read the documentation for ways on how to setup authentication for phpMyAdmin either by cookie or config.<br />

<!-- Begin Google Adsense code -->
<div class="googleads">
<script type="text/javascript"><!--
google_ad_client = "pub-4515932012590505";
/* 200x200, created 10/29/08 */
google_ad_slot = "3929428513";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<!-- End Google Adsense code -->
<br />
d. One thing to note is the configuration for the mysql socket.</p>
<p>$cfg['Servers'][$i]['socket'] = &#8221;;</p>
<p>e. To find out where it is located type the command &#8216;status&#8217; on the Terminal when logged in to Mysql.</p>
<blockquote><p>Connection id:		36</p>
<p>Current database:</p>
<p>Current user:		pauloorquillo@localhost</p>
<p>SSL:			Not in use</p>
<p>Current pager:		stdout</p>
<p>Using outfile:		&#8221;</p>
<p>Using delimiter:	;</p>
<p>Server version:		5.1.56 MySQL Community Server (GPL)</p>
<p>Protocol version:	10</p>
<p>Connection:		Localhost via UNIX socket</p>
<p>Server characterset:	latin1</p>
<p>Db     characterset:	latin1</p>
<p>Client characterset:	latin1</p>
<p>Conn.  characterset:	latin1</p>
<p>UNIX socket:		/tmp/mysql.sock</p>
<p>Uptime:			7 days 2 hours 30 min 9 sec</p></blockquote>
<p>f. You should see something like above note the UNIX socket and edit your phpmyadmin config file</p>
<p>$cfg['Servers'][$i]['socket'] = &#8216;/tmp/mysql.sock&#8217;;</p>
<p>That should be it you should be up and running. Happy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lopau.com/how-to-setup-php-mysql-and-phpmyadmin-on-mac-os-x-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#1045 &#8211; Access denied for user &#8216;root&#8217;@&#039;localhost&#8217; (using password: NO)</title>
		<link>http://blog.lopau.com/1045-access-denied-for-user-rootlocalhost-using-password-no/</link>
		<comments>http://blog.lopau.com/1045-access-denied-for-user-rootlocalhost-using-password-no/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 03:54:09 +0000</pubDate>
		<dc:creator>lopau</dc:creator>
				<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://blog.lopau.com/?p=555</guid>
		<description><![CDATA[Been using WAMP for several months now and once in awhile MySQL breaks. Somehow the user tables gets corrupted. To fix the problem instead of reinstalling the whole WAMP. Just replace the corrupted files. These 3 files are always corrupted. user.MYI user.MYD user.frm Download this mysqlusertables. Unzip the file, copy the 3 files inside. Go [...]]]></description>
			<content:encoded><![CDATA[<p>Been using WAMP for several months now and once in awhile MySQL breaks. Somehow the user tables gets corrupted. To fix the problem instead of reinstalling the whole WAMP. Just replace the corrupted files. These 3 files are always corrupted.</p>
<ul>
<ol>
user.MYI</ol>
<ol>
user.MYD
</ol>
<ol>user.frm</ol>
</ul>
<p>Download this <a href='http://blog.lopau.com/wp-content/uploads/2009/06/mysqlusertables.zip'>mysqlusertables</a>. Unzip the file, copy the 3 files inside.</p>
<p>Go into your C:\wamp\bin\mysql\mysql5.x.xx\data\mysql directory and paste, click yes to overwrite.</p>
<p>Restart All Service on your WAMP. Then you are good to go.</p>
<p>I&#8217;ll keep you posted soon on why these tables easily gets corrupted. </p>
<p>*Update*</p>
<p>Digging deeper to the culprit I found out the tables for users in the mysql db has warnings, meaning they are corrupt. So to avoid doing the steps above while your MySQL and phpMyAdmin is still working. Go to phpMyAdmin, access mysql db, then select users table then click on operations then under &#8220;Table maintenance&#8221; click on Repair Table. Viola!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lopau.com/1045-access-denied-for-user-rootlocalhost-using-password-no/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Renaming Tables feature in phpMyAdmin</title>
		<link>http://blog.lopau.com/no-renaming-tables-feature-in-phpmyadmin/</link>
		<comments>http://blog.lopau.com/no-renaming-tables-feature-in-phpmyadmin/#comments</comments>
		<pubDate>Wed, 27 May 2009 06:03:47 +0000</pubDate>
		<dc:creator>lopau</dc:creator>
				<category><![CDATA[WAMP]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://blog.lopau.com/?p=550</guid>
		<description><![CDATA[Quick tip. The feature is not (yet) supported in phpMyAdmin but you can easily make the change by simply issuing this sql statement. RENAME TABLE old_table TO new_table Update On phpMyAdmin select a table then go to Operations, Under Table Options you would see Rename Table to feature.]]></description>
			<content:encoded><![CDATA[<p>Quick tip. The feature is not (yet) supported in phpMyAdmin but you can easily make the change by simply issuing this sql statement.</p>
<blockquote><p>
RENAME TABLE old_table TO new_table
</p></blockquote>
<p><strong>Update</strong> On phpMyAdmin select a table then go to Operations, Under Table Options you would see Rename Table to feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lopau.com/no-renaming-tables-feature-in-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Import sql dump using the MySQL client</title>
		<link>http://blog.lopau.com/import-sql-dump-using-the-mysql-client/</link>
		<comments>http://blog.lopau.com/import-sql-dump-using-the-mysql-client/#comments</comments>
		<pubDate>Thu, 07 May 2009 15:38:25 +0000</pubDate>
		<dc:creator>lopau</dc:creator>
				<category><![CDATA[WAMP]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.lopau.com/?p=544</guid>
		<description><![CDATA[This is useful if you don&#8217;t have access to phpmyadmin on your server but have access to ssh and ftp. Or you have a huge sql dump like 10MB or higher that you cannot import directly on phpmyadmin. In my case the phpmyadmin directory was password protected by Apache and I don&#8217;t have the right [...]]]></description>
			<content:encoded><![CDATA[<p>This is useful if you don&#8217;t have access to phpmyadmin on your server but have access to ssh and ftp. Or you have a huge sql dump like 10MB or higher that you cannot import directly on phpmyadmin. In my case the phpmyadmin directory was password protected by Apache and I don&#8217;t have the right password.</p>
<p>First upload the .sql file on your server using an FTP client and remember the path. </p>
<p>eg.<br />
For Linux<br />
/home/lopau/mydump.sql</p>
<p>for Windows<br />
C:/wamp/www/lopau/mydump.sql</p>
<p>Login to your server using an SSH client like Putty.</p>
<p>On the command line access MySQL<br />
$> mysql -u username -p password </p>
<p>replace username and password with yours.</p>
<p>On the MySQL client command line access and use your database.<br />
$>  use lopaudb;</p>
<p>Now to import your dump;<br />
$> source /home/lopau/mydump.sql;</p>
<p>If successful you should see<br />
Query OK, 13 rows affected (0.00 sec)</p>
<p>That easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lopau.com/import-sql-dump-using-the-mysql-client/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

