abdfahim Posted May 29, 2008 Share Posted May 29, 2008 I tried to read from a file. When file location is in local PC (like C:\abd\temp.xls), the code works, but when I tried to read file using same code from a network drive (for example, \\mydomain\folder\file), it fails. I use addslashes function to escape slashes, but it didn't work. Anyone has any idea?? Link to comment https://forums.phpfreaks.com/topic/107757-solved-read-file-from-network-drive/ Share on other sites More sharing options...
rhodesa Posted May 29, 2008 Share Posted May 29, 2008 Is the share that the files lives on restricted? I think apache is running as it's own system account, which may not have access to read the share. What do you mean by "it fails"...what is the error message? Link to comment https://forums.phpfreaks.com/topic/107757-solved-read-file-from-network-drive/#findComment-552503 Share on other sites More sharing options...
abdfahim Posted May 30, 2008 Author Share Posted May 30, 2008 you are quite right, that shared drive is restricted. But i have access to that drive, i mean i can read/write file using windows explorer.isn't it enough? Or, what can i do to access from apache? There is no error shown. It cant open file if i use fopen. Link to comment https://forums.phpfreaks.com/topic/107757-solved-read-file-from-network-drive/#findComment-553784 Share on other sites More sharing options...
abdfahim Posted May 31, 2008 Author Share Posted May 31, 2008 hey, i really need this quick. So, php wizards, plz answer this. At least say is it possible? Link to comment https://forums.phpfreaks.com/topic/107757-solved-read-file-from-network-drive/#findComment-554359 Share on other sites More sharing options...
BlueSkyIS Posted May 31, 2008 Share Posted May 31, 2008 yes, it is possible. Link to comment https://forums.phpfreaks.com/topic/107757-solved-read-file-from-network-drive/#findComment-554447 Share on other sites More sharing options...
abdfahim Posted June 1, 2008 Author Share Posted June 1, 2008 I found the way ... you have to go to services .... then go to apache2 --> Properties --> Log On ... then select "This Account" and give the user name and password same as the windows user name and password of the account which have access to that network drive. Link to comment https://forums.phpfreaks.com/topic/107757-solved-read-file-from-network-drive/#findComment-554743 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.