PHP Path

edited May 2015 in General
Hello, My installation of Cumulus went excellent. No problems at all. Everything is running excellent. My only problem at present, is that Cumulus can not find the path to php neither can I, so uploading of videos keeps disable. I tried several paths... without success (I did find the path to ffmpeg without trouble). My site is on a Linux server and I do have php5.2.17. I did run a script containing the snippet in my browser <?php phpinfo(); ?> and got a good response with all the info, but none of the paths indicated there seems to work (I specially tried the one under Loaded Configuration) Any suggestions to find the path??? or any suggestions for a work around if not finding the path? as for instance using a plugin or installing php-cli on the same directory of cumulus?? Thank you very much

Comments

  • Can you post a link to your php info file so that we can see if we can help?

    Typically it's:

    /usr/bin/php
    or /usr/local/bin/php
    or /usr/bin/php-cli
    or /usr/local/bin/php-cli

    Try running this command from the command prompt:

    which php-cli
  • here is a link to my php info file:
    http://www.grinfeld.com/ini.php
  • Damian, thank you for your great help. I have tried those path options you suggested, without success. I have created and posted a link for you to be able to see my php info file. What is your suggestion as a next step? Is there any work around as for instance a plugin or service to access the command line interface? Thanks again, Mario Grinfeld
  • I reviewed your info file, I couldn't see what I was looking for. You need to ask your webhost what the complete path is to your php-cli binary.

    What was the output of
    which php
    And
    which php-cli
  • Damian, once again, thank you for your help. I do not have shell access to the server and its command line. The following script:

    <?php
    $inipath = php_ini_loaded_file();

    if ($inipath) {
    echo 'Loaded php.ini: ' . $inipath;
    } else {
    echo 'A php.ini file is not loaded';
    }
    ?>

    Gave me the response you can see at the following link:

    http://www.grinfeld.com/temp_result_2.php

    This other script:

    <?php
    if ($filelist = php_ini_scanned_files()) {
    if (strlen($filelist) > 0) {
    $files = explode(',', $filelist);

    foreach ($files as $file) {
    echo "" . trim($file) . "\n";
    }
    }
    }
    ?>

    Gave me the response you can see at the following link:

    http://www.grinfeld.com/temp_result_3.php

    I hope we will be able to find a solution at the PHP path issue and continue forward with the first tests uploading videos, Cumulusclips rocks!!
  • Create a php file with the following contents, the provide us with the link to it:

    <?php

    exec("which php", $results);
    print_r($results);

    exec("which php-cli", $results);
    print_r($results);

    exec("whereis php", $results);
    print_r($results);

    exec("whereis php-cli", $results);
    print_r($results);
  • edited May 2015
    Update the code I gave you earlier so that it includes the following:

    <?php

    ini_set('display_errors', 1);
    error_reporting(E_ALL);

    ...previous code...
  • Here are the results with the updated script:
    http://www.grinfeld.com/temp_result_4.php
  • Your web host has disabled use of the exec function. This is a big problem as it is used to trigger video encoding. I don't think your web host supports video encoding scripts. Who are you hosting with?
  • An outstanding company, AVATAVA, I am with them since more than 16 years ago, excellent service. I just wrote them about this issue, I am waiting for their response. They will probably provide me a solution at their end in regards to those hosting parameters. They are very strong, among other aspects, in all which has to do with security.

    --- Meanwhile, - and perhaps I should open another discussion in this regards - do you have, or recommend a plugin which would allow me to start using Cumulusclips as a video library for videos hosted in other platforms? I know there are other solutions just for video library platforms, but I like cumulusclips so much that I truly desire to continue building the integration of the video section of my website (by the way very popular website) with Cumulusclips. Thanks for your advise ---
  • edited May 2015
    I'm not questioning whether your web host is good or not, I'm sure they are. However I must inform you that it looks like they don't support our software. The reason being are the following:

    - You need to be able to run 'exec' functions from PHP. This is essential to video encoding

    - Video encoding requires high amounts of RAM & CPU utilization. Most shared web hosts stop scripts from consuming too much RAM & CPU on their servers. This would be a problem.

    - You need FFMEPG installed on the server to convert the videos to the various output formats needed by the script. Only specialized web hosts or dedicated servers can do this.

    If your web host's shared hosting environment misses any of the above points then they are not compatible with our script. However, there is another way. If they provide VPS, cloud server, or dedicated servers then you could use that instead. Any environment where you have root privileges to the server will work. This would allow you to stay with your current provider.

    ------------

    External Videos

    There isn't any type of plugin for this. It is possible to display videos hosted other locations. There are two things you need be aware of:

    1) All new videos added to CumulusClips will need to manually approved via the database. This is because the system expects the video to be uploaded and encoded. Since this won't be the case, you need to manually circumvent that.

    2) You need to update the theme and possibly the database to reference the external location where the videos are stored.

    In a nutshell that is what needs to occur to display & manage videos from external places. It's a little hacky, but like I said the system is meant to be all purpose not just for library management.
  • Thank you Damian for the detail explanation. I will certainly keep you posted on the development.
  • In regards to External Videos:
    While I wait for a solution to my hosting problem... what (temporary) changes should I made to the script code to be able to access the video upload pages which show me now the "video uploads are disable..." page? in a way that I would be able to start building the video library function...
  • You will need to create a form that has fields for video name, tags, description, category id, and external url. When submitted validate the data and insert into the database and mark it as approved. You also need to modify the videos table to add a field for external url for each video. You can use dummy data for the required fields you're not using i.e. filename.

    You can stick this form on a web page you have access to.

    That should be all that is needed. You can tweak this further for your own needs as this was just quick and dirty.
  • for the following script:

    <?php
    $inipath = php_ini_loaded_file();

    if ($inipath) {
    echo 'Loaded php.ini: ' . $inipath;
    } else {
    echo 'A php.ini file is not loaded';
    }
    ?>

    I got:

    Loaded php.ini: /var/hsphere/local/config/httpd/php5/php.ini

    And for the following script:

    <?php
    if ($filelist = php_ini_scanned_files()) {
    if (strlen($filelist) > 0) {
    $files = explode(',', $filelist);

    foreach ($files as $file) {
    echo "" . trim($file) . "\n";
    }
    }
    }
    ?>

    I got:

    /hsphere/local/config/httpd/php5/php.d/bcmath.ini
    /hsphere/local/config/httpd/php5/php.d/calendar.ini
    /hsphere/local/config/httpd/php5/php.d/curl.ini
    /hsphere/local/config/httpd/php5/php.d/dbase.ini
    /hsphere/local/config/httpd/php5/php.d/exif.ini
    /hsphere/local/config/httpd/php5/php.d/fileinfo.ini
    /hsphere/local/config/httpd/php5/php.d/gmp.ini
    /hsphere/local/config/httpd/php5/php.d/htscanner.ini
    /hsphere/local/config/httpd/php5/php.d/iconv.ini
    /hsphere/local/config/httpd/php5/php.d/imagick.ini
    /hsphere/local/config/httpd/php5/php.d/imap.ini
    /hsphere/local/config/httpd/php5/php.d/ldap.ini
    /hsphere/local/config/httpd/php5/php.d/mailparse.ini
    /hsphere/local/config/httpd/php5/php.d/mysql.ini
    /hsphere/local/config/httpd/php5/php.d/mysqli.ini
    /hsphere/local/config/httpd/php5/php.d/ncurses.ini
    /hsphere/local/config/httpd/php5/php.d/oauth.ini
    /hsphere/local/config/httpd/php5/php.d/odbc.ini
    /hsphere/local/config/httpd/php5/php.d/pcntl.ini
    /hsphere/local/config/httpd/php5/php.d/pdo.ini
    /hsphere/local/config/httpd/php5/php.d/pdo_mysql.ini
    /hsphere/local/config/httpd/php5/php.d/pdo_pgsql.ini
    /hsphere/local/config/httpd/php5/php.d/pdo_sqlite.ini
    /hsphere/local/config/httpd/php5/php.d/pgsql.ini
    /hsphere/local/config/httpd/php5/php.d/pspell.ini
    /hsphere/local/config/httpd/php5/php.d/shmop.ini
    /hsphere/local/config/httpd/php5/php.d/soap.ini
    /hsphere/local/config/httpd/php5/php.d/sqlite.ini
    /hsphere/local/config/httpd/php5/php.d/sysvmsg.ini
    /hsphere/local/config/httpd/php5/php.d/sysvsem.ini
    /hsphere/local/config/httpd/php5/php.d/sysvshm.ini
    /hsphere/local/config/httpd/php5/php.d/xmlrpc.ini
    /hsphere/local/config/httpd/php5/php.d/zip.ini
    /hsphere/local/config/httpd/php5/php.d/zmnogosearch.ini
  • for the following script:

    <?php
    $inipath = php_ini_loaded_file();

    if ($inipath) {
    echo 'Loaded php.ini: ' . $inipath;
    } else {
    echo 'A php.ini file is not loaded';
    }
    ?>

    I got:

    Loaded php.ini: /var/hsphere/local/config/httpd/php5/php.ini

    And for the following script:

    <?php
    if ($filelist = php_ini_scanned_files()) {
    if (strlen($filelist) > 0) {
    $files = explode(',', $filelist);

    foreach ($files as $file) {
    echo "" . trim($file) . "\n";
    }
    }
    }
    ?>

    I got:

    /hsphere/local/config/httpd/php5/php.d/bcmath.ini
    /hsphere/local/config/httpd/php5/php.d/calendar.ini
    /hsphere/local/config/httpd/php5/php.d/curl.ini
    /hsphere/local/config/httpd/php5/php.d/dbase.ini
    /hsphere/local/config/httpd/php5/php.d/exif.ini
    /hsphere/local/config/httpd/php5/php.d/fileinfo.ini
    /hsphere/local/config/httpd/php5/php.d/gmp.ini
    /hsphere/local/config/httpd/php5/php.d/htscanner.ini
    /hsphere/local/config/httpd/php5/php.d/iconv.ini
    /hsphere/local/config/httpd/php5/php.d/imagick.ini
    /hsphere/local/config/httpd/php5/php.d/imap.ini
    /hsphere/local/config/httpd/php5/php.d/ldap.ini
    /hsphere/local/config/httpd/php5/php.d/mailparse.ini
    /hsphere/local/config/httpd/php5/php.d/mysql.ini
    /hsphere/local/config/httpd/php5/php.d/mysqli.ini
    /hsphere/local/config/httpd/php5/php.d/ncurses.ini
    /hsphere/local/config/httpd/php5/php.d/oauth.ini
    /hsphere/local/config/httpd/php5/php.d/odbc.ini
    /hsphere/local/config/httpd/php5/php.d/pcntl.ini
    /hsphere/local/config/httpd/php5/php.d/pdo.ini
    /hsphere/local/config/httpd/php5/php.d/pdo_mysql.ini
    /hsphere/local/config/httpd/php5/php.d/pdo_pgsql.ini
    /hsphere/local/config/httpd/php5/php.d/pdo_sqlite.ini
    /hsphere/local/config/httpd/php5/php.d/pgsql.ini
    /hsphere/local/config/httpd/php5/php.d/pspell.ini
    /hsphere/local/config/httpd/php5/php.d/shmop.ini
    /hsphere/local/config/httpd/php5/php.d/soap.ini
    /hsphere/local/config/httpd/php5/php.d/sqlite.ini
    /hsphere/local/config/httpd/php5/php.d/sysvmsg.ini
    /hsphere/local/config/httpd/php5/php.d/sysvsem.ini
    /hsphere/local/config/httpd/php5/php.d/sysvshm.ini
    /hsphere/local/config/httpd/php5/php.d/xmlrpc.ini
    /hsphere/local/config/httpd/php5/php.d/zip.ini
    /hsphere/local/config/httpd/php5/php.d/zmnogosearch.ini
  • Hello Damian, I know there are not plugins for the external videos adding capability. Are you planning to create one? I think it would be an excellent addition to CumulusClips. I also know that if done by you it would certainly be an excellent and clean plugin for that purpose. Thank you for letting me know.
This discussion has been closed.