Skip to content

Instantly share code, notes, and snippets.

@tom-monaco
Last active August 29, 2015 14:05
Show Gist options
  • Save tom-monaco/90076b6b546e760a7bf3 to your computer and use it in GitHub Desktop.
Save tom-monaco/90076b6b546e760a7bf3 to your computer and use it in GitHub Desktop.
Fixes missing gzopen by replacing it with gzopen64. Credit goes to the Piwik team - I borrowed this code from one of their commits.
<?php
/**
* On ubuntu in some cases, there is a bug that gzopen does not exist and one must use gzopen64 instead
* Credit goes to the piwik team for this.
*/
if (!function_exists('gzopen')
&& function_exists('gzopen64')) {
function gzopen($filename , $mode = 'r', $use_include_path = 0 )
{
return gzopen64($filename , $mode, $use_include_path);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment