When CF is ON PHP files don’t run

Hello to everyone, the whole community

Site is host with Dreamhost which is partner with CF.

Website is accessible and runs correctly with Cloudflare OFF.

In CF panel for DNS settings, I have: Partner hosted zone
Your DNS zone file is hosted by DreamHost , a Cloudflare partner. Manage your DNS records at their website.

When CF is on. Site is ok for the html5/css3/javascript parts but PHP file are outside page.

To simplify and avoid searching in wrong ways, I only use a small php echo that displays hello.
In CF development mode ON. PHP doesn’t work i must pause Cloudflare to run PHP.

I create CF rules for my ‘hello.php’ file but nothing changes:
Disable Security, Server Side Excludes: Off, Rocket Loader: Off, Security Level: Essentially Off, Disable Railgun, Cache Level: Bypass, Disable Zaraz, Cache Deception Armor: Off, Origin Cache Control: Off, Disable Apps.

Has anyone had a similar problem? any advice to help me?

Not sure which PHP version are you running, neither what’s the domain name, but from my point of view:

slika

You also seems to be missing the meta charset tag inside HEAD and no lang is specified in the HTML tag?

May I ask what kind of type of content is your origin host/server returning for that particular PHP file? :thinking:

Are you all the necessary PHP modules installed and working properly at your hosting provider?

I know there were some issues, like in cPanel → File Manager, when the file was opened and edited, then saved, it was in some other encoding.
Was your file edited and openned as UTF-8 or some other?

Hello Fritex, Thank you for answering and helping me.
My problem seems to be solved. Dreamhost had reset Cloudflare for my site. Remove
it and then add it back in again on the Cloudflare site and now php works. Don’t know why but now it seems ok.I have to make some tests.
Thanks.

It still doesn’t work i rushed but the site was not yet re-registered with Cloudflare that’s why it worked. but still the same problem

With CF is in pause i think everything is ok on server because i can run PHP script.
I edit with sublime text. My file is encoded in utf-8.
even i change my file by the following PHP does not display :

My script PHP page must write below:

<?php echo "Hello World!"; ?>

Switch from flexible SSL/TLS to Full strict solve this issue.

2 Likes

Great! Thank you for feedback information :slight_smile: