Friendica and the PHP command line binary

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by forevern, Feb 13, 2015.

  1. forevern

    forevern New Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hello everyone!

    I'm trying to install an friendica instance. To run cron jobs I need to tell the script the path of the PHP command line binary.

    https://x10hosting.com/wiki/Cron_job

    This site tells me the path is located at "/usr/bin/php" or "/usr/local/bin/php".
    I tried both, but the script tells me it cannot find the command line.

    I have the option to this field empty and use external cron jobs but this isn't really a good solution. However, if I leave this field - asking for the binary - empty, the script continues to install, so It seems there is no mistake in the scripts.

    So if anybody can give me suggestions on what to do I would be very happy!
     
  2. leafypiggy

    leafypiggy Manager of Pens and Office Supplies Staff Member

    Messages:
    3,819
    Likes Received:
    162
    Trophy Points:
    63
    the PHP binary is located at /usr/local/bin/php
     
  3. forevern

    forevern New Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    hmmm really strange, the script says it cannot find the php binary under /usr/local/bin/php

    Is somebody here who already installed friendica here?
     
  4. forevern

    forevern New Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I read through the starter documentation of friendica (again) and saw that "register_argc_argv" must be enabled, so that the command line can be used.
    After an "print_r(ini_get_all())" command, the output showed me that this variable isn't set ("[register_argc_argv] => [report_memleaks] => 1").

    Maybe this is why the script cannot find the command line under "/usr/local/bin/php"
    Is it possible to set "register_argc_argv" to 1?
     
  5. Skizzerz

    Skizzerz Contributors Staff Member Contributors

    Messages:
    2,929
    Likes Received:
    117
    Trophy Points:
    63
    Hello,

    When running the CLI version of PHP (which is what cron jobs use), register_argv_argc is unconditionally enabled regardless of the php.ini setting -- check for the $argc and $argv variables to see what I mean.

    The install script for Friendica looks like it has some sort of other check that is failing for some reason. You may wish to contact their support to see if they can provide any additional assistance.
     

Share This Page