I'm kind of new to this material. The scripts we are using are in our apache/htdocs/ root folder while the LimeSurvey installation is in apache/htdocs/umfragen/ (which I change into "/limesurvey/" in the example in this thread). If that's what you call virtual directory then yes, I think it will work. You might have a look at bugs.limesurvey.org/view.php?id=5653 . There are two examples from me how it could look like to read or write into a database table from LimeSurvey.
Mit freundlichen Grüßen/Best regards,
The administrator has disabled public write access.