Skip to main content

Posts

Showing posts from October, 2008

Unable to load dynamic library php_curl.dll: Error message in PHP

In Windows, while trying to use "curl" extension with PHP 5.2/Apache 2; you may encounter a blank page. If you open up the error log file in Apache (%APACHE_HOME%\logs\error.log); you may see an error message as follows.
PHP Warning: PHP Startup: Unable to load dynamic library '%PHP_HOME\\ext\\php_curl.dll' - The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail.
This error message can be caused due to some version conflicts on a set of DLLs that are already available inside %windows%\system32 directory.

First check the %windows%\system32 directory to see whether the following DLL files are already available.
libeay32.dllssleay32.dll If those are available, then you would be able to resolve the issue as follows. (However if they are not available, you would need to find some alternative solution).

Now you must first rename the above two DLL files. We did as follows by adding an…

Manage HTTP headers with Java Servlets: Quick Notes

In Java Servlets API, both HttpServletRequest and HttpServletResponse interfaces (in javax.servlet.http package) provide methods to programatically manipulate HTTP headers. There are a number of standard HTTP headers exchanged between a web server and a client (eg: a browser). "Content-Type" is a commonly used header (which is used to specify MIME type) in Servlets. In this article we are discussing how headers are read/written with Servlet classes.
Reading Headers A servlet can read HTTP headers sent by a client request using HttpServletRequest interface. This interface has two methods for this.
String getHeader(String headerName); int getintHeader(String headerName);
Both these methods are similar except getIntHeader() method is used to return value of headers with int type values. Below code shows how value of "Content-type" header is read from the user request. (HttpServlet.doGet() method is used in the example).
import javax.servlet.http.*; import java.io.*…

Google redirect to incorrect country domain: Fix on Firefox

Google servers identify the country of the googler and redirect to the relevant country domain. They may be using the IP of the request to locate the country before the redirect. However there are situations many googler getting redirected to incorrect country domains. For example, even though our requests are generating from Sri Lanka, most of the time we are redirected to another country (Taiwan) domain. Some misconfigurations at the routers or at the ISP may cause this issue, which makes it harder for a general browser user to get that resolved. This automatic redirect mechanism does not depend on the browser used.

Following is a quick fix to this issue. However this will only work on Firefox browser, sorry friends if you are on another browser.
Install Redirector extension Redirector is a small extension available for Firefox, and it supports most of the versions ranging from 2.0 to 3.0.*. (we are using latest Firefox; 3.0.3). You can freely install it from here.
If you are a …
Creative Commons License Digizol by Kamal Mettananda is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License .
URL of this page must be supplied in attribution
© 2004-2017