|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Why doesn't create temporary files?
Code:
Content-Type: text/html print <<ENDOFTEXT; <HTML> <HEAD><TITLE>Hello World!</TITLE></HEAD> <BODY> <H4>Hello World!</H4> </BODY> </HTML> ENDOFTEXT $content = "this is a test"; open (CF, ">C:\\Inetpub\\wwwroot\\TempDoc\\test1.txt"); print CF $content; exit(0); I want to create a temporal files test1.txt in the directory TempDoc. Why it doesn't work? nothing created. I am working on IIS 6. Thank you for your help. |
|
#2
|
||||
|
||||
|
is the script crashing? Try using die to see if there is a problem:
Code:
open (CF, ">C:\\Inetpub\\wwwroot\\TempDoc\\test1.txt") or die "Can't open file: $!"; you could also check the server errors logs if you have access to them. |
|
#3
|
|||
|
|||
|
Quote:
Code:
Can't open file: Permission denied at C:\Inetpub\wwwroot\cgi-bin\helloworld\HelloWorld.pl line 10. This is the error message. Why permission is denied? How can I grant the permission? I have full control of IIS. It is on my personal computers. |
|
#4
|
||||
|
||||
|
I am not familiar with IIS. It would be helpful to not place your questions/answers in code tags, just put code in code tags.
|
|
#5
|
||||
|
||||
|
Have you got IIS configured to run CGI/Perl scripts?
__________________
--Ax without exception, there is no rule ... The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones ![]() 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. -- Jamie Zawinski Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ... |
|
#6
|
||||
|
||||
|
This is not a perl question anymore. Check the documentation in the Activestate perl distribution under "Web Server Config" for information on setting up IIS to run with Perl and check the IIS documentation for information on setting up the web server correctly. Specifically, look for information on permissions and/or CGI configuration.
The only thing I know to tell you is that IIS 6 is generally distributed in a much more "locked down" format than previous versions of the software were for security reasons, which might be why the server can't access the file. How to change that, however, is not within the scope of this forum. Moving to the IIS forum rather than closing. Mods there can retain/close it at their discretion. |
|
#7
|
||||
|
||||
|
|
|
#8
|
|||
|
|||
|
One guess is a permissions problem, make sure the IIS user account has write permissions to the target folder.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > Why doesn't create temporary files? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|