Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?)

share|improve this question
add comment

2 Answers

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

share|improve this answer
    
Exec was enabled. I just solved the problem by reinstalling the Virtual Box Guest Addon for my Kernel Version. Thanks –  cb0 May 6 '12 at 12:47
add comment
up vote 2 down vote accepted

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/
share|improve this answer
    
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 '13 at 1:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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