Advertisement:

Author Topic: Some pages blank - php version?  (Read 702 times)

Offline Lord991

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
Some pages blank - php version?
« on: April 23, 2020, 01:45:06 PM »
Ok guys, we just moved forum (SMF2.0.17) from one host where PHP version was 5.6 to a new host where PHP version is 7.2 and some pages like Core Features, Features and Options, Security and Moderation, Modification Settings in Admin panel doesn't work, only white blank page shows up or "This page isn't working".

We tried changing PHP version in cPanel back to 5.6 but it doesn't have any effect.

Also our error log is full of these: 2: Parameter 1 to shd_buffer_replace() expected to be a reference, value given

Any solutions to this problem?
Thanks

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,588
  • Gender: Male
    • i30 Owners Club
Re: Some pages blank - php version?
« Reply #1 on: April 23, 2020, 02:04:58 PM »
Can you give examples of the full error message?

Do you have the Simple Help Desk mod installed?

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,392
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Some pages blank - php version?
« Reply #2 on: April 23, 2020, 02:05:41 PM »
What mods do you have installed shd_buffer_replace is not in 2.0.17 the default install.

Should work fine on 7.2 I run SMF on 7.3
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline drewactual

  • Sr. Member
  • ****
  • Posts: 909
    • College Football Fan Site CFB51
Re: Some pages blank - php version?
« Reply #3 on: April 23, 2020, 02:07:32 PM »
do you still have copies of the site from the old server?

how did you package and move them?

i'd be more concerned something was left behind or lost in the move than version of php...  just a thought.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,588
  • Gender: Male
    • i30 Owners Club
Re: Some pages blank - php version?
« Reply #4 on: April 23, 2020, 02:14:04 PM »
That function is declared in Subs-SimpleDesk.php.

The full error message will show which module is calling that function with a value rather than with a reference.

My guess is that there's a setting in the php.ini that's more strict in your new installation.

Offline Lord991

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
Re: Some pages blank - php version?
« Reply #5 on: April 23, 2020, 02:17:56 PM »
We've managed to change the PHP version back to 5.6 and pages showed up, but there seems to be some error with logout now and the session.

The mod Simple Help Desk is deleted now.
The concern is that if we delete SHD mod and change PHP back to 7.3 the pages are still blank.

And for the session problem, I've tried changing Cookie name, deleting cache and switch browsers but I still can't logout. 

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,392
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Some pages blank - php version?
« Reply #6 on: April 23, 2020, 02:21:07 PM »
Try changing to under cookies and sessions to database driven sessions or uncheck it what ever is set.

