XML Parse Error when importing CPU WMI script

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

Moderators: Developers, Moderators

Post Reply
BelgianViking
Cacti User
Posts: 97
Joined: Thu Mar 24, 2005 4:59 am
Location: Brussels, Belgium

XML Parse Error when importing CPU WMI script

Post by BelgianViking »

I found some scripts on the board to check CPU load using WMI scripting. This is the first time I'm working with WMI and these scripts before, but I thought it should be straight forward. I tried to import the script ('from local file'), but I got this errors:

Warning: filesize() [function.filesize]: stat failed for C:\WINNT\TEMP\php4.tmp in c:\Inetpub\wwwroot\cacti\templates_import.php on line 59

Warning: fread() [function.fread]: Length parameter must be greater than 0. in c:\Inetpub\wwwroot\cacti\templates_import.php on line 59

Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\cacti\templates_import.php:59) in c:\Inetpub\wwwroot\cacti\templates_import.php on line 67

Would anyone have an idea what is wrong ?
Thanks !
User avatar
Diggit2001
Cacti User
Posts: 195
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US

Me too

Post by Diggit2001 »

I'm having the same exact problem when I attempt to import various scripts. Anyone have a resolution?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Do you have file uploads turned on in our PHP configuration?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
Diggit2001
Cacti User
Posts: 195
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US

Post by Diggit2001 »

Well, this is my foray into thr world of PHP so I'm not entirely sure how to check that. I am assuming that its set in the php.ini file. Under "File Uploads", I have the follwing:

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = c:\php\uploadtemp

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

I had changed the upload_temp_dir setting to see if that would help, but so far, no dice.

Am I in the right place?

Thanks
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

What OS?
What php version?
What cacti version?

sure your NTFS serurity settings are correct for the temp directory php uses for uploads?
User avatar
Diggit2001
Cacti User
Posts: 195
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US

Post by Diggit2001 »

I'm running Windows XP, PHP 5.0.4 and cacti 0.8.6c.

I just changed the securities on the temp directory and everything worked fine.

Man, sometimes its the most obvious solution.....

Thanks for your help.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests