Hi,
I get the following error:
PHP Parse error: syntax error, unexpected '<' in xxxxxxxxxxxxxxxxxxxxxxphp.module(80) : eval()'d code on line 2
If I take a look around the line 80 of the php.module, I see the following code :
79 ob_start();
80 print eval('?>' . $code);
81 $output = ob_get_contents();
82 ob_end_clean();
Problems that it causes:
1. Some browsers cannot access my site : http://www.goforaplus.com/
2. Google adsense was not able to access my site for review either, saying that my site was not accessible.
3. I tried to do a broken link search with my website on http://www.brokenlinkcheck.com/ and I got the following error: Failed to connect to http://www.goforaplus.com/
I contacted my host and they pointed out that this PHP Parse Error is causing the website not being accessible for many browsers...but they don't know how to fix it.
Do the Problems that I encounter really related to that part of the code or something else ?
I tried to look into some proposed solutions in other websites but couldn't find a fix.
Hope that someone will be able to give me some guidance.
Thank you so much !
Hope to hear from you soon.
Yuichue
Comments
_
That error usually means you have an error somewhere where you used php code in a node or block (or other area) using the php filter.
Thank you WorldFallz for the
Thank you WorldFallz for the quick response.
Is there a way for me to know exactly from where the problem is coming ?
(mmm...maybe like an error tracker...or something else...mmm)
I am not familiar with programming so I am quite lost after all the searching.
Thank you so much !
_
Not that I know of-- it's one of the drawbacks of inserting code that way. You could look at the various error log (drupal, php, etc).... but I believe the error will always be the one tied to php eval and not the actual code causing it.
I would think it would have to do with any eval'd code that was added recently since you only just encountered it.
If you are seeing it on
If you are seeing it on many/every page, then it's probably PHP used in a block. If you are only seeing it on a specific node page you are visiting, then it's probably the PHP in that node.
Contact me to contract me for D7 -> D10/11 migrations.
_
Thank you Jaypan for your reply !
I guess it's something on the main page, since Google Adsense and http://www.brokenlinkcheck.com/ were not able to access the main page of my webpage: http://www.goforaplus.com/
However, it is a bit strange since I did not modify any coding since a long time ago...
(sigh...) Don't really know what to do then...
Do you know a place where we can pay people to do a checkup ? Elance ? Something similar ?
Thank you so much for your help !
Yuichue
Contact me and maybe I can do
Contact me and maybe I can do something for you.
Contact me to contract me for D7 -> D10/11 migrations.
This is due to Drupal's PHP evaluator.
Go to: Administration » Configuration » Content authoring » Text formats
and configure the "PHP code".
See the "Filter processing order".
If you have more filters enabled, you should move the "PHP evaluator" to the top of this list!
And/or turn the filters off that you do not need.
Happy coding!
Thanks Bent, moving the PHP
Thanks Bent, moving the PHP Filter to the top of the list solved the issue for me.
Certified Drupal Site Builder 7 & 8
This was the issue! Thank you
This was the issue! Thank you.