Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php version issue #160

Open
kannik2018 opened this issue Dec 17, 2018 · 10 comments
Open

php version issue #160

kannik2018 opened this issue Dec 17, 2018 · 10 comments

Comments

@kannik2018
Copy link

kannik2018 commented Dec 17, 2018

Hello,

Years ago I've made my website with stacey 2.3, recently my provider stopped supporting php 5.6 and upgraded to 7.2. My website doesn't work correctly anymore.

The problem seems to be rule 113 in page-data.inc.php : $page->page_name = ucfirst(preg_replace('/-_/e', "' '.strtoupper('\1')", $page->data['@slug']));

Can I change this rule to make it compatible to 7.2 php?

Thank you,
K

@o-l-e
Copy link

o-l-e commented Jan 12, 2019

Hey @kannik2018 did you ever find a solution for this? I am having the same problem with a site for a friend. The host upgraded their php, and now the site breaks.

@kannik2018
Copy link
Author

kannik2018 commented Jan 12, 2019

No. Tried to correct the php, but didn't succeed. Fixed the site by making an unique template for each page with all the text information in it. Put an empty .txt files in the project folder with the name of the unique template. Loading the image files from the folders luckily still works. First tried to upgrade the stacey version but that turned out as a nightmare in my case. Ugly solution but my company website wasn't offline to long. When I find some time I'm gonna remake the website with a different cms.

Hope you do find a solution,
K

@o-l-e
Copy link

o-l-e commented Jan 12, 2019

Thanks for your reply @kannik2018, i will keep you updated if i find any solution to this.

@o-l-e
Copy link

o-l-e commented Jan 12, 2019

Hi @kannik2018 i got my version working with php 7+ with help from a friend, but i see now that you are using the Stacey 2 version. I am using Stacey 3, which means that you won't be able to use this fix.

@o-l-e
Copy link

o-l-e commented Jan 12, 2019

I created a separate issue with the fix here

@shamlian
Copy link

shamlian commented Jan 17, 2019

I have the same problem with Stacey 2 and PHP 7. I am no PHP expert but am going to try to poke around to see if I can figure out a fix. BTW is there a github page for Stacey 2.x? Staceyapp.com seems to be gone; the wayback machine last archived it in April 2018.

@shamlian
Copy link

shamlian commented Jan 17, 2019

@kannik2018 I was hoping the fix would be as simple as replacing line 113 of page-data.inc.php $page->page_name = ucfirst(preg_replace('/[-_](.)/e', "' '.strtoupper('\\1')", $page->data['@slug']));

with

$page->page_name = ucfirst(preg_replace_callback('/[-_](.)/', function ($matches) { return "' '.strtoupper('\\1')"; }, $page->data['@slug']));

But no such luck. This gets rid of the error but for whatever reason, the variables still don't get replaced properly.

@kannik2018
Copy link
Author

Thanks @shamlian for looking into it. I should have shared this before, but I also tried replacing that line, without luck. That's why I used a workaround. Hope somebody knows which other lines need to be corrected.

@shamlian
Copy link

Unless someone comments otherwise, I'm assuming Stacey 2.3 is even more of a dead end than 3.0 and at this point, it may be worth spending the time to update to 3.0 in the short term. Hoping I don't have to switch CMSes long term; @kannik2018 where did you end up?

@desbest
Copy link

desbest commented Jan 29, 2020

I also had problems using Stacey 2.3 with php 7. I think I have fixed the problem with this issue. #163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants