[RESOLVED] Connection to a network Drive Using PHP - Page 2
Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21

Thread: [RESOLVED] Connection to a network Drive Using PHP

  1. #16
    Junior Member
    Join Date
    Mar 2010
    Posts
    12
    Sir,

    I am pasting the same command in Command promt. Its direct copy paste apart from those backslashes.
    I did not understand "Active Directory domain environment"

    Here this ip (192.168.1.5) is my own IP and Database is a folder share by me only on my system.

    Sir,

    If possible can you just check with this code in your system...as I think I am stuck up with something strange.

    I shall be waiting...

  2. #17
    Junior Member
    Join Date
    Mar 2010
    Posts
    12

    Unable to access opendir("Z:")

    Hi,

    I am unable to access z: through opendir() where z: is already created in through command prompt

  3. #18
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,432
    It's most likely a permissions issue, since the PHP parser isn't running under the same user credentials as you are (more than likely, anyway).

    There's no way to change this; either have the server administrators modify the user credentials that the PHP process uses, or add the credentials that it does use to the ACL for the shared folder to give it access.

  4. #19
    Junior Member
    Join Date
    Mar 2010
    Posts
    12

    Permission rights

    So, Sir,
    The server being in my local machine, I am the server administrator. So how to modify the rights.

    By the way, are you able to reproduce this defect in your local system, or it is working fine for you

  5. #20
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,432
    Quote Originally Posted by dhrubajyoti View Post
    By the way, are you able to reproduce this defect in your local system, or it is working fine for you
    The code I posted using a COM object successfully mapped the drive, and is_dir() returned true - I didn't try to use any other file-system functions, though. I also was running the PHP script from the CLI using my own user credentials, though.

    How is PHP integrated with Apache in WAMP - ISAPI module (the .dll file) or as a CGI binary? You could try to modify the httpd.exe process to run as your own user credentials instead of SYSTEM... here's a quick how-to for that:

    1. Open the Services MMC by going to Start -> Run (or by using the search box, if using Windows 7) and typing Services.msc and pressing enter.
    2. Find the Apache service. Having never used WAMP, I have no idea what it's been named. Hopefully it starts with the word "Apache" though, and thus shouldn't be too hard to find.
    3. Right-click on the service and select Properties.
    4. Switch to the Log On tab.
    5. Select the radio button next to "This account:" and enter in the credentials for the user account you want to run Apache under. If it's a network/domain account, use the "DOMAIN\user" syntax (or search for the account using the Browse button).
    6. Select OK and restart the Apache service.
    7. Verify that your changes worked by looking for the "httpd.exe" process in Task Manager and checking to see which user name the process is running under.

  6. #21
    Junior Member
    Join Date
    Mar 2010
    Posts
    12

    Solved

    Thanks a lot Sir for your help. Although net use did not work for me, but I could get that resolved thorugh that COM object creation.

    Thanks a lot.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •