FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP 5 problems...





The-Master
Well I always code in PHP 4 as this site has it but yesterday when I decided to have a second site on another free hoster I discovered that it uses PHP 5. Crying or Very sad

Why do some things not work with PHP 5 and is there any way to sort that?

Also would there be a quick way to convert scripts between the two versions?

Thanks in advance. Smile
duckling
sometimes they delete/disable some functions of PHP that wouldn't be needed anymore. if your script uses some functions like this, it won't work of course. now all you can do is, if you have written these codes, just recode the unfunctional parts or if you downloaded these codes from somewhere, just look for if there's a version for PHP5 Smile
SlowWalkere
I don't know of any quick way to convert a whole script or sort out which parts work and which ones do not. But, as mentioned before, some functions might get removed or changed as the versions change. If a function that you're calling no longer exists, then it should come up in the error message. That would be a good clue to change it.

If you've got a question about a particular function, you can also go to php.net and look up that function. It should at the top of the page which versions (3, 4, and/or 5) it works in.

- Walkere
sonam
Code:
error_reporting(E_ALL);
ini_set("display_errors", "1");


Insert this two lines on top of your code and see what PHP errors report. Then change this lines with PHP5 functions.

Sonam
riv_
Php5 is a lot stricter syntaxwise and stuff. (To be totally inarticulate, sorry)
Even if the funstions you are trying to use do exist in php5, they may not work if the way in which you call those functions isn't semantic.
I've just been getting started with php5 myself, and learning a bit about OOP... exciting, but frstratng too.
Good luck, ad let us know (not sure if I'll be much help, Embarassed ) if we can help you with any specifics!
Related topics
PHP 5.0 or higher
[PHP] PHP 5
php 5 PEAR installation
PHP 5
PHP 4 to PHP 5 Upgrade
If you want use PHP 5.1.4 with Apache 2.2.2 for windows
PHP 5
PHP 5.0.0
php 5.x supported?
PHP 5
[DUVIDA]MySQL 6.0, PHP 5.0 e Apache 2.2
PHP 5.0.0 - say what?
Zen Cart users - PHP 5.2 will become a minimum requirement.
Finally php 5 on server 2!
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.