Foundation 1 PHP warning keeps appearing in Preview - Solved

Edit: This is now fixed with a new update to Foundation 1

This warning keeps popping after every preview in a Foundation 1 project with filename index.php and nothing on the page requires PHP (RW7, S4, OsX 13.6).

Screen Shot 9

Anyone know how to remove this very annoying message? If you close it with the X, it appears on the next Preview. I don’t want my user-facing functionality to break.

Upgrade the PHP on your server to v7.2.0 or higher. The clue is in the popup warning :)

I appreciate that the page might not actually using PHP, but so many RW users do run into problems because the version of PHP is not sufficient to run what is required so it saves all those ‘What version of PHP are you running?’ questions when somebody has an issue.

1 Like

The clue is that this appears during Preview on my Mac.

I really hope I don’t get any questions when someone else has an issue.

The message states: “This project requires a web server that is running PHP v7.2.0 or higher.” That is not correct. This project has no connection yet whatsoever with the server it will be eventually loaded to. There is NO hosting Control Panel and NO host to contact.

That warning won’t appear on a published page. However, it is appearing because there’s a stack on the page that requires 7.2.

It appears on every publish which is the annoying thing. Nothing in the site requires PHP 7.2 or any PHP and pages that have remained unaltered for over a month, now have that warning. Up until yesterday they were fine and today since about 11am the warning appears after every Preview. Perhaps a coincidence, but this started after my internet service stopped for about 30 minutes but is fine now.

Edit: Might be worth mentioning that I get the same 4 Errors that I have always had in Foundationin Preview. No new Errors there.

[Error] Cross-origin redirection to https://www.foundationstacks.com/foundation-versions.php?_=1589638230193 denied by Cross-Origin Resource Sharing policy: Origin http://127.0.0.1:58507 is not allowed by Access-Control-Allow-Origin.

[Error] Failed to load resource: Cross-origin redirection to https://www.foundationstacks.com/foundation-versions.php?_=1589638230193 denied by Cross-Origin Resource Sharing policy: Origin http://127.0.0.1:58507 is not allowed by Access-Control-Allow-Origin. (foundation-versions.php, line 0)

[Error] XMLHttpRequest cannot load https://foundationstacks.com/foundation-versions.php?_=1589638230193 due to access control checks.

[Error] ERROR Getting Server Version Data error (stacks_page_page16.js:137:184) i (jquery-2.2.4.min.js:2:27157) fireWith (jquery-2.2.4.min.js:2:27916) z (jquery-2.2.4.min.js:4:12095) (anonymous function) (jquery-2.2.4.min.js:4:15596)

1 Like

The notice was added in a recent update. Lots of users have been struggling to troubleshoot functionality issues and learning that root cause ties back to the PHP version of the web server. The spirit of the message is to avoid problems with a published page.

I get what you’re saying about the message being annoying with each preview. There may be a way to turn it off in the future. Also, if your page doesn’t require PHP as all, that’s a little odd. It would make sense though, if there some functionality you could enable in a stack on your page that would make it require PHP. The message is on the stack or set of stacks, not what any individual setting does.

I don’t think those errors are specifically the fault of Foundation, but are instead browser security warnings. They might be solvable with a CSP in your htaccess file.

This article might help you get around the error:

Yikes. I wasn’t aware that Foundation 1 had changed so much to require PHP.

This is a bit like Ford removing the windscreen wipers and Indicators because drivers were having too many problems switching the windscreen wipers on when wanting to turn left.

However, it begs the question why it was OK until today. I just want the bloody warning message to stop.

I don’t have an htaccess fie - this is in preview in RW7. I don’t want to fix those errors as I will probably get more warnings. Anyway those Errors have been there as long as I can remember.

Understood. As a workaround, the fastest way to stop the message will be switch the version of PHP on your web server from 7.1.33 to 7.2 or higher.

I don’t know much about the differences in PHP releases. Is there a specific feature that 7.1.33 has and 7.2+ doesn’t (deprecated)? Baes in how you describe as your page, it doesn’t seem like moving to a new version would hurt anything since you don’t need PHP.

I appreciate your help, but why should I upgrade the PHP version on my OsX, just to stop a dumb warning that has appeared for no reason I can fathom, after no changes have occurred to a project file. Not even sure if 10.13.6 High Sierra PHP can be updated to 7.2 and why take such a risk? Makes no sense.

If I was to use something that required PHP 7.2 on the page, then it would be a somewhat reasonable thing to warn once and allow a cancel feature for the warning, as it is just in RW Preview.

You don’t upgrade the PHP on your OSX, the php is on the server, so nothing for you to install on your machine, just use the web host cPanel or whatever interface you have to choose the php version.

1 Like

Is the issue not that the warning is happening on Preview on RW7? In which case how can you negate it, as I presume you are stuck with whatever php version RW7 is using?

Not at home so can’t confirm anything

There is no server, no cPanel, no web host.

I am working in RapidWeaver and previewing a page inside RapidWeaver inside my MacBook. For the sake of this illustration, there is no internet connection to any server with any cPanel.

@Ruyton is correct. What’s been happening to people is; they’ve been previewing sites locally. Everything has looked fine. Then, when they publish, they’re finding broken functionality because the PHP at the web server is older than the local version. Version 7.2 is the minimum supported version, not only in terms of Rapidweaver stacks, but it’s end-of-life.

You don’t need to update macOS.

The issue is that it IS happening in Preview, every time and if you negate it with the X, it happens on the next Preview.

That is all fine and dandy for those who require PHP 7.2, but why flag up a warning if you don’t need PHP and why do it every time you Preview.

Where did you hear that? Surely the nature of Stacks that this is up to individual devs to update stacks that require PHP to alter the stacks to use new feature or to just exclude pre 7.2 versions. E.g. I have several Armadillo installations on PHP 5.6 and they run like clockwork.

So exactly how then, do RW pages that use PHP preview on the Mac before being published?

Here’s the authoritative source for PHP version support:
https://www.php.net/supported-versions.php

Version 5.6 sites may “function,” but 5.6 is a security black hole. It’s the sort of thing, “If you never go to the doctor, you’ll never get bad news about your health.”

You cannot preview a RW page that uses php before publishing it. However, if you just change the name of the page from html to php and there are no stacks on the page that use php, then of course you can preview it.

Gary, what version of Foundation theme, stacks and add-on stack packs you’ve got? There was an update recently to v.1.8.13. Perhaps this warning has something to do with your copy of Foundation being outdated? I know, I had some weird Foundation-related warnings in the past.