Welcome to weblogs.com.pk Sign in | Join | Help

It works here on my computer

Disclaimer: I am not expert on Crystal Reports or PHP, correct me if I am wrong anywhere.


I see commonly attitude of “It works here on my computer”. Many developers/programmers don’t consider limitations when their developed applications are deployed. And when the deployed application don’t work; they say what I just have mentioned.




Once I was approached by my system administrator to help him in resolving/debugging problem for the client whose application has similar problem. The developer of the application had assumed certain things as per his development machine and wrote the code accordingly. And when the application was deployed; it was not working.


The problem is; that developers usually use Apache’s or IIS document root folder to develop the application; and the following code may not work in the production server, especially if it’s a virtual host.



$urls = file(“zoom_pages.zdat");


They can use something like this to resolve this;



$urls = file($_SERVER['DOCUMENT_ROOT'] . "/zoom_pages.zdat");


Crystal Reports


Few days back I was again contacted with similar problem; this time it was with Crystal Reports. Developer was using Crystal Reports (RPT) and its viewer (the control shipped with Visual Studio). The report was not connecting to the database server.


I think; RPT file store the database settings, as well as the physical path of the RPT file having layout detail as per developer machine configuration. And if you try to use it as is it may not work. Here is the virtual hosting friendly code to use crystal report.



The point I am trying to make is; that the developers should think how their thing will/might work in actual environment; and they should stop saying “It works here on my computer”

Published Thursday, August 25, 2005 7:24 PM by khurram
Filed under: ,


No Comments

New Comments to this post are disabled