Probing the oop capabilities of PHP

Hi kyberfabrickken, Kalon, TomB & Vali
Your replies were spot-on!

kyberfabrickken, I have followed the links through the PHP manual given and written what I guess is belt & braces by adding
<?php
echo ini_get(‘display_errors’);
?>
to the top of my product_test file (+ the closing tag (this must have been inadvertantly deleted when I was commenting-out & and removing slashes in a bid to find out what was wrong)
I also edited the line in my ini file “display_errors = “stderr””. “display_errors = On” & “error_reporting = E_ALL & ~E_NOTICE” were on by default.
The browser showed a blank screen until I removed the slashes on the echo statement returning the 500 error.

Kalon, I copied and pasted your “getProductType()” codeline to my file and it now works as expected.

Vali, I have PHP 5.3 downloaded but the installation file still talks about a file “php5ts.dll” which I cannot find in the unzip PHP folder, a file “php5.dll” was found but whether it can be treated as an alternative I dont know!

Many thanks to all who answered my post.

Hi, and welcome to Sitepoint.

500 is a generic error from the webserver, which means “something went terribly wrong”. In this case, php encountered a fatal error. You can turn on error messages in the browser. I would recommend that you use this for your development site, as it makes it much easier to see what is wrong, in cases like this. In your php.ini file, make sure that display_errors is turned on.

What you’ll find, is that there is a syntax error in your page. That’s because you forgot to close the <?php tag with a ?>, before going on to print the </body> tag.

Use the bb-code markup next time - makes it much easier to read your post. Incidentally, it also shows where your problem is.