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.
The combination of Relational Data (database) and Object Oriented Programming (OOP) is not a match made in heaven. The way we work with objects is totally different than the way we access Data. The problem is that in most projects you need to access data and write Object Oriented Classes to display and manipulate that data.
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.
Sometimes you want your client to see a different page then the default 404 (page not found)
To do this you just need to add and entry to .htaccess file on your web folder:
ErrorDocument 404 /404err.php
404err.php is an example of the PHP page you want the Apache to serve instead of the apache default.
In my last post I provided an example of PHP calling a .NET windows communication foundation web service. The PHP invoked the .NET service with no parameters, getting the time on server.
Sometime (well, most of the times) you need to pass parameters to the .NET web service. for example you might want to pass a client ID and get back its account balance.
Here is what you do:
Language syntax’s, performance, PHP, Ruby, Java and who’s better? Ahhhh! –
I was reading on The Server Side and came across this post:
which is part of this overall discussion:
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 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’."
WCF is running a new version of web services than expected by the PHP.
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.
Release 1.1 adds a fully functional JAVA server-side implementation to the pre-existing PHP server-side implementation. Now, Ajaxdo, AJAX
persistent Data Objects, enables applications can work in a JSP/JDBC environment and port easily from PHP to JAVA and vise-versa.
Code, examples and documentation can be found here.