Opened 10 years ago

Last modified 10 years ago

#45999 assigned enhancement

php, php_select: manage php-cgi, php-fpm, mod_php.so symlinks with php_select

Reported by: macjoost@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: php, php_select

Description

Currently, php_select manages the php, php-config and phpize symlinks (plus the manpages)

It would help me if also php-cgi symlinks were managed.

Attached a patch file for php_select and the current php versions.

Since there doesn't seem to be a php-cgi53 man page, it is omitted in that script.

Attachments (1)

add_php-cgi_to_select (2.7 KB) - added by macjoost@… 10 years ago.
add php-cgi and php-cgi manpage to php_select

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by macjoost@…

Attachment: add_php-cgi_to_select added

add php-cgi and php-cgi manpage to php_select

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to ryandesign@…
Port: php php_select added
Summary: manage php-cgi symlinks with php_selectphp, php_select: manage php-cgi symlinks with php_select

Thanks for the suggestion. In addition to your patch, the revisions of php_select and of the CLI SAPI subports would need to be increased. Also, I don't see a php-cgi52 man page either. I guess the man page was added in PHP 5.4.

However, note that the beauty of cgi and fpm is that unlike the apache2handler, you can use multiple versions at the same time in the same web server. For example, I could set up nginx to talk to multiple PHP FPM servers, and which PHP version it chooses could be based on anything, such as the hostname or a component of the path.

I'm not sure how I feel about using the "select" mechanism to switch the version of a server. Would you suggest that we add the apache2handler module to the "select" mechanism as well?

comment:2 Changed 10 years ago by macjoost@…

My need for the php and php-cgi "binaries" to be available and to be able to switch them easily come from using (others) unit tests which call these binaries.

I thought that, when php is handled, why not php-cgi? For me, it would primarily be a cli issue: switch php versions and run the tests again.

My web setup is similar to yours: Apache talking to several PHP FPMs.

comment:3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Status: newassigned
Summary: php, php_select: manage php-cgi symlinks with php_selectphp, php_select: manage php-cgi, php-fpm, mod_php.so symlinks with php_select
Version: 2.3.3

The question came up on the mailing list today whether "port select php" supports the Apache 2 handler. I suppose including the server SAPIs in the select mechanism would not affect those who want to set it up the way I use it, so there would be no downside.

Note: See TracTickets for help on using tickets.