garykoz Posted November 10, 2008 Share Posted November 10, 2008 My provider currently only supports PHP4. I have downloaded several scripts from "http://www.phpclasses.org". Most of them don't seem to work. The example script runs without an error but doesn't produce any results. I have nulled out the reference to the class file and then the example runs without producing any results. I have cut and pasted the class file into the example and it doesn't produce any results or errors. Does any one have any suggestions? Thanks in advance... Quote Link to comment https://forums.phpfreaks.com/topic/132153-php4-and-the-use-of-classes/ Share on other sites More sharing options...
Daniel0 Posted November 10, 2008 Share Posted November 10, 2008 My suggestion is to switch provider (I suppose you mean web host?). If they haven't updated to PHP 5.2+ by now then they're not worth dealing with in my opinion. The difference between PHP4's and PHP5's object model is vastly different and it'll likely be really difficult if not impossible to downgrade your scripts. Quote Link to comment https://forums.phpfreaks.com/topic/132153-php4-and-the-use-of-classes/#findComment-686801 Share on other sites More sharing options...
garykoz Posted November 10, 2008 Author Share Posted November 10, 2008 But what about PHP scripts that are supposed to run under PHP4 and don't? Quote Link to comment https://forums.phpfreaks.com/topic/132153-php4-and-the-use-of-classes/#findComment-686921 Share on other sites More sharing options...
Daniel0 Posted November 10, 2008 Share Posted November 10, 2008 There can be lots of reasons for that. Make sure you set error_reporting to E_ALL and display_errors to On to check that. Quote Link to comment https://forums.phpfreaks.com/topic/132153-php4-and-the-use-of-classes/#findComment-686924 Share on other sites More sharing options...
garykoz Posted November 10, 2008 Author Share Posted November 10, 2008 I'm new to PHP. How do I make sure those are set properly. Quote Link to comment https://forums.phpfreaks.com/topic/132153-php4-and-the-use-of-classes/#findComment-687092 Share on other sites More sharing options...
wildteen88 Posted November 10, 2008 Share Posted November 10, 2008 phpinfo Quote Link to comment https://forums.phpfreaks.com/topic/132153-php4-and-the-use-of-classes/#findComment-687139 Share on other sites More sharing options...
garykoz Posted November 10, 2008 Author Share Posted November 10, 2008 Here is what I got from phpinfo() Local Master Value Value error_reporting 2039 2039 display_errors Off Off Is 2039 the same as E_ALL? How do I go about changing them? Quote Link to comment https://forums.phpfreaks.com/topic/132153-php4-and-the-use-of-classes/#findComment-687184 Share on other sites More sharing options...
Daniel0 Posted November 10, 2008 Share Posted November 10, 2008 No, you can check it in your php.ini file what it's set to and you can change it there (you'll have to restart the webserver when you've done that). Alternatively you can add these lines to the top of the script you want to change it in: error_reporting(E_ALL); ini_set('display_errors', true); Quote Link to comment https://forums.phpfreaks.com/topic/132153-php4-and-the-use-of-classes/#findComment-687197 Share on other sites More sharing options...
garykoz Posted November 10, 2008 Author Share Posted November 10, 2008 Adding: error_reporting(E_ALL); ini_set('display_errors', true); helped a lot. Now I can continue trying to make them work now that I know where they are failing. Thanks for all the help. Quote Link to comment https://forums.phpfreaks.com/topic/132153-php4-and-the-use-of-classes/#findComment-687266 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.