1

I'm running Arch Linux and installed apache, php and mysql (not mariadb) there. Arch root partition have limited size, because I set big partition on ntfs filesystem for shared files between OS (I'm dual booting with windows). So, I want to move apache's document root to that ntfs partition.

The problem is, php files that stored in ntfs partition won't show anything. Even ini_set('display_errors') can't help. The only hints is javacript console that said internal server error.

I mounted NTFS partition automatically when booting with fstab like this:

UUID=3AD4628C7D357A55 /media/data ntfs-3g defaults,uid=1000,gid=100,umask=022,windows_names,locale=en_US.utf8 0 0

and index.php file permission is -rwxr-xr-x with my user as it's owner. If I remve index.php, localhost showing directory list just fine (i turn Indexes on).

So, how can I do this?

UPDATE

The error log says:

 PHP Fatal error:  Unknown: Failed opening required '/media/data/Projects/www/html/test.php'
 (include_path='.:/usr/share/pear') in Unknown on line 0, referer: http://localhost/
7
  • Can you execute other programs if you try running them directly?
    – Jenny D
    Apr 1 '15 at 12:12
  • Yes I can. No problem for executing program from ntfs partition directly. If you mean via terminal too.
    – Mas Bagol
    Apr 1 '15 at 13:13
  • 1
    Yes, that's what I meant. Thanks for the info.
    – Jenny D
    Apr 1 '15 at 18:27
  • What can you find in apache's error log when the error occurs?
    – Jenny D
    Apr 1 '15 at 18:28
  • Edited. Added the error log.
    – Mas Bagol
    Apr 2 '15 at 1:34
0

I think your best bet is to make the apache document root a local directory on the same server that apache is running on. Then, if you must get content over a mount, use symlinks from within the doc root.

The only way I have actually used this kind of setup is pulling static content from over the mount. If you are trying to reach across the mount, execute php on the server that is remotely mounted, and get a response back through your local apache... good luck. If that is what you are doing, then I think you need to re-think your solution. I could be wrong.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.