For simple desk what version of the mod was it?
Also any logs in your webserver error log
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Some pages blank - php version?
« Reply #7 on: April 23, 2020, 02:22:15 PM »
To fix the SimpleDesk error you were seeing (which won't be the cause of your problem), in Subs-SimpleDesk.php there is the 'function shd_buffer_replace' definition, which will have a & before the parameter; take that out.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Lord991

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
Re: Some pages blank - php version?
« Reply #8 on: April 23, 2020, 02:33:33 PM »
Thank you all for SimpleDesk fix, we decided to remove that mod anyway.



This is the settings for Cookies and sessions, but the issue is still there. After clicking logout second theme there is a message: Session verification failed. Please try logging out and back in again, and then try again.


Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,588
  • Gender: Male
    • i30 Owners Club
Re: Some pages blank - php version?
« Reply #9 on: April 23, 2020, 02:35:51 PM »
Personally, I'd set the "Use database driven sessions" option.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Some pages blank - php version?
« Reply #10 on: April 23, 2020, 02:36:29 PM »
Still going to need the server error logs.

DB driven sessions is a good choice, depends mostly on how busy you are (after a while, there are better and more efficient options)
No good deed goes unpunished
All helpful urges should be circumvented

Offline Lord991

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
Re: Some pages blank - php version?
« Reply #11 on: April 23, 2020, 02:46:18 PM »
I can't find any server error log for this time, there is an older log ...
Also, there is no logged any error in forum logs.

I'm going to change PHP back to 7.3 now without SHD mod installed, maybe it generates new error.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Some pages blank - php version?
« Reply #12 on: April 23, 2020, 02:48:25 PM »
When you say 'you deleted the mod', how exactly did you do that out of interest?
No good deed goes unpunished
All helpful urges should be circumvented

Offline Lord991

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
Re: Some pages blank - php version?
« Reply #13 on: April 23, 2020, 02:58:01 PM »
Uninstalled from the package manager? There were no errors while uninstalling process.

Now with PHP 7.3 the problem is here again with the blank pages.

Now the server error logs show: PHP Fatal error:  Redefinition of parameter $nul in /home/hostname/public_html/forum/Sources/ManageSettings.php on line 2764
On that line, there is some CustomForm probably some mod.

We don't mind being on PHP 5.6 as long as we can fix this logout session problem. Any advice?

EDIT: It's strange we have exact forum copy on an old host with PHP 5.6 working just fine and logout work also.

Maybe some PHP 5.6 extensions are not enabled on the new host? There is still no error in any log.

« Last Edit: April 23, 2020, 03:16:50 PM by Lord991 »

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Some pages blank - php version?
« Reply #14 on: April 23, 2020, 03:30:19 PM »
I wouldn't stay on PHP 5.6 seeing how it stopped getting security patches in 2018.

The ManageSettings.php issue I've seen before, the line has $nul, $nul, $nul in it, you can safely change this to $nul, $nul2, $nul3. Try changing that before going further.

There are no relevant extensions in 5.6 that wouldn't be available in 7.x (except mysql, which is replaced out for mysqli in 2.0.14+)
No good deed goes unpunished
All helpful urges should be circumvented

Offline Lord991

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
Re: Some pages blank - php version?
« Reply #15 on: April 23, 2020, 03:57:31 PM »
Ok Arantor, this is the outcome:
I've changed PHP to 7.3, and change this $nul to $nul2 and $nul3, and now the pages like Core Features shows up normally.

The only problem left is this logout session.

There is no new errors in any log.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Some pages blank - php version?
« Reply #16 on: April 23, 2020, 04:03:33 PM »
What are your cache settings set to?
No good deed goes unpunished
All helpful urges should be circumvented

Offline Lord991

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
Re: Some pages blank - php version?
« Reply #17 on: April 23, 2020, 04:06:52 PM »
It's Level 1 Caching..

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Some pages blank - php version?
« Reply #18 on: April 23, 2020, 04:15:14 PM »
That's not the only setting on that page.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Lord991

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
Re: Some pages blank - php version?
« Reply #19 on: April 23, 2020, 04:19:34 PM »
Memcache settings field is blank. Load balancing is disabled.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Some pages blank - php version?
« Reply #20 on: April 23, 2020, 04:27:34 PM »
So I guess you're using the file caching? (It's been so long since I looked at 2.0 that I'd forgotten there wasn't the 2.1 style dropdown for cache selection)

Try emptying the file cache. The menu *shouldn't* be cached but it is possible. Especially if you have any other mods listed (which wasn't confirmed despite being asked).
No good deed goes unpunished
All helpful urges should be circumvented

Offline Lord991

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
Re: Some pages blank - php version?
« Reply #21 on: April 23, 2020, 04:37:44 PM »
I've tried emptying the file cache but its the same. I've tried deleting my browser cache, session storage, cookies, even other browsers but it doesn't help.
Mod list: https://i.imgur.com/I1dFcQh.png

It has to be something with host, the forum is exactly the same as on old host.

Offline Lord991

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
Re: Some pages blank - php version?
« Reply #22 on: April 24, 2020, 10:43:32 AM »
Marked solved.

I've reinstalled SMF updates to 2.0.14 and then installed new versions one by one.

Thanks everyone for helping me.

EDIT:
Again
An Error Has Occurred!
Your session timed out while posting. Please go back and try again.

Offline HRM

  • Jr. Member
  • **
  • Posts: 334
  • Gender: Male
  • Dutch & Belgium musicforum
    • Muziekforum.com
Re: Some pages blank - php version?
« Reply #23 on: January 24, 2021, 04:31:22 AM »
I wouldn't stay on PHP 5.6 seeing how it stopped getting security patches in 2018.

The ManageSettings.php issue I've seen before, the line has $nul, $nul, $nul in it, you can safely change this to $nul, $nul2, $nul3. Try changing that before going further.

There are no relevant extensions in 5.6 that wouldn't be available in 7.x (except mysql, which is replaced out for mysqli in 2.0.14+)

Thanks a lot Arantor!!!

This solution did it for me. This bug was bothering me for about a year but had no time before to check my own forum. Now did a little search checked server logs and got it.
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D