By ardee-1 on
1) Added a block via "add nlock"
2) Made the input format be PHP
3) Entered appropriate visibility settings
4) If the "Block body" field contains plain text or HTML, it shows up correctly BUT
5) If the "Block body" field has PHP code (inside PHP tags), it NEVER executes
Using Drupal 4.7.6.
Please help! Thank you!
Comments
Have you set the input format to 'PHP code'?
Unless you set the input format to 'PHP code' it will never execute.
It is set to PHP! This
It is set to PHP!
This code:
hi<?php print ' de'; ?> hogenerates this result:
hi howhereas it should generate this:
hi de hoCould my database be corrupt? Could my Drupal install be broken somehow??
Can't replicate
I couldn't replicate this error (I copied your code into a new block). Some additional checks:
1) No, it isn't a database problem.
2) Your Drupal is probably not 'broken,' but some setting is interfering with normal operations.
Are you using a default theme, or have you made modifications to block.tpl.php?
Check to see if you have changed any settings for the PHP Code filter at
admin/filters/2. You may have to enabled some role-based permissions on that page.This last bit will probably fix it.
--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.
agentrickard is my new hero!
Oh my god!
When I installed Drupal several weeks ago, I apparently turned off PHP input -- even for the "PHP code" input format! I guess I was trying to be "safe" (d'oh!). I promptly forgot about having done that. This not only explains the problem I've been having here, but also a problem I was having with CCK Computed Types!
How can I thank you enough? You saved my butt big time. I am eternally grateful!!
I have an Amazon list
But no PayPal tip jar.
--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.
It's a deal
As soon as the site is up and generating income, you'll be remembered. :-)