Category: PHP

Apache Crashes on Windows – Check Your Ports 1

Apache Crashes on Windows – Check Your Ports

Apache is one of the most popular web servers in the market today. It usually runs on Linux-based machines but lately there are more and more deployments, for development as well as other reasons, of Apache on Windows. Nowadays, running Apache web server on Windows is very common for PHP developers. Many developers develop their PHP application on their home windows or Mac and deploy to a remote Linux server.

Generate and Format Last Updated in PHP 0

Generate and Format Last Updated in PHP

As a reader of many on line product reviews, I am always interested in the time this review is relevant for. As time pass things change and review get stale.

If you have this need as a webmaster and your review is file based (as appose to DB) you can use the filemtime function to automatically generate the last updated:


$LAST_UPDATED = date ("F d Y", filemtime('review.php'));

Where review.php is the file that holds the product review for example.

PHP calling .NET – Running WCF service with basicHttpBinding 2

PHP calling .NET – Running WCF service with basicHttpBinding

I am Writing a PHP application that needs to run a back end .NET application. When creating a running the WCF web service out of the box, the PHP could not connect to the web service.

The problem:

The PHP returns "Caught exception: Cannot process the message because the content type ‘text/xml; charset=utf-8’ was not the expected type ‘application/soap+xml; charset=utf-8’."

 

The reason:

WCF is running a new version of web services than expected by the PHP.

 

The solution:

Change the binding type of the WCF service from binding="wsHttpBinding" to binding="basicHttpBinding".

This insures that your .NET web service would support clients and other services that conform to the WS-I standards.