Page 1 of 1

Function Problem php3/4

Posted: Thu Dec 18, 2003 10:39 pm
by php_matt_k
Ok, this is wierd. On my dev box.. i have a few functions for a login script.. and they work fine..i can call them and run them.. Its running apache php4.xxx... then.. when i run the exact same thing on the server, which is running php3.xxx I get the error:

Fatal error: Call to unsupported or undefined function redirect() in /newsite/login/index.php3 on line 63

why are my function calls not working? Do i need to define types for parameters or somthing? I have never really worked with php3 i learned it after 4 had come out.

Posted: Fri Dec 19, 2003 5:58 am
by twigletmac
Are you defining the function and then trying to call it or the other way around? IIRC, PHP 3 requires you to define a function before trying to call it.

Mac

Posted: Fri Dec 19, 2003 5:59 am
by twigletmac
BTW, you should really get that server upgraded, PHP 3 is pretty ancient now.

Mac

Posted: Fri Dec 19, 2003 4:34 pm
by php_matt_k
Yeah, I figured it out. I just put all the function definitions at the top of the page, and it worked fine. I WISH i could upgrade it to 4. I was contracted to fix this guys site.. and he has an earthlink server.. its crap.. the ftp is slow as <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>.. the control panel is next to worthless.. thats IF you can get it to load.. its been a nightmare..