Tag Archives: projects

How to Debug PHP Applications with NetBeans IDE and Xdebug on Windows?

NetBeans logo After having tried many IDEs for PHP development, including Eclipse and Komodo Edit, I have found myself the most comfortable and productive with the excellent NetBeans IDE.

You can start building PHP applications with NetBeans right out-of-the-box by simply downloading NetBeans for PHP (version 6.8 is the latest as of this post). Debugging with it requires an additional download of Xdebug.

Here is a quick and step-by-step guide to quickly start developing and debugging your PHP application projects with NetBeans + Xdebug:

1. Download and install NetBeans IDE for PHP.

2. Download Xdebug (it’s a small DLL library file).

Advice: Among the plethora of download links available on that page, let me tell you that you generally wouldn’t want the ‘non-thread-safe’ version, so ignore that; go for the latest non-beta version. I downloaded 5.2 VC6 (32 bit) of Xdebug 2.0.5.

3. Next you need to make changes to php.ini found in apache\\bin folder (the location of your apache folder may vary depending on your installation, look for it).

Find “[Zend]” section in your php.ini file, which should look like the following:


 

Xdebug is not compatible with Zend Optimizer, so comment out lines 2 to 5 (by prefixing the line with a semi-colon), and add the following lines under [Zend] section heading:


 

Note: Remember to change the path and filename to match your Xdebug path and version.

4. Restart Apache (if using XAMPP: Open the XAMPP Control Panel and first stop, then start Apache).

5. To verify if Xdebug is configured properly for debugging, create a php file containing this one line:


Save it in your htdocs folder [phpinfo.php], and open it in your browser [http://localhost/phpinfo.php]. If Xdebug is loaded successfully, you should see something like this:

Xdebug info with phpinfo()

That is it! Now you are ready to debug your applications with Xdebug using NetBeans IDE. Simply open your PHP project in NetBeans and press Ctrl + F5 or click Debug project button in NetBeans in the toolbar.

A detailed guide on configuring Xdebug with NetBeans can be found on this wiki: http://wiki.netbeans.org/HowToConfigureXDebug.

Happy coding! 🙂

My experience with a local web startup yellO

yellO

It’s been some time since I blogged. I am running so short of time nowadays. Friends feel ignored; my projects are pending; almost no time for socializing. The main reason of my busyness is a project called yellO that I have been part of since March ‘08 (full-time since August ‘08). This unique and one-of-its-kind portal (and magazine) of local services in Pakistan is finally ready for show time!

It’s something big!

We have been working on yellO for almost an year now. It’s been an exhilarating experience for me to be part of the development, design and strategy formation processes of one of the most authentic and superb piece of web application/portal to surface from this part of the world.

We had tough days. We had boring days. We had frustrating days. We had days on which we almost thought to give up on it since we were too bored working on the same thing everyday for so many months! But now that yellO’s development is complete (for launch) and it’s all ready to go live, I am really satisfied with the outcome. And quite excited too!

The Visionary

I remember that I was a bit reluctant when Samir – the visionary behind yellO – had asked me to join team yellO. I had other offers too at that time and they were offering better package than what I was being offered for yellO. But in the end, it was Samir’s passion and fervor, and his desire to bring positive change in the world – the same ideals that I myself follow – that sealed my decision in favor of yellO.

The Team

The most important component in realizing a vision is the team that is responsible for turning an idea into reality. And the team assembled for yellO had all the characteristics of a winning team!

Adeel, the lead developer, and Saad, the lead designer, have both remained an indispensable asset for yellO. Zulfiqar has been an amazing artist and (print) designer. Aamir has been great at handling graphics and publishing stuff. Mudassir is new but he’s learning to walk the tight rope of the Linux administration world well. Young Shahrukh is intelligent and full of curiosity, and he is a great asset for the community building part of yellO. In the past, Ali Raza, Asim, Waleed and Faraz have worked for some time on yellO before parting in search of other opportunities.

As for me myself, I have been responsible for handling all the stakeholders, mentioned above; making sure that we followed the timelines and that everyone was working in congruency. Also, I tend to the strategic aspect of yellO as, officially, I am the Strategy Director for yellO.

All in all it has been a great fun and an exciting experience building a major venture like yellO.

Join yellO today and start adding and reviewing interesting places on the map.