Bug 219445 - www/mod_auth_mysql_another segfaults when PHP mysql is compiled with ZTS (Thread-Safety)
Summary: www/mod_auth_mysql_another segfaults when PHP mysql is compiled with ZTS (Thr...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-apache (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-22 03:06 UTC by amistry
Modified: 2017-11-05 12:58 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (apache)


Attachments
Link against thread-safe libmysqlclient (310 bytes, patch)
2017-05-22 03:06 UTC, amistry
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!