Re: Command line cannot fwrite, browser can



On 6/17/2011 5:22 PM, Adrienne Boswell wrote:
Okay, I give up! I pulled the very last hair out of my head, and now I
am asking for help.

This is a Win2003 SP2 server running Plesk PHP5 on Microsoft-IIS/6.0.
Why am I using PHP on Win? The main application was written in Classic
ASP, hence the Windows server. I need to run a script from the command
line so I can call it with the task manager to run every night.

Using the command line, the script gives a warning, and then fails saying
it cannot write to a file. Using a browser, the script works flawlessly.

I am thinking it might be a permission issue? I checked and IUSER the
DOMAIN USER, SYSTEM and Administrator have full permissions on the file
(s) in question. Is there another user I should be including? The batch
file is running as Administrator.

The other issue is that the file giving a warning IS on the server. All
the other files mentioned are found without a problem - and again this
only happens with the command line.

This is the error I am getting:
C:\Inetpub\vhosts\aloyaltycard.com\httpdocs\groupmail>cd c:\parallels
\plesk\additional\pleskphp5
C:\Parallels\Plesk\Additional\PleskPHP5>php.exe c:\inetpub\vhosts
\aloyaltycard.com\httpdocs\groupmail\groupmail.php

Warning: file_get_contents(groupmail1_noname.txt): failed to open stream:
No such file or directory in C:\Inetpub\vhosts\aloyaltycard.com\httpdocs
\groupmail\groupmail.php on line 88
cannot write to groupmail.html


<lots of other stuff snipped>

Classic windows permission issue. First of all, ensure you're writing to the file you think you are (i.e. use absolute paths, etc.). Then try a windows-related newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Re: batch file to delete files based on criteria
    ... The Advanced Version of Snapshot will create date/time coded backups that ... This script is included with the FREE Advanced NT/2K/XP/K3 Command Library ... script will perform CONSISTENTLY under Windows NT4, 2000, XP and Server ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: WshShell.Exec output read impossible until command finished
    ... I've done a script to force remove of old DCs. ... I'm using NTDSUTIL command line tool for that, ... How can I have a live output read (like under Windows 2003 DC)? ...
    (microsoft.public.scripting.vbscript)
  • Re: Swap/Remap Ctrl and Alt keys.......Finally
    ... startup/login script. ... It shows a message saying you need to add a line to a login script to ... The back quotes mean that the output of the "uname -n" command shall be ... options are much more comprehensive that those in Windows (does Windows ...
    (Ubuntu)
  • Re: Windows 2000 remote login problems
    ... Whenever a user forgets their Windows password we ... When the user forgets his password, he logs on with the user Setpassword. ... and the script asks for the user name to reset as well as the ... Changing password from a script (vbscript as well as command line): ...
    (microsoft.public.win2000.security)
  • Re: command
    ... actually i dont wanna show logic of command. ... i dont wanna do this from permission. ... i make a script on bash shell to create 100 users. ...
    (RedHat)