Forum error when posting or modifying a post!??

Status
Not open for further replies.

ziycon

New Member
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/www/www.search.ie/forum/web/includes/ame_bbcode.php(192) : regexp code on line 10

Fatal error: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Failed evaluating code: ame_substitute(4, &quot;function display_edit_format($id,$table) { $i = 0; $format_array = \&quot;\&quot;; $array_size = 0; $sql1 = mysql_query(\&quot;SELECT format FROM \&quot;.$table.\&quot; WHERE id=\&quot;.$id.\&quot;\&quot;); while ($row1 = mysql_fetch_array($sql1)) { $i = 0; $format_array = $row1[\'format\']; $array_size = sizeof($format_array); } $sql2 = mysql_query(\&quot;SELECT id,description FROM review_formats\&quot;); while ($row2 = mysql_fetch_array($sql2)) { echo\'&lt;input type=\&quot;checkbox\&quot; name=\&quot;format[]\&quot; value=\&quot;;\'.$row2[\'id\'].\'|\&quot; class=\&quot;form\&quot;\'; for($i = 0;$i &lt; $array_size;$i++) { if($row2[\'id\'] == $format_array[$i]) { echo\' checked\'; } } echo\'&gt;\'.$row2[\'description\'].\' in /home/www/www.search.ie/forum/web/includes/ame_bbcode.php on line 192
Getting this when i try post or modify a post.
 

mneylon

Administrator
Staff member
Odd

I'll have a look at the database
 

ziycon

New Member
Happens everything i try to post a message with the code quote tags! Trying to post in a topic in coding help section!
 

mneylon

Administrator
Staff member
Ah :)

I can't replicate it :(

as in interim option, could you try posting the code snippet to pastebin.com ?
 

ziycon

New Member
Seems to be any BB code thats used in a post that causes the error! only checked code and quote tags so far.
 

Dotwebs

New Member
I got a similar error when adding a post containing php. I've lost the actual message now but sent it to you Blacknight in a pm. It had similar parse and fatal error message. It looks like the page is trying to render the php code within between the quotes. I don't have time to look but it's bound to be a known error in vBulletin so they may have a solution.
 

fizzy

New Member
I just tried replying to this thread http://www.irishwebmasterforum.com/coding-help/7918-php-array.html but had issues posting PHP code. I know someone else was able to reply recently with similar code, so it could be just me, but since other people had issues in the past, I'm just wondering if anyone could shed any light.

I think including square brackets seemed to cause the error. I've put it up at Pastebin because I can't post the error screen here either: pastebin - collaborative debugging tool

However, I tried just including a line with just a function call and variable names starting with dollars. While I did not get an error, the variable names were stripped out completely, which was no good either.

I've tried both IE7 and Firefox 3 and have the same issues in both browsers.

Thanks,
Janine.
 
Status
Not open for further replies.
Top