Jump to content
Sign in to follow this  
Martin Wuehr

php 7 issues

Recommended Posts

Hello everybody,

a clients server was updated to php7. 

As a result, the php code used with processwire isn't interpreted correctly any more. The foreach loops are commented out so as a result a part of the php code is displayed in the browser.

I tried to use <?php instead but the result was the same.

Any ideas? Thank you for your help!

Martin

bwa_pw_01.jpg

bwa_pw_02.jpg

Share this post


Link to post
Share on other sites

Thank you so much for your replies

The addition to the php.ini did the job!

(The server guys are't the fastest...)

But now there is a different problem. Now only the index site will be displayed. Every link to a different site is dead and promted  an error. The server-guys think, that this is related to the changes in the php.ini. I can't believe that. Also the backend can't be entered. 

Before the changes in the php.ini everythings runs perfectly...

Here is the site:

https://bwp-www.pp-it.eu

Any Ideas?

Thank you

Martin

Share this post


Link to post
Share on other sites

Have a look at these threads. Could be htaccess, could a be a language issue, etc. Ssorry, in a rush.

 

 

Share this post


Link to post
Share on other sites

Hello,

I already checke the RewriteBase in the .htaccess file. It was activated so I commented it out for testing but with no success concerning the Link Problem.

So the Browser prompt show the correct URL. Could it be something with the local Port443?

Thank you 

Martin

BWA_PW03.jpg

Share this post


Link to post
Share on other sites

Look like there is still a problem with your .htaccess or as @kongondo said, a language issue. Is your website a multi-language one ?

What happen if you activate the .htaccess directive RewriteBase / ?

# -----------------------------------------------------------------------------------------------
  # 11. OPTIONAL: Set a rewrite base if rewrites aren't working properly on your server.
  # And if your site directory starts with a "~" you will most likely have to use this.
  # -----------------------------------------------------------------------------------------------

  RewriteBase /
  # RewriteBase /pw/
  # RewriteBase /~user/

 

Share this post


Link to post
Share on other sites

Hi,

the site isn't  a multi-language one.

I activated and deactivated the RewriteBase with no success. I was already aware of this potential issue.

The server was updated to php7 (from 5.2). After that we had the Problem with the php Short Code.

At this point, the site ran perfectly well, besides the php short code issue. This was solved via php.ini thanks this thread.

After fixing the short code, the link problem occured. The server guys blame the php.ini short code change for that, but I can't believe that. 

There were no changes on the ProcessWire Installation or .htaccess File from my side over the entire process.

In the Links above I found the hint to enable mod_rewrite on apache and AllowOverride. I will give that to the server guys, hoping to fix the problem...

Thanks Martin

Share this post


Link to post
Share on other sites

Shot in the dark here, what happens if you disable short tags and change your template files to use normal tags?

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By muzzer
      Existing PW site version 2.7.2 core running on php7.1. Site is perhaps 7 yrs old and never misses a beat. Can't speak highly enough about this solid version, but....
      As new php versions are released (v8 in the next year I think?) and each seems to get quicker I'm looking at upgrading to php7.3 or 7.4 and upgrading the site to PW v3.x.
      I've been away from the forums since v3 was released so don't know much about it. I guess it's stable as it's been around for ages now, but what I'm wondering is:
      what are the real advantages of upgrading to v3 for a site which is actively used but with only periodic development. And what are the disadvantages if any? Is there any speed impact (good or bad) in either general site speed under 3.x or admin-use speed/ease of use? any issues with either PW version with newer php versions (>7.1) I should know about? is there any good write-ups/vids about new features etc of v3 compared to v2.7? Thank you
       
    • By modifiedcontent
      I had upgraded my Apache configuration to include PHP7.2 and PHP7.3 for a Laravel-based script on the same server. Somehow it/I messed up a previously fine Processwire site, in a very confusing way.
      The site still looks fine, but editing template files has no effect whatsoever. It is stuck on some kind of cached version. I have already disabled PHP7's OPcache, cleared browser caches, etc, with no effect.
      The pages now apparently come from PW's assets/cache/FileCompiler folder, even though I never enabled template caching for this site.
      I have tried adding "namespace ProcessWire;" to the top of the homepage template file, but then I get this fatal error:
      My functions.php file pulls data in from another Processwire installation on the same VPS with the following line:
      $othersitedata = new ProcessWire('/home/myaccount/public_html/myothersite/site/', 'https://myothersite.com/'); That apparently still works fine; the site still displays data from the other installation, but via the "cached" template that I am now unable to change.
       
      I don't know where to start with this mess. Does any of this sound familiar to anyone? Any pointers in the right direction would be much appreciated. 
       
      Edit:
      Adding "$config->templateCompile = false;" to config.php results in the same fatal error as above. 
    • By Orkun
      Interesting Conference / Talk from Rasmus Lerdorf, creator of PHP.
    • By FrancisChung
      Hi there,
      A colleague of mine is trying to get our site running on his local Ubuntu LAMP Setup (Ubuntu 17.10, Apache 2.4.27, PW 3.0.62, PHP 7.1.11)

      When he types in the Homepage URL, he's getting code outputted instead of being executed.
      Does any one know why?

      Update : 
      Just Figured it out.
      Apparently, it's a new PHP7 security feature that disables from code executing if the code module starts with <? instead of <php
      I'm using MAMP locally so I'm guessing MAMP is somehow circumventing this but LAMP isn't.

      I'm posting this so people can save themselves hours pulling their hair out.
    • By rickm
      Hi,
      I'm in the middle of setting up a new PW site and cloned in master from github, but was a bit surprised to see that ProcessWire isnt yet PHP7 compatible.
      I mean, it works. But at the top of every page you get a depreciated notice:
      Is there any timeframe for when PW will be updated to PHP7? This looks like a fairly minor thing to fix, it's just a bit surprising it's not already done.
      There's a very strong push to get people updated to PHP7 in the development community, and all the major hosts seem to be pushing it too, likely due to its lower resource usage, and speed improvements.
      If this is something not yet planned, I take it I'd be ok to submit a pull request on github with some, if not all the updates needed to get this compatible with PHP7?
      Cheers
×
×
  • Create New...