Jump to content

Recommended Posts

Posted

Hello folks

I started the forum update from admin panel and it failed with following message

We were unable to start a PHP session. You will need to contact your host to adjust your PHP configuration before you can continue. The error reported was: Return type of IPS\_DateTime::format($format, $memberOrLanguage = null) should either be compatible with DateTime::format(string $format): string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

I am unable to access admin panel anymore since it is stuck on the error page and my communit ywebsite is down now. How can I resolve this? Please bear in mind I am not a developer so if this requires technica lsteps beyond my powers, I am willing to compensate anyone willing to help me get the site back online.

Thanks

 

Posted (edited)

Hi Marc

Thanks for the interest

I have no clue which version it was and can't access admin control panel anymore. The support page deemed the fix as critical issue so I went for upgrade. If I am not mistaken (searched for it in server settings), it says php version is  8.1.27.

Could contain: File, Page, Text, Webpage

 

Could contain: Page, Text

btw I just got a response from hosting provider.

 

Hello, 
 
The error you're encountering indicates an issue with type compatibility in PHP, specifically involving the IPS_DateTime::format method and its compatibility with the parent DateTime::format method. This issue is common when migrating to or using PHP 8.x, as it enforces stricter type declarations.
 
You or a developer can do a couple of things. For instance, you can modify the IPS_DateTime::format method in the source code to be compatible with the parent method in PHP 8.x. 
 
You can also either update the return type declaration to match the parent method or use the #[\ReturnTypeWillChange] attribute to suppress the notice temporarily. 
 
Though honestly, since the error stems from a third-party PHP application/library (indicated by IPS_ prefix, possibly Invision Power Services), it may be best to contact their support. They might have an updated version of the software that is fully compatible with PHP 8.x. or provide you with more information on how to resolve this issue. 

Must admit this is way over my head, I am not a web guy : /

 

 

Edited by Core4D
Posted
33 minutes ago, Marc Stridgen said:

What version are you upgrading from? Also what PHP version are you on?

See above

Posted

When going to the upgrade page, I am no longer seeing the issue about the date / time function but rather just a session issue:

We were unable to start a PHP session. You will need to contact your host to adjust your PHP configuration before you can continue. The error reported was: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/ea-php71)

If you are indeed running PHP 8.1, likely the path listed in your php.ini is incorrect for sessions as lists PHP 7.1: /var/cpanel/php/sessions/ea-php71

Please contact your hosting provider or server administrator to correct this and ensure that the path listed in the php.ini for sessions exists and is writable.

Posted (edited)
19 minutes ago, Jim M said:

When going to the upgrade page, I am no longer seeing the issue about the date / time function but rather just a session issue:

If I atempt to access admin cp I am greeted with this

Could contain: Page, Text, File

After clicking complete upgrade I get the same error as before

Could contain: File, Page, Text, Webpage

Not sure if we are accessing same thing?
In meantime, I asked my hosting provider to check but it is odd that you are getting different error than me.

 

Edited by Core4D
Posted
2 minutes ago, Core4D said:

Not sure if we are accessing same thing?

This is indeed the same place:

Could contain: Page, Text, File, Webpage

 

You can try exiting, clearing browser cache, and coming back in if you are not getting the above.

Posted
42 minutes ago, Jim M said:

You can try exiting, clearing browser cache,

Getting the same as you now. What should be entered in php.ini file? I located it on the server via cpanel file manager.

Posted
6 minutes ago, Core4D said:

Getting the same as you now. What should be entered in php.ini file? I located it on the server via cpanel file manager.

That would be for your hosting provider or server administrator to tell you as this is part of your PHP configuration, not the software configuration.

Posted (edited)

Maybe worth a try as I used to provide web hosting via cPanel in the past (no guarantee and pls make a backup of the file):

Can you check if in your local httpd root folder (the place where all the IPS files are located) has a file called php.ini? If so make a backup, delete this and in cPanel (Hosting Provider) change the PHP version again in cPanel. Sometimes cPanel puts a php.ini file in your local http docs folder which overrides the settings so if you do a upgrade in cPanel it gets not reflected properly.

 

Also, maybe check this guide from cPanel and see what the php.ini files reflects as version:
https://support.cpanel.net/hc/en-us/articles/1500010749301-Where-do-I-find-my-php-ini-or-user-ini-file

Edited by hyprem
Posted

@hyprem

Thanks, I tried it but no luck. Only php.ini file I found is located in public.html 

I tried to generate new in whm/cpanel and apply it but seems it takes no effect at all. Will see what hosting provider says : /

Posted

@Jim M

I got a response from my host. According to them the issue is not with them. Any chance you can check this?

 

Hello, 
 
In regards to what IPS has said:
 

If you are indeed running PHP 8.1, likely the path listed in your php.ini is incorrect for sessions as lists PHP 7.1: /var/cpanel/php/sessions/ea-php71

 
 
You can get this information by running the following:
 
grep "session.save_path" /opt/cpanel/ea-php81/root/etc/php.in
 

session.save_path = "/var/cpanel/php/sessions/ea-php81"
; (see session.save_path above), then garbage collection does not

This shows you that it is correct. 
 
This shows you that it's writable:
 
ls -ld /var/cpanel/php/sessions/ea-php81

drwx-wx-wt 2 root root 4096 May 3 03:36 /var/cpanel/php/sessions/ea-php81

 

Posted

I’m afraid, the software is pulling directly from your php configuration used for where the software is located. You will want to have them check if multiple versions are on your server or if you have a separate configuration file elsewhere causing this variation.

Posted

@Randy Calvert

Thanks, I tried copying into ipb but didn't help. Thread mentions user.ini file which is not present on the server in cpanel file manager. but it is present in search. That suggests I don't have permissions. Waiting for host to respond : /

Posted
18 minutes ago, Core4D said:

Thanks, I tried copying into ipb but didn't help.

What Randy is talking about would be on your server, not in our software. 

Posted
11 hours ago, Jim M said:

What Randy is talking about would be on your server, not in our software. 

Yes, I am aware of that. My host changed some php stuff, it works now!

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...