Change of Php version with previous one

Hi.
I have errors such as:

Warning [2] preg_match(): Allocation of JIT memory failed,
PCRE JIT will be disabled.
This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory,
or set pcre.jit=0 - Line: 648 - File: admin/inc/functions.php PHP 7.4.11 (linux)

Warning [2] preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled.
This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory,
or set pcre.jit=0 - Line: 812 - File: admin/modules/user/groups.php PHP 7.4.11 (Linux)

Warning [2] preg_replace(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory,
or set pcre.jit=0 - Line: 1272 - File: inc/plugins/rexshop.php PHP 7.4.11 (Linux)

Warning [2] Use of undefined constant MODULE - assumed ‘MODULE’ (this will throw an Error in a future version of PHP) - Line: 11 - File: admin/modules/user/mybot.php PHP 7.4.11 (Linux)

Warning [2] preg_replace(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 - Line: 372 - File: admin/modules/config/questions.php PHP 7.4.11 (Linux)

set pcre.jit=0 - Line: 233 - File: inc/class_feedparser.php PHP 7.4.11 (linux

This is caused by Php , i found 6 errors for 5 min , if i search more i would find more.
i am not sure how to fix every file by few steps and not editing 100 files for example.
I fixed 1 or 2 files by adding pcre.jit=0
To fix everything i think version php 7.2 would be perfectly fine for me. How to change my php to previous?

If you know how to fix the current erros by editing few things and not 100 files ,tell me ,where is the boss file of php to add pcre.jit=0 and the problem to be solved.
Otherwise i prefer php version 7.2

Or if you know another solutions ,tell me please.
I would appreciate it.

The error messages tell you what to do:

… etc

Hello, thanks for your answer.
Yea on every error is showed location.
I am using mybb forum, php is connected with many files, that mean if I have 10 errors i need to fix 10 files, if I have 20 errors I need to fix 20 files. If I have 30 errors i need to fix 30 files and etc.

The faster solution on that problem is changing the php version with previous one.
So basically with one click you fixing every error for sure.
I didn’t know how to change the php version in dreamhost and I was curious if is other solutions available.
I did small research and I find how to change php version with previous one in dreamhost.
Every error is fixed now.

Thanks for your time and answer.

No, the solution is to fix the cause, not the effect. In this case the message is saying to “grant permission.” That will fix all those respective errors.

Yes, but that type of “fix” is transitory since PHP versions continue to evolve & you’ll be back to this problem soon. Again, fix the cause… which is your code in whatever script or plugin you’re using that is causing the PHP error.

Try quoting the error language and doing a few web searches to see how other’s have dealt with the issue.

I recently contacted DH support about this warning, and their suggestion is to set pcre.jit = 0 in your user’s phprc 7.4 file. That will make the setting apply to all PHP 7.4 sites under that user, so individual PHP files will not need to be modified. Here are DH instructions on editing phprc files:

https://help.dreamhost.com/hc/en-us/articles/214894037

It is mildly annoying that DH isn’t turning off pcre.jit globally for all PHP 7.4+ sites. I’m not looking forward to having to set this in my half-dozen user account, using a variety of different PHP versions…

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.