Symfony with php 5.0.1 bug - no “interface_exists()” function

March 2, 2008 – 2:00 pm

I came accross a bug in Symfony today when I installed a copy on our php 5.0.1 development server.

Turns out, php 5.0.1. doesn’t yet have the function “interface_exists()”, which was added in 5.0.2. Minor issue, but it IS being called as part of the Symfony bootstrapping procedure, so it crashes.

Luckily, in 5.0.1 the “class_exists()” method returns the same result, so putting the following lines into the app config.php file (or even into the symfony constants.php) should fix it:

if( !function_exists( 'interface_exists' ) ) {
function interface_exists( $name ) {
return class_exists( $name );
}
}

I say “should,” because in actuality this didn’t fix my problem (but it SHOULD, shouldn’t it? ;) ). So I tried simply returning false, and, well.. it works..

Let me know if you know why that is. For now I’m happy it works, and come next php version, I won’t have to worry about it..

Hope that helps someone out there who has the same problem.


Filed under: Symfony — by Richtermeister

2 Comments »


  1. CheapTabletsOnline.Com. Canadian Health&Care.Best quality drugs.Special Internet Prices.No prescription online pharmacy. No prescription pills. Order drugs online

    Buy:Human Growth Hormone.Arimidex.Zovirax.Prevacid.Accutane.Valtrex.Petcam (Metacam) Oral Suspension.Mega Hoodia.Synthroid.Prednisolone.Lumigan.100% Pure Okinawan Coral Calcium.Nexium.Zyban.Actos.Retin-A….

    Trackback by ANDREW — September 7, 2010 @ 12:01 pm


  2. NEW FASHION store. Original designers collection at low prices!!! 20 % TO 70 % OFF. END OF SEASON SALE!!!

    BUY FASHION. TOP BRANDS: GUCCI, DOLCE&GABBANA, BURBERRY, DIESEL, ICEBERG, ROBERTO CAVALLI, EMPORIO ARMANI, VERSACE…

    Trackback by EDWARD — November 10, 2010 @ 10:18 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress