Hi,

I just installed Drupal 6. I entered some text when creating a page and tried to select an input format "php". There are only 2 formats available, Full HTML and Filtered HTML. Please help me on this issue. How do I get PHP as an input format. It was there on drupal5.7.

Thanks,

Ashish

Comments

vm’s picture

Status: Active » Closed (fixed)

the php input format is now a module so that it can be enabled and disabled. It comes default disabled. goto adminsiter -> modules and enable it.

agsparta’s picture

Thanks. I feel stupid. I didn't know that.

natere2’s picture

don't feel stupid i had the same question!

its different in version 5 i believe, as shown here

http://webdevnews.net/2008/11/styling-the-drupal-user-login-block-php-co...

thanks for clearing it up, its a module now!

wanderingstan’s picture

Yep, I just had the same question too. Thanks for asking, so I could find this answer. :)

letsnurture’s picture

thanks you all guy

I faced the same problem and you people helped me to fix that.

Many thanks,

Regards,
Web-Farmer
http://www.letsnurture.com

ceege111’s picture

Thanks very much, helped me too. Does anyone know if there is a "changes since 5" summary doc for D6?

scifisi’s picture

Same problem here! Thank's for the tip!

vm’s picture

Does anyone know if there is a "changes since 5" summary doc for D6?

There is a CHANGELOG.txt in every download of drupal. Though offhand I do not know if it speaks directly to php input format being turned into a module on it's own.

okeep’s picture

thanks
Ok, I just had the same question too.

nice

digitalpbk’s picture

Same here ! :D

jstw’s picture

Me too! Thanks a lot!

dholzgang’s picture

Yes, thanks so much. This is what my old boss used to call "CIPU" (keypoo) -- "Clear if previously understood." ;-)

radoya’s picture

One more :)

krisna123’s picture

me to...

hm... Q: why not enable by default?

vm’s picture

because site admins should know that they are enabling a potentially unsafe feature on a site. It used to come enabled by default.

MerjaS’s picture

Help me!

Now, I read this thread through, and must say I do feel really stupid! You see, some time ago, I made a mistake when working with views. Then, trying to fix it, somewhere along the way deleted the input type php. Yes, there was a confirmation, and I clikced yes to it, because php was not to be used at the site. All the pages seemed awfull after that, and I had to go and change their input format to iFrame to get them look ok again.

Is there any way to get the php input format re-installed? I have the php filter module enabled, but that is not enough, obviously...

Any help appreciated!

BR,
MerjaS

PS. Does anyone have a clue what on earth actually happened, meaning how deleting php causes all nodes go crazy with "full html" as input format?

shanehussainnaqvi’s picture

why not just use user/login in the error reporting page instead of creating a new page?

MerjaS’s picture

quote:
"Posted by shanehussainnaqvi on October 21, 2010 at 8:47am
why not just use user/login in the error reporting page instead of creating a new page?"
end quote

I'm sorry, but I don't see the relevance here. Is this a reply to someone else?

Feeling even more stupid,
MerjaS

krisna123’s picture

already try disable PHP filter module anda re-enable it ????

go add another input format or configure it
admin/settings/filters
admin/settings/filters/add

if u want to use php input format then check "PHP evaluator -> Executes a piece of PHP code. The usage of this filter should be restricted to administrators only!"

MerjaS’s picture

Thank You, krisna123, for You comment!

Tried that, first disabled, and then re-enabled PHP module, and the PHPs work now, thank You for Your help!
Yes, I will keep the PHP input format avaliable for administrators only, and I've learned my lesson;
I'll get my php codes from our developers from now on. ;-)

But still the other problem persists:
All the pages seem awfull with FullHTML, and FilteredHTML, and they have to be of input format "iFrame" to look ok.
What do You think, krisna123, can this be caused by an invalid PHP, or is this more likely about something quite else?
And above all, is there a way to fix it?

Thanks,
MerjaS

krisna123’s picture

Maybe u/someone else change "html input format" configuration. Look at "input format configuration" AND look at iframe configuration (see any diffrentt? Maybe iframe input allow php code or something else???). Go to input settings. Btw, I suggest u make "new page for test, don't use existing page".

MerjaS’s picture

Thank You, krisna123!

I created a brand new testpage, like You suggested, it seems to work OK. Tables, texts, and images are displayed correctly, when I select FullHTML. On the previous test page, text I entered was displayed, but even Full HTML didn't respect my HTML tags of rows nor columns, and did not display images.

I checked the input format configurations, once again:
In Filtered HTML I have checked: HTML filter, Line break converter, URL filter
In Full HTML I have checked: HTML corrector, Line break converter, URL filter
In iFrame Filter I have checked: HTML corrector, Include iFrame, Line break converter, URL filter.

So this solved my problem from now on, but is there any way to fix the existing pages?

Thanks and regards,
MerjaS

krisna123’s picture

I have read post about that but I forgot where. I never got that problem, so I can't help u further.

But my suggestion for quick solution, change all input to iframe or make new input format. Example: "FULL FORMAT2" - copy it from full format.

this metode would be hard if u have many pages. But it's the easies way to correct the problem.

Or maybe go to input format - full html or filtered - configuration and click save button maybe can help u? Sometimes change some setting then changing it back can solve some problem. (Be carefull I don't know what will happen if u do this)

MerjaS’s picture

Title: input format "php" missing on drupal6 » Thank You, krisna123

I just got everything back to normal, thanks to Your tips.

Thanks for all Your help,
MerjaS