# Where to put php application and allow access to mySql?

**URL:** <https://community.dreamfactory.com/t/where-to-put-php-application-and-allow-access-to-mysql/214>\
**Category:** App Configuration\
**Created:** [July 28, 2014, 2:59pm UTC](https://community.dreamfactory.com/t/where-to-put-php-application-and-allow-access-to-mysql/214 "2014-07-28T14:59:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tiptronic](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/tiptronic/32/1202_2.png) [@tiptronic](https://community.dreamfactory.com/u/tiptronic)\
**Post date:** [July 28, 2014, 2:59pm UTC](https://community.dreamfactory.com/t/where-to-put-php-application-and-allow-access-to-mysql/214/1 "2014-07-28T14:59:02Z")

</div>

I want to put one of my PHP-applications behind the DF portal.

Is there any docs on best practices? The app needs access to the built-in MySQL. It doesn’t need services, as db-communication is already working fine and it would make no sense to change to REST…

For now, I put the application under htdocs/web/admin. That works fine. Is that the intended way to put private applications?

---

<div class="post-metadata">

**Author:** ![Jason](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jason/32/1194_2.png) [@Jason](https://community.dreamfactory.com/u/Jason)\
**Post date:** [July 28, 2014, 9:55pm UTC](https://community.dreamfactory.com/t/where-to-put-php-application-and-allow-access-to-mysql/214/2 "2014-07-28T21:55:14Z")

</div>

You can create an app, make it external, and just point to your php app.  
Or you can create a remote web service, and put your app’s local url as the base url.  
But really, you have an app you want in the portal, so just create an app, declare it external in the create app section, and then it’ll show up in the portal.

Not sure i’d put it under admin , i’d personally let it live on the same server, just under a different folder in htdocs.

---

<div class="post-metadata">

**Author:** ![tiptronic](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/tiptronic/32/1202_2.png) [@tiptronic](https://community.dreamfactory.com/u/tiptronic)\
**Post date:** [July 29, 2014, 2:47pm UTC](https://community.dreamfactory.com/t/where-to-put-php-application-and-allow-access-to-mysql/214/3 "2014-07-29T14:47:18Z")

</div>

Hi Jason,

thanks - meanwhile I found out, putting it under admin is a dumb idea (except it’s an admin-app ;)).

But I have some troubles to put my PHP app behind the user/login (so I can use the benefits of a user/login/registration). As soon as I create a remote web service and navigate to the app’s URL, I get the raw php file (as text) delivered to my browser. Seems I am doing something wrong, but not (yet) sure what…

Any hints?

andy

---

<div class="post-metadata">

**Author:** ![Jason](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jason/32/1194_2.png) [@Jason](https://community.dreamfactory.com/u/Jason)\
**Post date:** [July 29, 2014, 6:12pm UTC](https://community.dreamfactory.com/t/where-to-put-php-application-and-allow-access-to-mysql/214/4 "2014-07-29T18:12:58Z")

</div>

Yeah. Remote web service wasn’t the best idea for php. You can get it behind the launchpad login by creating an app an declaring it external and pointing it to your php app. Then only allow requests from your launchpad URL. Never tried that though.

---

<div class="post-metadata">

**Author:** ![tiptronic](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/tiptronic/32/1202_2.png) [@tiptronic](https://community.dreamfactory.com/u/tiptronic)\
**Post date:** [July 29, 2014, 8:22pm UTC](https://community.dreamfactory.com/t/where-to-put-php-application-and-allow-access-to-mysql/214/5 "2014-07-29T20:22:29Z")

</div>

That’s what I tried, but I think I need to modify vHost settings (or whatever), since DF doesn’t re-direct to my app. Currently I have no idea, how to get that working, but I will try again on the weekend.

BTW: This would be a nice enhancement for an upcoming DF version.
