Posts Tagged PHP

Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found.

Couple of days back I got a complaint from one of the client who recently changed their deployment for one of the Portal we have been developing and the complaint was "Portal does not work in Internet Explorer." The same old great song.

I looked at the error, users were unable to download files from Portal over secure-HTTP (HTTPS). I tried it couple of times and found that it's not working really. Error was consistent from IE6 to IE8.

We have to fix this and to begin with I just googled-up with the error message I was getting. "Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later." Thankfully I got decent amount of Google search results and in first 2 or 3 I found a post from Mark Kolich sharing his similar experience with Internet Explorer and digging in more about that bug.

You can read more about this on Mark's post here on his website. But simple enough it was just a one line fix for the PHP guys. Yes, we have to add following line to get rid of the error message.

header("Pragma: ");

Simply just remove the Pragma headers from your force-download code and you're done.

Tags: , , ,

Smarty 3.0 is almost here..!

Smarty PHP Template Engine

Smarty PHP Template Engine

There could be some or lot of us in PHP World who might have not heard about Smarty..! Yes, Smarty is the PHP Template Engine since ages. Why Ages......? some of you might ask.. but it is there since long... really long, even before we started hearing about these PHP Frameworks.

I have been using Smarty in some of my projects and as part of my daily usage component I have been following up on the Smarty Website. If you are like me you might have noticed that it has been more than one year (8 beta and 3 rc releases) that Smarty 3.0 is almost there and still there is no final release.

May be it's indication or beginning of the announcement of death of Only Template Engine PHP Frameworks or something else. Somehow community does not seems to be active or founders or whatever. Now a days many MVC frameworks are choice of developers and they either have in-built template-engine or no-template-engine or plug-in-support for template engines.

No matter what Smarty 3.0 claims to be loaded with following features: Read the rest of this entry »

Tags: ,

NetBeans 6.8 is out

NetBeans 6.8

NetBeans 6.8

NetBeans 6.8 is released last week on December 10, 2009 and it is on the door with many new exciting features. I am developing Web Applications with PHP, XML, Javascript, HTML and it has been great experience using NetBeans. Other than NetBeans I am using Eclipse for some of the projects and NotePad++ and EditPlus are handy for some quick-fixes where you don't need to open up or create a new Project.

EditPlus was my first Editor when I started my career and after that Eclipse PDT and later NetBeans has taken their place. For majority of projects I am using NetBeans while for some specific projects where goodness of some great Eclipse Plug-in drags me towards it. For anything quick I have always EditPlus on hand, which is really handy if you want to see some formatted code on your Windows Servers. The beauty of EditPlus is it's very light-weight (only 1.3MB) and damn fast. Though it is not Free you can use it for evaluation period as long as you wish if you can click "I Agree" at start-up.

One of my most most favorite feature of NetBeans is Quick File Search through File/Project Navigator Pane. It is the most beautiful feature..it's so coool one can't live without it once we get used to it. You don't need to type through live Windows file-listing, it just opens up tiny search control just as you start typing and it stays with character you input even after you pause for few seconds. I think this feature should be there in every IDE.
Read the rest of this entry »

Tags: , , ,

Using Zimbra LDAP Server Authentication with PHP

I wanted to provide our CRM users an alternate way of logging to the system using their Zimbra email authentication and there is a really easy way of doing it which I have figured out in little while with googling. Definitely PHP online help docs and Zimbra forums both came to help and found a correct options to use from Zimbra Forums which is powered by it's USERS.

Just make sure to enable php_ldap extension before you move further.

// Uncomment following line from php.ini
extension=php_ldap.dll

Following code snippet could be used to authenticate and find out whether provided Username and Password belongs to valid Zimbra User or not by authenticating it with Zimbra's LDAP (Light-weight Directory Access Protocol) server. So this way if you want you can provide your intranet/business application users an ability to use their Zimbra (mail/collaboration system) password to be used as an optional way to authenticate themselves. Read the rest of this entry »

Tags: , ,

When PHP Frameworks are going to stop PHP 4 support?

As of now we have many frameworks which are still supporting PHP 4.x. CakePHP and CodeIgniter are leading that troop. Now we have PHP 6 about to get ready for production and PHP 5.x is in it's mature stage since long while now with PHP 5.3 as the latest release. I am not against for support on 4.x version of PHP; may great developers/teams have developed awasom tools and application and they should be still usable without any modifications in their coding.

PHP 4.x Hosting:

So PHP 4.x support for hosting is fine and it's required to keep those applications running and being hosted without any maintenance saving efforts and time. So applications developed for PHP 4.x can run as long as they wish and till there are no equivalent forks of them available in PHP 5.x or newer version.

PHP 4.x for Development:

PHP 4.4.9 has been released as final release for PHP 4.x now and it has been announced as end of life for PHP 4.x now. So developing any project or framework by keeping PHP 4.x compatibility is not a good idea I believe. All projects or framework has to freeze their PHP 4.x versions and let only bug-fixes be made available for those versions and have new feature-set addition be on the fork which is only PHP 5.x. I think every project will have to come up with a date when they will join GoPHP5 rally. For example Symfony 1.2 and 1.3 (Symfony is a PHP 5 only MVC Framework) are specifically supporting PHP 5.2.4 or newer version only.

Basically for newer development it is better idea to use version which has longer future so that finally they don't need to write a fixes which allow those projects to continue working in both the environment. Which will save time on development, QA and maintanence all phases.

I am not against the PHP 4.x but it is a change which is eneviable and which has to happen in it's completeness sometime and change is for good. I am not sure how many of you agree with my thoughts but please share your thoughts on this subjects as comments for this post.

Tags: ,

PHP Text Encoding – Challenge..!

Before sometime I had a project where I am required to create a message digest to authenticate web-service call. Initially it looked simple but while trying on staging server it never authenticated properly. Basically it was a Surescripts web-service implementation where we have to strictly follow their protocols. Read the rest of this entry »

Tags: , ,

PHP 5.2.7 is released

This is good to hear that PHP 5.2.7 is released last week. PHP 5.3 alpha 3 is released as well at the same time. Actually this release has taken more than 6 months after it's last stable release of 5.2.6 version. But it's better later than never. I have come across some blogs archives indicating dull future of PHP in coming year, but this slow and steady progress confirms that PHP elephant is here to stay, and there are many other blogs out there which indicates that too.

This release is majorly bug-fix release consisting more than 100 fixes; you can see change log here.

Anyway I believe in this world where IT is mandatory to run your business and to hold the backbon; everyone wants it cheap and LAMP does that well..!

BTW Wampserver team is damn fast in building their packages and this time they came out with PHP 5.2.7 + Apache 2.2.10 + MySQL 5.1.30 just next day of PHP 5.2.7's release. So enthusiastic developers can get their hands on with latest of all 3 of them. Download Wampserver 2.0e here.

Tags:

Paying the bills.!