XML import fails

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 import fails

Post by BelgianViking »

I'm trying to import the XML file from this topic http://forums.cacti.net/viewtopic.php?t=9826
but it fails. Firts I tried pasting it as text in the import utility, but it complains about 'XML parset error'.
I downloaded it than as a file, and tried it again. This gives me the following output:

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

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

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

This is the first time I use the Import function on my newly installed machine, although I had a quick try with anoter file from my old 0.8.6c system, and it gave the same error.
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

My installation guide has this documented. You most likely need to uncomment file_uploads = On from your php.ini.
BelgianViking
Cacti User
Posts: 97
Joined: Thu Mar 24, 2005 4:59 am
Location: Brussels, Belgium

Post by BelgianViking »

I followed this guide, and as such this setting is OK.
The section from php.ini looks like this:


;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; 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 =

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

Could it be some security rights ? I checked the most obvious ones, and they look OK.
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Check the security permissions on c:\windows\temp, since thats where it appears to be trying. Also, make sure you have the same version of cacti, that the xml template was generated.
BelgianViking
Cacti User
Posts: 97
Joined: Thu Mar 24, 2005 4:59 am
Location: Brussels, Belgium

Post by BelgianViking »

The permissions are OK now. The cacti user needs write access in the temp directory.
Thanks.
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests