RE: [PHP] Displaying files

From: Date: Thu, 14 Aug 2008 21:24:59 +0000
Subject: RE: [PHP] Displaying files
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-278099@lists.php.net to get a copy of this message
> -----Original Message----- > From: Stut [mailto:stuttle@gmail.com] > Sent: Thursday, August 14, 2008 4:21 PM > To: Dan Shirah > Cc: PHP-General List > Subject: Re: [PHP] Displaying files > > On 14 Aug 2008, at 21:57, Dan Shirah wrote: > > That simply means it can't open the file. Make sure the machine this > > is running on has everything it needs to access that UNC filename. > > > > -Stut > > > > > > Stut, > > > > If I copy the link from the error message and paste it into a > > browser running from my PHP server, the file comes up just fine. > > > > Should I try mkdir() or mkpath() to set the server and folder > > location and then try it from there? > > The user PHP runs as needs to be able to access it, not you. I'm > guessing you're on Windows... > > If you're using IIS then it's the IUSR_machine user which doesn't have > access to the network by default. You can enable it but I can't recall > how off the top of my head and you may want to reconsider because it > leaves the server a lot more open should IIS/PHP/else be compromised. > > If you're using Apache on Windows then you'll need to check the > service configuration to see what user it's running as. It can be done somewhat securely by mapping a network drive and then granting permissions to it specifically, rather than the network itself. (I believe...) Todd Boyd Web Programmer

« previous php.general (#278099) next »