PHP crazy behavior on mount

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

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, 
                                                
                                                
0 views
0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.