Error Importing XML

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

Moderators: Developers, Moderators

Post Reply
User avatar
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Error Importing XML

Post by pshankland »

I have just tried to import an XML file from the following post:

http://forums.cacti.net/viewtopic.php?t=5225

I goto Import Templates and then browse to the XML files and press save. I then get the following error:

Code: Select all

Warning: filesize(): Stat failed for C:\WINNT\TEMP\php6.tmp (errno=2 - No such file or directory) in D:\Cacti\templates_import.php on line 59

Warning: fread(): Length parameter must be greater than 0. in D:\Cacti\templates_import.php on line 59

Warning: Cannot modify header information - headers already sent by (output started at D:\Cacti\templates_import.php:59) in D:\Cacti\templates_import.php on line 67
When I go back to the Import Templates page I get the following error:

Code: Select all

Error: XML parse error.
Any ideas??

Thanks.

Pete.
DevilSun
Cacti User
Posts: 166
Joined: Fri Jul 16, 2004 1:59 pm
Location: Oregon

Post by DevilSun »

I haven't been able to use the "Import" file feature for FOREVER...all imports worked for me by pasting the contents of the files into the text box and importing.
User avatar
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Post by pshankland »

Yeah, I got around this problem by pasting the XML text into the textbox and removing the '-' from the text.

Seems to work!
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

FYI,

That error is related to File Uploads being disabled in your PHP installation.
[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
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Post by pshankland »

rony wrote:FYI,

That error is related to File Uploads being disabled in your PHP installation.
How do I enable uploads? Is it in the INI file?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Yes, you will find that setting in your php.ini file.

Code: Select all

;;;;;;;;;;;;;;;;
; 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
[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]
JVandermark
Posts: 14
Joined: Tue Dec 14, 2004 9:54 am

Post by JVandermark »

You will also need to allow the IUSR account R/W to the directory you specify in upload_tmp_dir. if you do not specify something there, make the ACL changes to the %windir%\temp directory.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests