- Posts: 28
Question Fatal error
- spark43
- Topic Author
- Offline
- New Member
It suggests setting pcre.jit=0 in ServerRequestCreator.php but I can't find any reference to pcre.jit in the file.
Can anyone suggest where to change this?
Webtrees ver 2.1 and PHP ver 7.4.
Thanks
David
webtrees 2.1.20
MySQL-Version: 8.2.12
PHP-Version: 8.2.12
Win 10
Please Log in or Create an account to join the conversation.
- xmlf
- Offline
- Junior Member
Here are the solutions for the error "Fatal error: Uncaught ErrorException: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled.":
- Increase PHP Memory Limit:
- If your PHP script is unable to allocate enough memory for PCRE JIT due to memory limits, you can try increasing PHP's memory limit. In your
Code:php.iniCode:memory_limit
Code:memory_limit = 256M - Alternatively, you can temporarily increase the memory limit in your script using the
Code:ini_set()
Code:ini_set('memory_limit', '256M');
- If your PHP script is unable to allocate enough memory for PCRE JIT due to memory limits, you can try increasing PHP's memory limit. In your
- Disable PCRE JIT:
- If the issue persists and you do not need the performance boost from PCRE's JIT compilation, you can consider disabling PCRE JIT. In your
Code:php.iniCode:pcre.jit
Code:pcre.jit=0 - With JIT disabled, regular expression matching will not use JIT compilation, which may be slightly slower but will avoid memory allocation issues.
- If the issue persists and you do not need the performance boost from PCRE's JIT compilation, you can consider disabling PCRE JIT. In your
Wang Family Website of Suining County, China
www.snwsjz.com
A family tree website that is customized, more humanized and convenient for users.
Please Log in or Create an account to join the conversation.
- kiwi
- Offline
- Platinum Member
- spark43
- Topic Author
- Offline
- New Member
- Posts: 28
Unfortunately my host is Plusnet and they have abandoned help for their free webspace.
However I still have access to php.ini via their Control Panel.
I tried adding the code suggested by xmif but still get the same error message.
This is my php.ini:
safe_mode=Off
display_errors=On
upload_max_filesize=2M
post_max_size=8M
max_execution_time=120
memory_limit=256M
pcre.jit=0
Is there anything in it that would cause the error?
Thanks again
David
webtrees 2.1.20
MySQL-Version: 8.2.12
PHP-Version: 8.2.12
Win 10
Please Log in or Create an account to join the conversation.
- fisharebest
- Away
- Administrator
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- spark43
- Topic Author
- Offline
- New Member
- Posts: 28
webtrees 2.1.20
MySQL-Version: 8.2.12
PHP-Version: 8.2.12
Win 10
Please Log in or Create an account to join the conversation.
- fisharebest
- Away
- Administrator
Do you get the same error?
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- spark43
- Topic Author
- Offline
- New Member
- Posts: 28
webtrees 2.1.20
MySQL-Version: 8.2.12
PHP-Version: 8.2.12
Win 10
Please Log in or Create an account to join the conversation.
- fisharebest
- Away
- Administrator
You often need a separate php.ini for each PHP version.
To be 100%, create a phpinfo() file.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- spark43
- Topic Author
- Offline
- New Member
- Posts: 28
you could be right.
When I tried phpinfo() I got the following error:
Fatal error: Uncaught Error: Call to undefined function phpinfo() in /services5/util/c/c/ccgi.username.plus.com/public/phpinfo().php:2 Stack trace: #0 {main} thrown in /services5/util/c/c/ccgi.username.plus.com/public/phpinfo().php on line 2
Thanks
David
webtrees 2.1.20
MySQL-Version: 8.2.12
PHP-Version: 8.2.12
Win 10
Please Log in or Create an account to join the conversation.
- bertkoor
- Offline
- Platinum Member
- Greetings from Utrecht, Holland
[...] my host [...] have abandoned help for their free webspace.
"If someone offers you a free lunch, you are the lunch"
When I tried phpinfo() I got the following error:
Fatal error: Uncaught Error: Call to undefined function phpinfo()
This is without a php.ini file taking effect, possibly breaking things?
Looks like they did not only stop support, but have also crippled the installation beyond barely usable.
My advice: look for another web hosting provider.
It does not need to be expensive.
For my (shared) web hosting I pay 25 or 30 EUR per year.
That is less than one take-away coffee per month.
stamboom.BertKoor.nl runs on webtrees v2.1.20
Please Log in or Create an account to join the conversation.
- fisharebest
- Away
- Administrator
Try the following script instead?
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- spark43
- Topic Author
- Offline
- New Member
- Posts: 28
string(1) "1"
Does this tell you anything?
I'm beginning to agree with bertkoor, maybe its time to move to a more responsible web host.
webtrees 2.1.20
MySQL-Version: 8.2.12
PHP-Version: 8.2.12
Win 10
Please Log in or Create an account to join the conversation.
- fisharebest
- Away
- Administrator
Yes. It tells me that either
1) You have put the line "pcre.jit=0" in the wrong php.ini file. (Each version of PHP has its own file.)
2) Your webhost doesn't allow you to use php.ini files, and all the settings are ignored.
If (1), then you may be able to get your site working again. If (2), I think you may be out of luck.
> I'm beginning to agree with bertkoor
Your sig says you are using MySQL 5.5. This reached end-of-live in 2018. This will likely cause more issues in the future.
I also agree with bertkoor...
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- spark43
- Topic Author
- Offline
- New Member
- Posts: 28
I can't change anything and Plusnet won't talk to me so its time to move on.
Thanks again for all your help.
David
webtrees 2.1.20
MySQL-Version: 8.2.12
PHP-Version: 8.2.12
Win 10
Please Log in or Create an account to join the conversation.