Use MacPorts PHP-FPM instead of from build

43
March 14, 2019, at 10:00 PM

I've used MacPorts to install apache2, php73 and php73-fpm on MacOS Mojave. I've updated by .bash_profile to reflect the new MacPorts paths like so:

export PATH="/opt/local/bin:/opt/local/sbin:$PATH"

I've refreshed my .bash_profile by running:

. ~/.bash_profile

Running which php and which httpd in Terminal both output the correct paths:

/opt/local/bin/php
/opt/local/sbin/httpd

And running php -v and httpd -v both indicate that the MacPorts Apache and PHP are running.

However, I can't switch to the MacPorts php73-fpm that I installed. which php-fpm still returns the default OS build path:

/usr/sbin/php-fpm

How can I get the MacPorts php73-fpm running instead of the build php-fpm?

Answer 1

First thing to do is to check port's content:

$ port contents php73-fpm
Port php73-fpm contains:
  /Library/LaunchDaemons/org.macports.php73-fpm.plist
  /opt/local/etc/LaunchDaemons/org.macports.php73-fpm/org.macports.php73-fpm.plist
  /opt/local/etc/php73/php-fpm.conf.default
  /opt/local/etc/php73/php-fpm.d/www.conf.default
! /opt/local/sbin/php-fpm73
  ...

So, as we can see port's executable is called php-fpm73, not php73-fpm

READ ALSO
Reduce memory usage for big database calls php

Reduce memory usage for big database calls php

I am using this script to cross reference data so that I can retrieve the right data from the database which requires 3 checks of which 2 are run within a for loop

54
Trying to Create WP Category Archive on Site the Uses Timber and AJAX Load More Plugin

Trying to Create WP Category Archive on Site the Uses Timber and AJAX Load More Plugin

I inherited a Wordpress website that uses the Timber templating engineI'm not overly familiar with Timber, but I've been able to learn enough to make simple edits to this point

20
How can I receive and parse my mails with php? [on hold]

How can I receive and parse my mails with php? [on hold]

I need to automate checking my emails and parsing information out of the headers with a PHP script, preferably in WordPressHow can I possibly do that? I am a bit of a noob, please help

39
curl semrush php API display_date

curl semrush php API display_date

i have this API request everything is working fine but two things thing when i add the display_date to the url the localhost and the hosting server give me this error efoodsdirectcom ERROR 612 :: Invalid display_date parameter, must be in format YYYYMM15...

31