0

I have a mount to my windows machine on a linux machine. When I try to run any php scripts there it says it's not found, however, when i copy the files to the local storage it runs with no problem. I tried to mount using exec,rw options nothing changes this behavior.

Am I breaking some obscure security rule on php?

$mount -o defaults,umask=777,uid=1000,gid=1000,rw,exec,username=USER,password=PASS //192.168.1.65/D /mnt/z3n-i7
$cd /mnt/z3n-i7/script
$php x.php
$PHP Fatal error:  Unknown: Failed opening required 'x.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
$cp x.php ~/x.php;cd ~;
$php x.php
SUCCESS

--

Strace:

getcwd("/mnt/z3n-i7/.httpd/~scripts/pv/pv-linux", 4096) = 49
time(NULL)                              = 1339177164
lstat64("/mnt/z3n-i7/.httpd/~scripts/pv/pv-linux/pv.php", {st_mode=S_IFREG|0755, st_size=796, ...}) = 0
lstat64("/mnt/z3n-i7/.httpd/~scripts/pv/pv-linux", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/mnt/z3n-i7/.httpd/~scripts/pv", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/mnt/z3n-i7/.httpd/~scripts", {st_mode=S_IFDIR|0755, st_size=81920, ...}) = 0
lstat64("/mnt/z3n-i7/.httpd", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
lstat64("/mnt/z3n-i7", {st_mode=S_IFDIR|0755, st_size=49152, ...}) = 0
lstat64("/mnt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0xbfc71038) = -1 ENOTTY (Inappropriate ioctl for device)
fstat64(3, {st_mode=S_IFREG|0755, st_size=796, ...}) = 0
write(2, "PHP Fatal error:  Unknown: Faile"..., 131) = 131

Guess this is the problem: Inappropriate ioctl for device ?

1
  • Could you post the strace output of the failing command? (cd /mnt/z3n-i7/script; strace -o trace.txt php x.php)
    – user1686
    Jun 8, 2012 at 17:37

2 Answers 2

1

After some research i found out that this is a php bug when accessing a filesystem hosted on a 64-bit OS. There's no fix for this, according to https://bugs.php.net/bug.php?id=50150 , So i mounted my 64-bit windows share on a 32-bit linux machine and shared the share mounted it and it worked!

Thanks for the help anyway.

1

Add 'noserverino' option, and the problem is settled.

example:

mount -o defaults,umask=777,uid=1000,gid=1000,rw,exec,username=USER,password=PASS,noserverino //192.168.1.65/D /mnt/z3n-i7

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.