News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Some pages blank - php version?

Started by Lord991, April 23, 2020, 01:45:06 PM

Previous topic - Next topic

Lord991

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

Shambles

Can you give examples of the full error message?

Do you have the Simple Help Desk mod installed?

vbgamer45

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

drewactual

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.

Shambles

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.

Lord991

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. 

vbgamer45

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

Arantor

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.

Lord991

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.


Shambles

Personally, I'd set the "Use database driven sessions" option.

Arantor

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)

Lord991

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.

Arantor

When you say 'you deleted the mod', how exactly did you do that out of interest?

Lord991

#13
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.


Arantor

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+)

Lord991

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.

Arantor

What are your cache settings set to?

Lord991


Arantor

That's not the only setting on that page.

Lord991

Memcache settings field is blank. Load balancing is disabled.

Advertisement: