Topic: Help Please ASAP

Thanks to anyone who can help me fast.

I am having a problem to where at any point in time that i edit my function.php it then gives me a error.


heres the error.

Parse error: syntax error, unexpected T_LNUMBER, expecting '&' or T_VARIABLE or T_CONST in /home/alpha/public_html/include/functions.php on line 134

Now the line 134 that it is refering to is this.

line 134 ------>  function pun_setcookie($user_id, Password_hash, $expire)

{
    global $cookie_name, $cookie_path, $cookie_domain, $cookie_secure, $cookie_seed;

    // Enable sending of a P3P header by removing // from the following line (try this if login is failing in IE6)
//    @header('P3P: CP="CUR ADM"');

    if (version_compare(PHP_VERSION, '5.2.0', '>='))
        setcookie($cookie_name, serialize(array($user_id, md5($cookie_seed.$password_hash))), $expire, $cookie_path, $cookie_domain, $cookie_secure, true);
    else
        setcookie($cookie_name, serialize(array($user_id, md5($cookie_seed.$password_hash))), $expire, $cookie_path.'; HttpOnly', $cookie_domain, $cookie_secure);
}

---------------------------------------------


only different in line 134 there is i put  Password_hash instead of my actual password for posting purposes. So anyone know why it does this? only 2 things iv tried after reinstalling forums like 5 times is with the functions.php i tried adding forums tab to the nav bar without aving to have it in my admin panel and i just this last time tried adding the private messageing mod.


Any ideas?

Re: Help Please ASAP

also i did have my forums completely done and modded and such and i also edited the functions.php file then too. Everytthing was fine then i decided i thought the top poster thing i had on it was stupid so i removed it and after editing that it started with that error. Since top posted code was at very end of the functions.php i know i didnt take to much out becuz i only removed it and left the one } that should be there. But even after that it stil lhad the error so i decided to delete everything and start over. So after that i just started by adding portal and was adding the link Forums to nav through the functions.php and got error again. So redid it again same thnig and error again. Then this time i figured it was just from adding that code so i decided to just add private messageing so did everything but the functions.php editing and everythnig was fine but once i edited the functions.php for what was needed for the private messaging it once again got the error so please anyone whats wrong?

Re: Help Please ASAP

'password_hash' needs to be '$password_hash'

4 (edited by MikeRulez 2006-10-08 05:12)

Re: Help Please ASAP

question i just reinstalled punbb first and check it out is it says $password_hash <---- thats exactly what it says.

Now once i edit function and save it it turns to mypassword_hash <---- no money sign and it changes from password to the database password. is that supose to happen?


also i just change mypassword_hash to $mypassword_hash and still doesnt work....

Re: Help Please ASAP

needs to be $password_hash, not $mypassword_hash

what editor are you useing. the editor might be changing it.

6 (edited by MikeRulez 2006-10-08 05:36)

Re: Help Please ASAP

i click edit file in cpanel copy the code paste in notepad and then i make the changes and then paste back into cpanel and save.

So you think i should just save it and upload it again each time to see if that work?

cuz it is definetly getting changed from password the my database password.



oh also i just reinstalled it again and was cusious if this would screw it up and it did. Heres what i did.

In cpanel i when to include functions.php and clicked it and selected edit. I looked up the $password_hash and it was correct. So what i did next was jsut clicked save(note: i did NOT change any code.) Then i refreshed my forum and now the errors there. so then i got back click edit again and look at it and now $password_hash is back to my database password_hash

7 (edited by Gizzmo 2006-10-08 05:42)

Re: Help Please ASAP

do you have ftp access? if you do try downloading the file, edit it with notepad, than reupload it. seems that cpanel isnt saving it right or something.

a good choice for a ftp client is http://filezilla.sourceforge.net/

Re: Help Please ASAP

ok ill try to download and reupload changes. ill let you know what happens.

Re: Help Please ASAP

perfect so far its working tongue thats gay how that cpanel wont work now did first time i edited and that.

10

Re: Help Please ASAP

awsome, glad yah got it working.

Re: Help Please ASAP

thanks and also thanks for such fast replies i am starting this site and had it all finished and was bout to launch and i wanted to get rid of somthing and put me way back. Luckily the mods i want to start with are simple and fast installation so i can get that done fast. So thanks once again.