Menu

#211 PHP binary should be selectable (or php-cli should be preferred)

Next_Release
open
nobody
None
1
2014-05-14
2014-05-14
No

On unix based systems, the path to the PHP binary should be able to be set using the config, or alternatively it should prefer the php-cli binary to the php binary, as in situations where PHP CGI may be used then the SAPI handlers cause the default php script handler to not return the CLI SAPI use.

Possible patch below:

--- phpipam/functions/functions-common.php  2014-03-11 22:47:15.000000000 +1100
+++ public_html/functions/functions-common.php  2014-05-14 13:32:44.185955931 +1000
@@ -900,6 +900,11 @@
    }

    //unix
+   //prefer php-cli to php
+   $php_executable = PHP_BINDIR."/php-cli";
+        if (file_exists($php_executable) && is_file($php_executable)) {
+                return $php_executable;
+        }
    $php_executable = PHP_BINDIR."/php";
    if (file_exists($php_executable) && is_file($php_executable)) {
        return $php_executable;

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.