On an unmodified install, how can I configure Quercus so that PHP file functions use Apache Commons VFS to access files?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That’s quite a bit of development! More than can fit in an answer here. In outline, there are two main obstacles to overcome here:
Implementing a Quercus module is fairly straightforward – you define functions to be available in php. The main work of the module is to provide the interface to VFS.
(IOException handling is left out to avoid clutter.)
Once the module is coded, as a sanity test, write some php script that calls the custom vfs functions from this module.
Since you can call java (and vfs) directly from PHP, you could do this without a module by coding the equivalent VFS calls in PHP.
The next part is mapping these functions to the standard php file functions. This can be done several ways, as described in redefine buit-in php functions.