Function Problem php3/4

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
php_matt_k
Forum Newbie
Posts: 6
Joined: Thu Nov 06, 2003 3:47 pm

Function Problem php3/4

Post 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.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

BTW, you should really get that server upgraded, PHP 3 is pretty ancient now.

Mac
php_matt_k
Forum Newbie
Posts: 6
Joined: Thu Nov 06, 2003 3:47 pm

Post 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..
Post Reply