Subject: Re: bug#76955: 30.1; php-ts-mode-php-executable default path may not match remote path

From: Eli Zaretskii <[email-masked]>
Date: Wed, 12 Mar 2025 14:50:03 +0200

> Cc: Vincenzo Pupillo <[email-masked]>
> From: Morgan Willcock <[email-masked]>
> Date: Tue, 11 Mar 2025 20:09:37 +0000
> 
> 
> 
> The default value of php-ts-mode-php-executable is determined by
> searching for a php binary locally, but the found path may not work for
> TRAMP connections to a remote system:
> 
>   (defcustom php-ts-mode-php-executable (or (executable-find "php") "/usr/bin/php")
> 
> Would it not be more portable to just set the executable path to "php"
> and then let a binary named "php" be located both locally and remotely?

Does it help to use this instead:

  (defcustom php-ts-mode-php-executable
     (or (executable-find "php" t) "/usr/bin/php")