Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #2237

Re: Command line cannot fwrite, browser can

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: Command line cannot fwrite, browser can
Date 2011-06-17 20:35 -0400
Organization A noiseless patient Spider
Message-ID <itgrt2$u7d$1@dont-email.me> (permalink)
References <Xns9F07924644CD1arbpenyahoocom@88.198.244.100>

Show all headers | View raw


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@attglobal.net
==================

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Command line cannot fwrite, browser can Adrienne Boswell <arbpen@yahoo.com> - 2011-06-17 21:22 +0000
  Re: Command line cannot fwrite, browser can Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-06-18 00:16 +0000
  Re: Command line cannot fwrite, browser can Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-17 20:35 -0400
    Re: Command line cannot fwrite, browser can Adrienne Boswell <arbpen@yahoo.com> - 2011-06-18 03:05 +0000
  Re: Command line cannot fwrite, browser can Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-06-18 08:20 +0200
    Re: Command line cannot fwrite, browser can Adrienne Boswell <arbpen@yahoo.com> - 2011-06-18 08:05 +0000
      Re: Command line cannot fwrite, browser can Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-06-18 10:27 +0200
      Re: Command line cannot fwrite, browser can Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-18 08:19 -0400
        Re: Command line cannot fwrite, browser can Adrienne Boswell <arbpen@yahoo.com> - 2011-06-18 16:08 +0000
          Re: Command line cannot fwrite, browser can Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-06-22 11:48 +0200
            Re: Command line cannot fwrite, browser can Adrienne Boswell <arbpen@yahoo.com> - 2011-06-23 03:44 +0000
              Re: Command line cannot fwrite, browser can Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-06-23 09:55 +0200
                Re: Command line cannot fwrite, browser can Adrienne Boswell <arbpen@yahoo.com> - 2011-06-23 15:29 +0000
                Re: Command line cannot fwrite, browser can Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-06-24 01:00 +0200
  Re: Command line cannot fwrite, browser can Bernd Schulz <ask_me_for_email@invalid.invalid> - 2011-06-18 13:10 +0200

csiph-web