I've set up a test site to try upgrading from version 5.10 to 6.4. Overall things look good, except on a few pages where I need to use some PHP code to pull data out of a legacy database. I get these errors:

Parse error: syntax error, unexpected '>' in /home/site_name/public_html/drupal6/includes/common.inc(1547) : eval()'d code on line 1

Which I understand means I supposedly have errors in my PHP code. It worked fine in 5.10, so I'm not sure what the problem is here. As a test, I tried replacing the code with this:

<?php
echo "Hello";
?>

And I get the same error. A bug?

Comments

dnewkerk’s picture

What version of PHP? What is your hosting environment?
What process did you follow in upgrading? (did you fully delete all Drupal 5 files first, or did you try uploading Drupal 6 over it?)
You mentioned custom PHP code - where did you write that?

-- David
absolutecross.com
[new guide/lesson in progress: Creating a CCK and Views powered Drupal site - feedback welcome]

paul-c’s picture

PHP is version 5.2.6, and I'm running Apache/2.2.8 (Unix)

I created an entirely new directory and uploaded a fresh copy of Drupal 6.4, copied my 5.10 database to a new database, and went from there. So basically a new installation.

The PHP code is in a drupal page, and in a block displayed on the front page.

*EDIT* Looks like version 6 of the Panels module was the problem. I removed that, deleted and re-imported the database, ran update and now the PHP pages are displaying correctly. I guess I'll need to find a work-round for Panels for now.

--------------------
http://noise.as/
E-Commerce module in action - music for sale!

dnewkerk’s picture

Ah yes that would do it... the first alpha version of Panels for Drupal 6 "just" came out, so it's likely to have quite a few bugs at first.
When in doubt - disable as many modules as possible to help you troubleshoot problems (you can always disable modules and re-enable them at any time without losing the data stored for them... however if you click the Uninstall tab and uninstall the module, then its data will be lost).

-- David
absolutecross.com
[new guide/lesson in progress: Creating a CCK and Views powered Drupal site - feedback welcome]

MestariM’s picture

I have the same problem, and don't even have panels installed. My Drupal 6.4 is a fresh install.
PHP is 5.2.5, Apache 2.2.4, MySQL 5.0.45

What could be the problem?

paul-c’s picture

Looks like Panels wasn't the issue here after all. Even with that removed, I continued getting these PHP errors in versions of Drupal 6. A bit of searching found this fix that worked:

http://drupal.org/node/257767

--------------------
http://noise.as/
E-Commerce module in action - music for sale!