LAMP Stack: getting two folders to communicate with each other
I'm having a sort of connection issue with my LAMP setup (Ubuntu 14.04). I've set everything up to accept wildcard domains, which is working great. Currently, I have two folders in my system:
/var/www/html - which holds my WordPress installation (and the main URL - mysite.com)
/var/www/pancake - which olds my Pancake App installation (and the url is pancake.mysite.com as a subdomain)
Both work very well independently of each other - no problems there. My issue is that I'm trying to get my WP install to communicate with my Pancake install. (I'm currently writing a WordPress plugin to allow a user to submit a contact form on my WordPress site, and the information is passed to Pancake and is inserted into the separate Pancake database - sort of like a CRM, for lack of a better description.) If I place the Pancake installation within the WP install, it works just fine (although I lose my subdomain abilities on that point - the location becomes mysite.com/pancake) and the communication works great. But I would really prefer the two items remain in their own separate folders, independent of each other.
I'm guessing there's something in my server setup that is not allowing the two directories to "talk" to each other because they are not in the same public parent, and they are each their own individual public areas, but I'm not 100% sure what I should be looking for to allow the two directories to freely have nice discussions between themselves. I don't know if it needs some sort of .htaccess edit, or user:group permissions or what.
Anyone have any ideas for me?