Tag: PHP
All the articles with the tag "PHP".
-
PHP WSDL generator
Everyone who has ever created a webservice in PHP, using the PHP5 native functions, NuSOAP, PEAR, ..., certainly has cursed a lot while creating WSDL files for those services. Today, I found a nice helper class, Webservice Helper, which does a lot of tricks for you. Webservice helper creates the WSDL file for your service, and for related classes. Also, a basic authentication system is included. One necessary thing in your code is PHPdoc-style documentation. Webservice helper travels that documentation and uses reflection to generate class mappings. But normally, one should always document code.
-
Use Zend Framework on IIS
A while ago, I was experimenting with the Zend Framework. At first, I tried running a small sample on top of IIS, but unfortunately, that did not work... On Apache, it worked like a charm. Very nice, but what do you do when your site runs on an IIS machine? I started experimenting. First of all, I found out that Zend Framework also accepts URL's like http://localhost/index.php/controller/action/ as well as http://localhost/controller/action/. The first one is really handy! The only thing you have to do is to feed index.php the right query string and you're up and running. Changing all your URL's from /x/y to index.php/x/y should do the trick. But this does not look pretty in my browser. I don't want the index.php in between!
-
PHP on IIS7 (RC1), but unsafe!
Earlier this week, BillS has posted some information on how to run PHP on the upcoming IIS 7. To be honest, it's quite similar to installing it onto IIS 6 but with a few steps less. But I have a warning to add... PHP is added as an ISAPI extension, which binds to the multi-threaded IIS worker process. Unfortunately, not all PHP extensions are thread-safe... Registering the PHP as a CGI is better, but decreases performance. Use FastCGI! This technique can also be used on some Apache installations, but I still prefer IIS to do the job because it can run both PHP and ASP.NET. FastCGI recycles PHP processes and even persistent database connections! (mysql_pconnect etc.) Optionally, you can follow these steps for other extensions if you want PHP to execute on for example .php3 files.
-
Buying books...
Seems like Proxis is offering a 10% discount when you order 2 computer books before the end of september! And I saw 2 nice PHP books… “Php5 Objects, Patterns, Practice” and “Php 5 Power Programming”. Anyone knows if I should give them a try? If you have other great titles on topics like PHP, C# and ASP.NET, please comment this post with title and ISBN number
-
Simple SAX parser for PHP
Yesterday, I was working on PRAjax. The UpdatePanel did not work completely as I wanted it to work: in the background, the whole page was still fetched and updated. A cleaner way would be to just fetch updated content and not the whole page. In my search for a PHP HTML parsing class, I found a lot of libraries, but all with disadvantages: one was too big in file size, another only parsed XHTML, ... Luckily, I stumbled on SAX parser! So if you ever want to parse HTML and read out specific tags and attributes, try this one.
-
Phalanger
Today, I noticed that Phalanger has released a new beta a few days ago (well OK, half a month ago [*-)]). Phalanger is an open-source project, aiming to provide tools to integrate PHP development in Visual Studio on one side, and aiming to provide a CLR compiler for PHP on the other side. In short, this means that Phalanger compiles PHP code to MSIL (Microsoft Intermediate Language) and thus can run PHP on the .NET Framework. I guess that would mean a huge PHP speed improvement! Also, Phalanger provides access to native .NET namespaces, which can be used within PHP scripts. Nice! Imagine ASP.NET webcontrols and PHP code... For me, it sounds like a nice dream [Y]. I guess I'll have to check that all out. It's placed on my to-do list, which seems to always get filled more and more...