diff --git a/callback.php b/callback.php index aaf56f089..939ec9383 100644 --- a/callback.php +++ b/callback.php @@ -16,7 +16,7 @@ $enabled = dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'enabled'" if ($enabled == 1) { if (dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'uuid'") == '') { - dbInsert(array('name'=>'uuid','value'=>uniqid()),'callback'); + dbInsert(array('name'=>'uuid','value'=>guidv4()),'callback'); } $uuid = dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'uuid'"); diff --git a/doc/Installation/Installation-(Debian-Ubuntu).md b/doc/Installation/Installation-(Debian-Ubuntu).md index e05bd87d7..5810b271e 100644 --- a/doc/Installation/Installation-(Debian-Ubuntu).md +++ b/doc/Installation/Installation-(Debian-Ubuntu).md @@ -42,7 +42,7 @@ This host is where the web server and SNMP poller run. It could be the same mac Install the required software: - apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-snmp php5-pear php5-curl snmp graphviz php5-mcrypt php5-json apache2 fping imagemagick whois mtr-tiny nmap python-mysqldb snmpd mysql-client php-net-ipv4 php-net-ipv6 rrdtool git + apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-snmp php-pear php5-curl snmp graphviz php5-mcrypt php5-json apache2 fping imagemagick whois mtr-tiny nmap python-mysqldb snmpd mysql-client php-net-ipv4 php-net-ipv6 rrdtool git The packages listed above are an all-inclusive list of packages that were necessary on a clean install of Ubuntu 12.04/14.04. diff --git a/doc/Installation/Installation-Lighttpd-(Debian-Ubuntu).md b/doc/Installation/Installation-Lighttpd-(Debian-Ubuntu).md index fb338cb2e..a39f6d43b 100644 --- a/doc/Installation/Installation-Lighttpd-(Debian-Ubuntu).md +++ b/doc/Installation/Installation-Lighttpd-(Debian-Ubuntu).md @@ -37,7 +37,7 @@ Change `127.0.0.1` to the IP address that your MySQL server should listen on. R Install necessary software. The packages listed below are an all-inclusive list of packages that were necessary on a clean install of Debian 7. - apt-get install lighttpd php5-cli php5-mysql php5-gd php5-snmp php5-cgi php5-pear php5-curl snmp graphviz mysql-server mysql-client rrdtool sendmail fping imagemagick whois mtr-tiny nmap ipmitool php5-mcrypt php5-json python-mysqldb snmpd php-net-ipv4 php-net-ipv6 rrdtool git + apt-get install lighttpd php5-cli php5-mysql php5-gd php5-snmp php5-cgi php-pear php5-curl snmp graphviz mysql-server mysql-client rrdtool sendmail fping imagemagick whois mtr-tiny nmap ipmitool php5-mcrypt php5-json python-mysqldb snmpd php-net-ipv4 php-net-ipv6 rrdtool git ### Cloning ### diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index ed0b2569a..7cee0e712 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -600,7 +600,7 @@ $config['distributed_poller_memcached_host'] = 'example.net'; $config['distributed_poller_memcached_port'] = '11211'; // Stats callback system -$config['callback_post'] = 'http://lathwood.co.uk/log/log.php'; -$config['callback_clear'] = 'http://lathwood.co.uk/log/clear.php'; +$config['callback_post'] = 'https://stats.librenms.org/log.php'; +$config['callback_clear'] = 'https://stats.librenms.org/clear.php'; ?> diff --git a/includes/functions.php b/includes/functions.php index e3905e311..5865dc3a7 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -1129,4 +1129,15 @@ function convert_delay($delay) { return($delay_sec); } +function guidv4($data) { + // http://stackoverflow.com/questions/2040240/php-function-to-generate-v4-uuid#15875555 + // From: Jack http://stackoverflow.com/users/1338292/ja%CD%A2ck + assert(strlen($data) == 16); + + $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100 + $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10 + + return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); +} + ?>