0

I have an openshift app with diy cartridge where I have a bunch of php and html files in the $OPENSHIFT_REPO_DIR/diy folder. The html files in this folder are displayed properly on the browser. However, the php ones are just downloaded to the browser instead of being executed.

Are php files not allowed to be run in a diy cartridge or am I doing something wrong? The .openshift folder is empty, except for a cron folder (I've added a cron cartridge to my app too).

I've also looked at this question, but the .htaccess workaround doesn't work in my case.

Community
  • 1
  • 1
Prahlad Yeri
  • 3,567
  • 4
  • 25
  • 55

1 Answers1

1

It seems like you would like to have the PHP interpreter on your DIY cartridge. You can inspire for example here, on how to install Apache with PHP on a DIY cartridge. Here you can find another avenue using nginx.

Jiri Fiala
  • 1,400
  • 7
  • 10
  • 1
    Thanks, @Jiri Fiala! However, I found that just dropping the existing app and recreating a new `php` app was a much easier and faster solution in my current situation. – Prahlad Yeri Feb 01 '16 at 18:10
  • That sure makes sense and is the most straightforward solution, if you need just the PHP. (I thought you had something else on the DIY cartridge). – Jiri Fiala Feb 02 '16 at 12:32
  • Actually I did have some obsolete `python` scripts on that app before, and the `php` came as a new requirement. I thought rather than creating a new php app, why not reuse that old one since I no longer needed that. However, deleting the old apps and creating new ones seem to be the easier way to go! – Prahlad Yeri Feb 02 '16 at 13:03