poller.php - error on line 308 - invalid foreach() arguement

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
nandoskid
Posts: 4
Joined: Mon Sep 20, 2010 7:31 pm

poller.php - error on line 308 - invalid foreach() arguement

Post by nandoskid »

The forum won't allow me to paste the error code in the forum. I have placed error codes in attached TXT file.

With many hours reading documentation, and testing and rebuilding, i finally got cacti to a stage where it is showing the graphs, including x and y co-ordinates info, but the problem now is when i run poller.php, i get the following error:

ERROR 1 ON TXT FILE!

With the full info as:

ERROR 2 ON TXT FILE

Well that's not full, i just cut off there because i couldn't highlight the hole black box.

Anyways, my PHP is not so strong, i tried to go to the file, and read what it was doing so as to try get some clues as to where i can look or what process' are involved but have not been able to get anywhere.

Hopefully one of you can help. A few bits of info is shown below:

Operating System: XP SP3
Webserver: IIS v5.1
Cacti: cacti-0.8.7g
Spine: i am using it but not sure of version
MySQL: mysql-essential-5.1.50-win32.msi
PHP: Combination of install 5.2.14, but then dump c:\php contents of 5.2.6 **Read below for reason**
RRDTool (Cygwin or Win32 version): rrdtools 1.2.15
Net-SNMP: net-snmp-5.4.3.zip
Cygwin (cygwin1.dll version): file version is 1005.24.0.0
Plugin Architecture: ????


**Read for PHP install reason**
Just as extra note, i installed php-5.2.14-Win32-VC6-x86.msi as suggested, but when i get to the point where i have to run the php to execute poller.php, i would get errors that i am missing DLL files such as msvcr71.dll and oci.dll, which i can never fix the oci.dll issue. Also when i load the page in iis, it is completely blank. So i would install php-5.2.14-Win32-VC6-x86.msi, but then before i run anything i'd take the contents from php-5.2.6-Win32.zip and dump it into the c:\php where 5.2.14 installed. After doing this i'd ensure all php dll files are set in IIS and restart it, and then i can view the website :), and i also get no application error when running php to execute poller. Only error i get is when the poller script runs as shown above.

Any help would be much appreciated.
Attachments
New Text Document.txt
(2.54 KiB) Downloaded 189 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) all of those php errors are generally related to incorrect NTFS permissions on files/folders. follow the installation guide and make sure they're correct.

2) all that hacking with php is possibly a problem. Why didn't you use php-5.2.14-nts-win32-installer.msi, which is recommended with FastCGI installs?

3) any errors when you run: php -m?
4) any errors in the cacti technical support page?

5) poller interval of 15 seconds is way too short. go back to the default 5 min for the scheduled task, and poller run times.
nandoskid
Posts: 4
Joined: Mon Sep 20, 2010 7:31 pm

Post by nandoskid »

1) all of those php errors are generally related to incorrect NTFS permissions on files/folders. follow the installation guide and make sure they're correct.

I just went to each component, applied EVERYONE with full permissions. Still no good. In doing this i found two extra directories, c:\usr and c:\var, not sure why they are there but i applied EVERYONE permission to them too. Rested php.exe poller.php and still getting same error.

2) all that hacking with php is possibly a problem. Why didn't you use php-5.2.14-nts-win32-installer.msi, which is recommended with FastCGI installs?

I did install that intitally, but never added the FastCGI installs. I didn't see that bit. I am going to do a whole rebuild, and include that next. Hopefully i won't return with any DLL errors

3) any errors when you run: php -m?

At the moment it runs well and shows all the modules that are installed. Before with v5.2.14 it produced DLL error when running poller.php. One thing i didn't try was installing it with FastCGI. I will do that and get back to you with the results.

4) any errors in the cacti technical support page?

I will provide these if next rebuild doesn't work

5) poller interval of 15 seconds is way too short. go back to the default 5 min for the scheduled task, and poller run times.

I understand. Thanks.

---------------
Also one other wierd thing happened. When i turned pc on, and logged into cacti, i saw a spike at once instant in time, so a measurement was taken. But i still get the error when running php poller.php, and the graph is not producing image.

Finally, when i am building the thing, i am using the following instructions:
http://www.cacti.net/downloads/docs/htm ... ndows.html. They so far have gotten me the best results out of the other two slightly different variations. I will rebuild and repost results. THANK YOU FOR YOUR COMMENTS.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

nandoskid wrote:Finally, when i am building the thing, i am using the following instructions:
http://www.cacti.net/downloads/docs/htm ... ndows.html. They so far have gotten me the best results out of the other two slightly different variations.
That documentation is very outdated. try the link in my signature or http://docs.cacti.net/manual:087:1_inst ... er_windows
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests