Parse error

estebandido - May 13, 2008 - 02:35

I just upgraded from 5.x to 6.2. I did the upgrade, and it mostly went OK, but now I get this...

Parse error: syntax error, unexpected '>' in /home/.extra/webbly/(mydomain)/includes/common.inc(1537) : eval()'d code on line 1

I checked that line, and there's no '>' there, which means the problem is somewhere else.

Thoughts?

I'm having the same problem

David Fisco - May 21, 2008 - 01:32

I'm having the same problem on my articles where I have chosen to embed PHP code in the body of the article. I have the PHP Filter module enabled and I check "PHP Code" in the input box, but it fails to evaluate as it did under 5.x.

Update

David Fisco - May 21, 2008 - 17:51

I've tried a "dummy" PHP page and I found that having a body of

<?php
print 'hello, world!';
?>

(note: Drupal won't format this correctly, it should have NO carriage returns.)

will parse correctly, but

<?php

print 'hello, world!';
?>

throws an error.

OK, solved it

David Fisco - May 21, 2008 - 18:10

Go to Administer -> Input formats -> Click on PHP Code's configure link.

Under Filters, make sure ONLY PHP evaluator is checked.

PHP code seems to work fine.

Beautiful,

euchrid9 - June 2, 2008 - 11:27

genius, and thankyou - saved me a lot of time!
[euchrid]
www.euchrid.co.uk

 
 

Drupal is a registered trademark of Dries Buytaert.