Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hey everyone.

Been banging my head on this one a bit.

Am on an M2 Mac, and this test script will cause a crash if accessed via php-fpm, but runs fine php cli. Has anyone run into this?

<?php

echo gettext("Hello there");

Running /opt/homebrew/opt/php@7.4/sbin/php-fpm --nodaemonize while doing this yields:

[24-Jul-2023 14:17:12] WARNING: [pool www] child 10691 exited on signal 11 (SIGSEGV) after 3.445288 seconds from start

Conversely, changing that script to a simple:

<?php

echo "Hello there";

or

<?php

phpinfo();

Works as expected.

Thanks!

You must be logged in to vote

Replies: 2 comments

Comment options

I am running into the same issue. I've tried it against php@8.2 and php@8.3 and it's the same. I'm running an M3 Max.

echo gettext("hello");

This will always trigger it.

Putting putenv("LC_ALL=C"); above the echo line above will make it work, however that doesn't solve my actual main issue.

My main issue is that installing mongodb makes php stop working entirely with:
[Tue Jan 16 15:29:54.667430 2024] [core:notice] [pid 59504] AH00052: child pid 59509 exit signal Segmentation fault (11)

I need the mongo driver for a project I'm working on, but when installed apache/php doesn't work anywhere, even scripts that don't call mongo. I think the mongo error and the gettext error are related.

Any ideas on how to fix this? I'm on my second day trying to fix this.

You must be logged in to vote
0 replies
Comment options

Well, looks like this is back. I'm on Sequoia 15.4, this repo's PHP 7.4, and the old modification that used to fix this (of the home-brew launch file):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>EnvironmentVariables</key>
        <dict>
            <key>OBJC_DISABLE_INITIALIZE_FORK_SAFETY</key>
            <string>YES</string>
        </dict>
        <key>KeepAlive</key>

No longer seems to do the trick.

Adding putenv("LC_ALL=C"); does seem to band-aid things for now.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.