News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

PHP version

Started by Sido, December 06, 2021, 03:12:07 AM

Previous topic - Next topic

Sido

Hello guys!

Sorry if this was answered before, but i couldn't find via search any right information.

From what i've read so far smf 2.1 RC4 should be able to run on php 8 or at least 7.4 but for me it does not, or at least not perfectly.

these are some errors i get while trying to view or edit user profiles.

Fatal error: Uncaught Error: Call to undefined function url_exists() in /var/home/xtr/acis.i-live.eu/Sources/Subs.php:5640 Stack trace: #0 /var/home/xtr/acis.i-live.eu/Sources/Subs.php(5679): get_mime_type('https://i.imgur/...', true) #1 /var/home/xtr/acis.i-live.eu/Sources/Profile-Modify.php(3473): check_mime_type('https://i.imgur/...', 'image/', true) #2 /var/home/xtr/acis.i-live.eu/Sources/Profile-Modify.php(822): profileSaveAvatarData('external') #3 /var/home/xtr/acis.i-live.eu/Sources/Profile.php(725): saveProfileFields() #4 /var/home/xtr/acis.i-live.eu/index.php(187): ModifyProfile() #5 {main} thrown in /var/home/xtr/acis.i-live.eu/Sources/Subs.php on line 5640

Kindred

#1
which version of RC4 are you using?   The one which was released several months ago or the updated one from github?

If you are running an RC version, your best bet is to update to the github nightly and recheck, since we are continually making updates in the RC to fix issues and get us closer to the final release

(I can not replicate your problem, using either 7.4 or 8 )
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sido

#2
i currently use the one from downloads (public), but also tried with the git one. still the same problem.

after some more tests. on php 7.4 it seems that i got this problem with EDITING forum profiles, better said,  Specify avatar by URL. if the member i'm editing it's profile got a specified url avatar, i will get that error when i try to save it.

Quoteon php 8 it happens when visiting the profile too

Fatal error: Uncaught Error: Call to undefined function shell_exec() in /var/home/xtr/acis.i-live.eu/Sources/Subs.php:4593 Stack trace: #0 /var/home/xtr/acis.i-live.eu/Sources/Profile-View.php(90): host_from_ip() #1 /var/home/xtr/acis.i-live.eu/Sources/Profile.php(812): summary() #2 /var/home/xtr/acis.i-live.eu/index.php(187): ModifyProfile() #3 {main} thrown in /var/home/xtr/acis.i-live.eu/Sources/Subs.php on line 4593

i searched for a member (in normal or member search)  and then click on name (to get on his profile)
this problem i had seems to be solved by Admin -> Maintenance -> Server -> General -> Disable hostname lookups

Sido

Sorry for double post but wanted to bump this up as i think i solved it.

i took a look into what settings i had for php and what smf needs and this seemed to fix it.

reset settings of php8

enable:
mbstring
(without it my forum had a long error)

enable:
fileinfo

disable_functions:
safe_mode
(this fied the forum avatars problem)

while i still had some errors while trying to use .png format images in links, and forum members avatars where not displayed, after some more page refreshes it got fixed.



what i need right now is a clean list of smf php requirements.

shawnb61

#4
You are correct - you will see that behavior if fileinfo is not enabled.  It fails pretty hard...

Enabling fileinfo is already listed on the system requirements for 2.1:
https://wiki.simplemachines.org/smf/SMF2.1:Requirements_and_recommendations

The installer and upgrader already issue warnings if mbstring is not enabled.  (I just added mbstring on the requirements page.)

safe_mode was removed completely as of php 5.4...  Not sure how that impacted anything...  But disabling safe_mode is also listed on the requirements page.

I logged an issue to have the installer & upgrader check for fileinfo and issue a warning:
https://github.com/SimpleMachines/SMF2.1/issues/7175
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sido

Quote from: shawnb61 on December 06, 2021, 03:29:14 PMsafe_mode was removed completely as of php 5.4...  Not sure how that impacted anything...  But disabling safe_mode is also listed on the requirements page.
maybe it was just me, and i say this because:

-in my above post i first said:  disable suExec
then when i re-read requirements in order to find other things i miss, i realize that i should have enabled suExec and disable safe mode instead.
-so i did that and since nothing bad happened, i concluded that it still fix the problem and came here to edit my post saying safe mode should be disabled   :laugh:  :laugh:  :laugh:

Sido

I'm bumping this up as i found some more problems.

With PHP 8.0 forum is not sending mails anymore.
-using Mail type PHP, when sending a test mail, it says it was successfully sent, but in reality it does nothing. I changed to PHP 7.4 and it's working again.

About Mail type SMTP (no matter the PHP version)
-Unable to send a test message, check the error log for more information.
-Error: Could not get mail server response codes

Any ideas ?

Advertisement: