Archive for the ‘Windows’ Category

Monday, March 29th, 2010

If you’re like me, using EasyPHP on Windows 7 for local development and have encountered this PHP/MySQL error:

Warning: mysql_connect() [function.mysql-connect]: [2002]
A connection attempt failed because the connected party did
not (trying to connect via tcp://localhost:3306) in
C:\Path\To\Script.php on line 26

Warning: mysql_connect() [function.mysql-connect]: A connection
attempt failed because the connected party did not properly
respond after a period of time, or established connection failed
because connected host has failed to respond. in
C:\Path\To\Script.php on line 26

Fatal error: Maximum execution time of 30 seconds exceeded in
C:\Path\To\Script.php on line 26

..then you’re in luck! Here’s a quick easy fix:

  1. Go to “C:\Windows\System32\drivers\etc“.
  2. Open “hosts” with Notepad program.
  3. Uncomment this line: “127.0.0.1 localhost” or add it if it’s not on the host entry.

That’s it! Save the changes you’ve made and refresh your browser.

Hope this helps!

* NOTE - Make sure you have a full access on “hosts” file.

  1. Right click on “hosts” file then click “Properties“.
  2. On “Security” tab click “Edit…” button.
  3. Select the user that you are currently using.
  4. Under “Permissions for Users” box, tick “Full control” on “Allow” column.
  5. And then click “OK” button to apply the changes.
Sunday, September 20th, 2009

EasyPHP on Windows 7

EasyPHP on Windows 7


Apache

I am accustomed in using EasyPHP on a Windows platform. Installation, running, and configuring it is always a breeze (on Windows XP that is). Recently I’ve installed Windows 7 RTM on my MSI notebook and installed EasyPHP 5.3.0, though the Installation goes flawlessly but then when I launch the stack software, Apache wouldn’t start.

I turned off the firewall but no luck. So I did a search on google, again no luck with Windows 7 specific solution but I found one for Windows Vista. I tried it anyway, then BAM! It worked! I finally got Apache to start, tried opening the local default web and it worked perfectly. Here’s the error message and how to fix it:

Apache cannot be runned: another Web server use the Web port
or port is blocked by firewall.
  1. Click the EasyPHP icon beside “Apache” button.
  2. Click “Configure” then click “EasyPHP“.
  3. Uncheck “Check server’s TCP port before starting” then click “Apply” button and then “Close” button.
  4. Click “Apache” button and then click “Start“.

That would fix the “Apache cannot be runned…” problem.

MySQL

Got the Apache server to work but after I closed EasyPHP and run it again, I’m hit with another error message:

Unexpected end of MySql... See log file?

Now it’s from MySQL. After a few head scratching and inspection. And then it hit me! I figure that must be a permission problem. So I changed my user’s permission for the EasyPHP directory and Viola! MySQL finally start. Solved the MySQL problem. Here’s what I did:

  1. Go to “Computer“, open/view Drive C, then double click “Program Files (x86)“.
  2. Right click on “EasyPHP5.3.0” folder then click “Properties“.
  3. On “Security” tab click “Edit…” button.
  4. Select the user that you are currently using.
  5. Under “Permissions for Users” box, tick “Full control” on “Allow” column.
  6. And then click “OK” button to apply the changes.

Now you’ll be able to start MySQL server by clicking “MySQL” button on EasyPHP dialog and then click “Start“.

Hope this helps!

Tuesday, May 5th, 2009

Microsoft has just opened its gate to public for its Windows 7 RC 1, earlier than everyone thought. The latest version of Windows 7, that is for testing purpose. Here are a few Windows 7 tidbit the you can expect on the latest version:

  • A few UI tweaks (look and feel) and additional functionality.
  • A media sharing options for Windows 7 called Remote Media Streaming.
  • Windows XP emulation. Need I say more?
  • Starter Edition for little lappie (netbooks).

Hurry and download it now! The RC version will be available at least through July 2009 with (almost) unlimited product keys. By the way the RC version will expire on June 1, 2010. Download and read the rest of the instructions from Microsoft’s official Windows 7 download and instruction page.

Enjoy!

Saturday, May 2nd, 2009

Microsoft Visual C# Express Edition

Microsoft Visual C# Express

For the past couple of days, I’ve been learning C# language. Thus far, I really enjoy learning C#. Actually after an hour of reading articles/posts and sample codes on the Internet, I was able to dive in and create a simple application. No, not that “Hello world” app, but a useful app for me.

Building Windows application was not new to me. 3 or 4 years ago I’ve built an enterprise application for a medical company using Visual Basic, version 6. I have a lot of fun building that application. Well, it’s an Inventory system, not an average inventory system but a real mind boggling system that will really turn your brain upside-down. What really makes it complicated is the integration of the company’s Business Model. We try to automate everything but within the Business Model there are a lot of complicated processes that will surely twist your brain. But anyway I’m trough with it, solved the problems, and release it just in time. What I am proud of is the result application, which is a very stable and efficient enterprise application. 3+ years running without a glitch, imagine that!

Anyway, I really like C# language. Coming from Visual Basic, C, and PHP, I haven’t had the hard time learning it. I you have the same programming background as I am; surely you’ll be able to learn the language in no time, especially if you’re into OOP paradigm. If you’re a Java developer then transition will be swift.

The first thing to remember before diving right in is in C# language “Everything is an object.” If you’re into OO then you’ll know what I mean.

Don’t worry how messy your codes will be. Just built it! Refactor later! The most important thing right now is for your app to work. Hey! Nobody gets it for the first time. Unless you’re me, right! Haha enjoy and happy programming with C#.

What’s the taste? Sweeeeettt!

Reminders and things to-do:

  1. Download Visual C# Express from Microsoft website. It’s FREE!
  2. Read a lot of samples and article/post on the Internet. Here’s a couple I’ve found (Though I haven’t read them, It might come useful to you.)
    1. Introduction to C#
    2. Learning C# by example
  3. Think of a useful project to do. Plan it and build it!
  4. While building your app, spent the time to refactor your code. You’ll be saving yourself from a lot of headaches when your app turns into a monster code-base.
  5. Always think OO!
  6. Continuously improve your processes.
Friday, February 20th, 2009

After reading an article from TechRepublic, entitled “10+ IT pros share the utilities and tools they can’t live without“. I told myself that I too should have one:

As a full-time web developer, part-time designer, and sometimes system administrator, here’s a list the tools, utilities and multimedia application packed in my box:

Linux

  • Development:
    • Eclipse + Aptana - PHP development platform.
    • Eclipse + PyDev - Excellent Python development platform.
    • Bluefish - A lightweight yet powerful IDE. I personaly use it for XHTML and CSS development.
    • SSH and SCP - Secure shell and secure copy. Securely access your remote server and safely copy file from server to your local and vice versa.
    • gFTP - Gnome’s File transfer client.

  • Utilities/Multimedia:
    • VirtualBox - An Open Source virtualization software. Here is where I stuffed my Windows OS and other Unix-like OS.
    • Evolution - Gnome’s mail client application.
    • Mozilla Sunbird - A full-featured and easy to use calendar application. Compatible with Apple’s iCal application. Keeps me on track and organized.
    • Banshee - Music and video player that supports Podcast, Last.fm, and can Sync with iPod, G1, or other devices.
    • Terminal Server Client - Much like “Remote Desktop Connection” for Windows but more manageable
    • Brasero - Disc-burning application.
    • MPlayer - Movie and music player that plays most video and audio format.

Windows

  • Development and Design:
    • Zend Studio - This IDE rocks!
    • Dreamweaver - One of the reason I cannot dump Windows completely.
    • Photoshop - This is where I do most of my web and print designs and another reason why I cannot dump Windows (yet).
    • WinSCP - Free FTP, SFTP, and SCP application.
    • Putty (SSH) - Free telnet and SSH client.

  • Utilities/Multimedia:

Now it’s your turn! Share what utilities and tools you have on your sleeves that you probably can’t live without.

Wednesday, January 28th, 2009

Windows 7 Beta (build 7000) running on OpenSUSE 11.1

Windows 7 Beta (build 7000) running on OpenSUSE 11.1

I’ve just finished installing Windows 7 Beta (build 7000) on VirtualBox with 512MB allocated memory. Way to go Microsoft! This is what Vista should have been!