justlukeyou Posted May 13, 2011 Share Posted May 13, 2011 Hi, I have changed the PHP on my site from PHP 4.4.9 to PHP 5.0 and now I have range of errors coming upon my site but I dont know why. Does anyone know why this, when something work in PHP 4.4.9 but not in PHP 5.0. The problem I have is that my host website is down for maintenance so I cant actually reverse if that is possible. Can anyone advise what this problem is based on? Quote Link to comment https://forums.phpfreaks.com/topic/236367-php-449-to-php-50/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 13, 2011 Share Posted May 13, 2011 There are very few incompatible changes between php4 and php5 (they are listed in the php.net documentation) and most of them are fairly obscure and most people's code won't be affected by them and will work as is under php5, assuming that you were using the current recommend php.ini settings. It is likely that your code was always producing most of the errors you are now seeing, but they were hidden due to the error_reporting/display_errors settings on your old server setup. You should find and fix the cause of each error message, because some of them are probably due to php.ini settings that are now off because the feature is scheduled to be removed from php in an upcoming version. If you want help with any particular error message, post the whole message and the relevant code. Quote Link to comment https://forums.phpfreaks.com/topic/236367-php-449-to-php-50/#findComment-1215231 Share on other sites More sharing options...
justlukeyou Posted May 13, 2011 Author Share Posted May 13, 2011 Brilliant, thanks mate. This is the error I have through my site. So hopefully it is just one error. Its do with the include. Is there away of using the include on PHP5 which is different to PHP 4.4.9 Warning: include() [function.include]: URL file-access is disabled in the server configuration in /homepages/1/d179449150/htdocs/domain/products/living-room-furniture.php on line 12 Warning: include(http://www.domain.co.uk/pagetopgroupproducts.php) [function.include]: failed to open stream: no suitable wrapper could be found in /homepages/1/d179449150/htdocs/domain/products/living-room-furniture.php on line 12 Warning: include() [function.include]: Failed opening 'http://www.domain.co.uk/pagetopgroupproducts.php' for inclusion (include_path='.:/usr/lib/php5') in /homepages/1/d179449150/htdocs/domain/products/living-room-furniture.php on line 12 Quote Link to comment https://forums.phpfreaks.com/topic/236367-php-449-to-php-50/#findComment-1215233 Share on other sites More sharing options...
trq Posted May 13, 2011 Share Posted May 13, 2011 Simple fix. Don't use urls as includes, use filesystem paths instead. Quote Link to comment https://forums.phpfreaks.com/topic/236367-php-449-to-php-50/#findComment-1215234 Share on other sites More sharing options...
justlukeyou Posted May 14, 2011 Author Share Posted May 14, 2011 Thanks mate, how do I do that? I have tried it before but go stuck. Do I remove "http://www.domain.com" and keep "/into/contactus.php" Quote Link to comment https://forums.phpfreaks.com/topic/236367-php-449-to-php-50/#findComment-1215237 Share on other sites More sharing options...
trq Posted May 14, 2011 Share Posted May 14, 2011 Depending on where the script is executing from you likely need to remove the http://dowmain.com/ part. Starting a path with a slash will mean php will look for the script in the root of the filesystem. Quote Link to comment https://forums.phpfreaks.com/topic/236367-php-449-to-php-50/#findComment-1215240 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.