Bug 219445

Summary: www/mod_auth_mysql_another segfaults when PHP mysql is compiled with ZTS (Thread-Safety)
Product: Ports & Packages Reporter: amistry
Component: Individual Port(s)Assignee: freebsd-apache (Nobody) <apache>
Status: Closed FIXED    
Severity: Affects Only Me CC: brnrd
Priority: --- Flags: bugzilla: maintainer-feedback? (apache)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Link against thread-safe libmysqlclient none

Description amistry 2017-05-22 03:06:06 UTC
Created attachment 182789 [details]
Link against thread-safe libmysqlclient

When this module is built and PHP is also build with ZTS (Thread-Safety) then this will cause Apache to segfault.   Forcing it to link against the _r thread-safe version of the libmysqlclient library fixes the problem.  A crude patch is attached, but there should be a better way to specify WITH_THREADS or something like that.
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-11-05 12:55:55 UTC
A commit references this bug:

Author: brnrd
Date: Sun Nov  5 12:55:03 UTC 2017
New revision: 453544
URL: https://svnweb.freebsd.org/changeset/ports/453544

Log:
  www/mod_auth_mysql_another: Fix runtime error with ZTS php

   - Linking regular libmysqlclient will segfault apache mod_php [1]
   - Fix building with MariaDB 10.2

  PR:		219445 [1]
  Submitted by:	amistry@am-productions.biz [1]
  With hat:	apache

Changes:
  head/www/mod_auth_mysql_another/Makefile
  head/www/mod_auth_mysql_another/files/patch-mod__auth__mysql.c
Comment 2 Bernard Spil freebsd_committer freebsd_triage 2017-11-05 12:58:01 UTC
Thanks!