4

I've set up a VirtualBox with a Debian 6.0 to act as a webserver. The host machine is my PowerBook running OS X 10.7.3.

Under /User/cb0/Sites I have a webproject in symfony that I used to develop under OS X.

Now I've mounted that directory to /var/www/host-sites in the virtual machine, so I have a environment that's exacly like the production enviroment.

The problem is php won't execute files in the mounted directory for some reason. When I call index.php I get a white page, no error message neither in frontend nor in any apache/system logs.

If I create a file with phpinfo(); in a non shared directory, and then executing this via CLI or web browser, I get the desired output.

However when I call the same file in the shared directory I get no output.

The mounted filesystem is read/writeable and this works fine. Even static files are delivered correctly. It's only php that doesn't do anything.

Does someone have a clue what could be the problem?

I've already followed this advice which helped me a lot: How do I set the Apache2 DocumentRoot to a "vboxsf" VirtualBox Shared Folder? (permissions issue?)

0

2 Answers 2

2

Check the options on the mount. Is "noexec" enabled?

1
  • Exec was enabled. I just solved the problem by reinstalling the Virtual Box Guest Addon for my Kernel Version. Thanks
    – cb0
    May 6, 2012 at 12:47
2

I solved this problem by reinstalling the VB Guest Addon.

This post https://forums.virtualbox.org/viewtopic.php?f=29&t=15679 explains quite in detail how to do that.

pbr answer is also a good idea if you have any related problem.

This is my rc.local now:

sudo mount -t vboxsf -o rw,exec,uid=1000,gid=1000 Sites /var/www/host-sites/
1
  • For me what actually fixes it is switching to the version shipped with VirtualBox, not reinstalling in and of itself. The version that ships with VirtualBox 4.2.12 works but virtualbox-ose-guest-dkms=3.2.10-dfsg-1+squeeze1 in the Debian Squeeze repo doesn't.
    – Sam Hanes
    Aug 4, 2013 at 1:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .