poller.php - Parse error: syntax error...

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
zastrix
Posts: 1
Joined: Fri May 30, 2008 12:10 pm
Location: Madison, WI

poller.php - Parse error: syntax error...

Post by zastrix »

Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /usr/share/php/adodb/adodb.inc.php on line 336


any ideas?? this is preventing creation of any rrd files on my fresh install on debian lenny.


adodb.inc.php - line 336:

static function Version()
{
global $ADODB_vers;

return (float) substr($ADODB_vers,1);
}
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

This is a build problem from your package maintainer. Since we don't publish this package (as adodb is in /usr/share instead of /var/www/html/cacti/...), you will have to post on the appropriate Linux distributions site for assistance, or install Cacti from source.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
dub
Posts: 1
Joined: Wed Jun 11, 2008 6:49 pm

Post by dub »

I have this problem, did the OP raise this anywhere else?
pfriedel
Posts: 1
Joined: Thu Jan 12, 2006 12:48 pm

Post by pfriedel »

dub wrote:I have this problem, did the OP raise this anywhere else?
I had to downgrade libphp-adodb from 5.04a-1 to 4.93a-1.1 in debian, which seems to have cleared it up.
emonk
Posts: 2
Joined: Tue Jun 17, 2008 11:32 am

Post by emonk »

I have the same problem with Debian Lenny (testing), and the package maintainer does not answer me mails .
Somebody have any solution ?

Code: Select all

host:~# php /usr/share/cacti/site/poller.php
PHP Warning:  mime_magic: type search/400       \\input         text/x-tex invalid in Unknown on line 0
PHP Warning:  mime_magic: type search/400       \\section       text/x-tex invalid in Unknown on line 0
PHP Warning:  mime_magic: type search/400       \\setlength     text/x-tex invalid in Unknown on line 0
PHP Warning:  mime_magic: type search/400       \\documentstyle text/x-tex invalid in Unknown on line 0
PHP Warning:  mime_magic: type search/400       \\chapter       text/x-tex invalid in Unknown on line 0
PHP Warning:  mime_magic: type search/400       \\documentclass text/x-tex invalid in Unknown on line 0
PHP Warning:  mime_magic: type regex            [Cc]onstant[[:space:]]+[Ss]tory text/x-inform invalid in Unknown on line 0

Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /usr/share/php/adodb/adodb.inc.php on line 336

Code: Select all

host:~# aptitude show libphp-adodb
Paquete: libphp-adodb
Nuevo: sí
Estado: instalado
Instalado automáticamente: sí
Versión: 5.04a-1
Prioridad: opcional
Sección: web
Desarrollador: Cameron Dale <camrdale@gmail.com>
Tamaño sin comprimir: 2324k
Depende de: debconf (>= 0.5) | debconf-2.0, php5 | php5-cli
Recomienda: php5-mysql | php5-pgsql | php5-sybase | php5-odbc
Sugiere: php5-adodb
Descripción: The ADOdb database abstraction layer for PHP
 A library for PHP, to allow for a universal way to access databases. ADOdb stands for Active Data Objects Data Base. Currently supported databases are MySQL,
 PostgreSQL, Interbase, Oracle, MS SQL 7, FoxPro, Access, ADO, Sybase, DB2 and generic ODBC.
Página principal: http://adodb.sourceforge.net/
Thanks.

PD: sry for my english, i speak spanish.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Cacti requires use of it's own adodb that's packaged with cacti. We are currently not able to support the debian way. You may want to use the code provided by the cacti tar.gz
Reinhard
emonk
Posts: 2
Joined: Tue Jun 17, 2008 11:32 am

Post by emonk »

gandalf wrote:Cacti requires use of it's own adodb that's packaged with cacti. We are currently not able to support the debian way. You may want to use the code provided by the cacti tar.gz
Reinhard
Yes i find that, and change php5 for php4 .
Thanks.
af3556
Posts: 1
Joined: Sun Jul 20, 2008 6:37 am

Post by af3556 »

If you have this error and have php4 and php5 installed, remove php4.
User avatar
floaty
Posts: 21
Joined: Tue Mar 06, 2007 10:27 am

Post by floaty »

for Debian 4.1.2-19 it is simply done with

aptitude remove php5

aptitude install php4

before:/
php poller.php
PHP Warning: mime_magic: type search/400 \\input text/x-tex invalid in Unknown on line 0
PHP Warning: mime_magic: type search/400 \\section text/x-tex invalid in Unknown on line 0
PHP Warning: mime_magic: type search/400 \\setlength text/x-tex invalid in Unknown on line 0
PHP Warning: mime_magic: type search/400 \\documentstyle text/x-tex invalid in Unknown on line 0
PHP Warning: mime_magic: type search/400 \\chapter text/x-tex invalid in Unknown on line 0
PHP Warning: mime_magic: type search/400 \\documentclass text/x-tex invalid in Unknown on line 0
PHP Warning: mime_magic: type regex [Cc]onstant[[:space:]]+[Ss]tory text/x-inform invalid in Unknown on line 0

Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /usr/share/php/adodb/adodb.inc.php on line 336


later:)
ztest:/usr/share/cacti/site# php poller.php
07/24/2008 11:53:13 AM - POLLER: Poller[0] NOTE: Poller Int: '10', Cron Int: '60', Time Since Last: 'never', Max Runtime '58', Poller Runs: '6'
WARNING: Unrecongized directive: LogFile=/var/log/cacti/cacti.log in /etc/cacti/spine.conf
Waiting on 1/1 pollers.
OK u:0.00 s:0.01 r:1.03
OK u:0.00 s:0.01 r:1.03
OK u:0.00 s:0.01 r:1.04
OK u:0.00 s:0.01 r:1.04
OK u:0.00 s:0.02 r:1.05
OK u:0.00 s:0.02 r:1.05
OK u:0.00 s:0.02 r:1.05
OK u:0.00 s:0.02 r:1.05
OK u:0.00 s:0.02 r:1.06
OK u:0.00 s:0.02 r:1.06
07/24/2008 11:53:14 AM - SYSTEM STATS: Time:1.1989 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:5 RRDsProcessed:5
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests