Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patching archive.sh for other names of php-binaries than "php5" #831

Closed
anonymous-matomo-user opened this issue Jun 26, 2009 · 7 comments
Closed
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@anonymous-matomo-user
Copy link

On my Gentoo-System i've ran into a problem with archive.sh as there is no binary named "php5" available.

Attached you can find a patch for this issue. The new patch searches for a binary named "php". If there is no "php5" and no "php" available, then it fails with a message.
Keywords: Archiving

@robocoder
Copy link
Contributor

I may not have had my morning coffee yet, but I don't see a patch...

@anonymous-matomo-user
Copy link
Author

Attachment: Patch against 0.4.1
831-archive.sh-against-0.4.1-1.patch

@anonymous-matomo-user
Copy link
Author

Sorry, somehow forgot to press submit :P

@anonymous-matomo-user
Copy link
Author

Attachment: Added suppressing of error-messages
831-archive.sh-against-0.4.1-2.patch

@anonymous-matomo-user
Copy link
Author

I've seen an error when "which" cannot find the binary:

~# which php5
which: no php5 in (/sbin:/bin:/usr/sbin:/usr/bin)

This is now suppressed with version 2 of the patch. Sorry for the update, didn't recognize this in the first version.

The difference between Version 1 & 2:

--- piwik/misc/cron/archive.sh  2009-06-28 10:02:09.000000000 +0200
+++ misc/cron/archive.sh        2009-06-28 09:50:59.000000000 +0200
@@ -19,10 +19,10 @@
 # time_before_archive_considered_outdated = 3600
 # enable_browser_archiving_triggering = false

-PHP_BIN=`which php5`
+PHP_BIN=`which php5 2>/dev/null`
 if test -z $PHP_BIN; then
   # Probably only know as 'php'
-  PHP_BIN=`which php`
+  PHP_BIN=`which php 2>/dev/null`
   if test -z $PHP_BIN; then
      # No php available?
      `logger -s -t "Piwik" "ERROR: No binary for php available! Aborting archiving`

@robocoder
Copy link
Contributor

(In [1267]) Fixes #831 - check for alternate php binary; also simplify retrieval of token_auth for sh lacking substring replacement

@pebosi
Copy link
Contributor

pebosi commented Sep 8, 2009

Attachment:
piwik-831.patch

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik 0.4.2 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

3 participants