I'm using a Mac running Mojave as a dev server. I got Perl talking to MySQL but if I enable SIP, anything that accesses the database chokes. Simply disabling SIP fixes it. I have no idea what this could be or how to troubleshoot. The error in the log is simply:

End of script output before headers: index.pl

Here is additional info from the error_log:

[Thu Sep 05 10:54:07.672203 2019] [cgi:error] [pid 3708] [client ::1:49734] AH01215: [Thu Sep 5 10:54:07 2019] index.pl: install_driver(mysql) failed: Can't load '/Library/Perl/5.18/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Library/Perl/5.18/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle, 1): Library not loaded: libssl.1.0.0.dylib: /Users/HTM/Sites/npbeta/index.pl

[Thu Sep 05 10:54:07.672575 2019] [cgi:error] [pid 3708] [client ::1:49734] AH01215: [Thu Sep 5 10:54:07 2019] index.pl: Referenced from: /Library/Perl/5.18/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle: /Users/HTM/Sites/npbeta/index.pl

[Thu Sep 05 10:54:07.672820 2019] [cgi:error] [pid 3708] [client ::1:49734] AH01215: [Thu Sep 5 10:54:07 2019] index.pl: Reason: unsafe use of relative rpath libssl.1.0.0.dylib in /Library/Perl/5.18/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle with restricted binary at /System/Library/Perl/5.18/darwin-thread-multi-2level/DynaLoader.pm line 194.: /Users/HTM/Sites/npbeta/index.pl

Days of searching and nobody has an answer for this anywhere. The only option on Mojave is to disable SIP for the file system. Reboot and hold Command + R at the time, launch Terminal and do this:

csrutil enable --without fs

  • 1
    All that means is the perl file is incorrect. We would need more information. – mmmmmm Sep 5 '19 at 8:12
  • Where is mysql located? Maybe it needs to be moved. Enable permission for you app to access mysql. maybe you need to enable communications between mysql and your app. – historystamp Sep 5 '19 at 18:47
  • I've updated my question above with additional info in the error log. I think it has something to do with DBD::mysql. It runs fine if I disable SIP. – HTM Sep 5 '19 at 21:45
  • BTW mysql is located in /usr/local/mysql/bin/mysql – HTM Sep 5 '19 at 22:03
  • Thanks. @historystamp see my additional comments above. – HTM Sep 6 '19 at 2:09

You must log in to answer this question.

Browse other questions tagged .