Page 1 of 1

Hello... I'm a newbie with a question.

Posted: Tue Aug 26, 2003 3:02 pm
by Deeve
I am very new to php. I have done some mods on my board successfully but I'm stuck at a point where I have one parse error. I read somewhere about a "parser"... is there a program to run these through to fix them? How does one fix a parse error? In case this will help, here's the error I get.

Code: Select all

Parse error: parse error, expecting `')'' in
/home/httpd/htdocs/phpbb/includes/usercp_register.php on line 940

Thanks in advance for any advice you can offer. :)

Posted: Tue Aug 26, 2003 3:06 pm
by m3mn0n
When you write code and execute it in the browser the php.exe file on the webserver 'parses' the code. If the code does not comply to php syntax you get a parse error. The error messages are very useful for solving these errors.

Let's take yours for example:
Parse error: parse error, expecting `')'' in
/home/httpd/htdocs/phpbb/includes/usercp_register.php on line 940
It simply means the parser was looking for a ) and could not find it on line 940.

Go back to that line in your source code (if you have an editor with a counter, i feel sorry for you if you dont ;)) and investigate. Usually the errors are quite stupid mistakes you made when coding without double checking what you just typed.

Hope it helps.

Posted: Tue Aug 26, 2003 3:19 pm
by Deeve
Well, that's where I am lost. I went to that line, and it isn't one that I touched. I didn't touch anything near it either. Here is the line of code at 940

Code: Select all

'L_PASSWORD_CONFIRM_IF_CHANGED' => ( $mode == 'editprofile' ) ? $langї'password_confirm_if_changed'] : '',

Posted: Tue Aug 26, 2003 4:46 pm
by pootergeist
a few lines before and after would help.
I assume from that snippet that the line is part of an array declaration which attributes either an empty string or the value of a different array index dependent upon a test.
If the parent array that that declaration is in ends on that line, you should remove the comma and replace with a closing parenthesis and semi-colon );

Posted: Tue Aug 26, 2003 5:02 pm
by Deeve
Thank you kindly... I'll look at that! :)