0

I tried to deploy Question2Answer. These are the steps I followed:

  1. Create PHP 5.4 cartridge
  2. Create MySQL 5.5 cartridge
  3. Clone the PHP repo locally and add the contents of question2answer-latest.zip
  4. Create qa-config.php from the example and adapt the MySQL credentials:

    define('QA_MYSQL_HOSTNAME', 'getenv("OPENSHIFT_MYSQL_DB_HOST")'); // try '127.0.0.1' or 'localhost' if MySQL on same server
    
    define('QA_MYSQL_USERNAME', 'taken from cartridge');
    
    define('QA_MYSQL_PASSWORD', 'taken from cartridge');
    
    define('QA_MYSQL_DATABASE', 'taken from cartridge');
    

Then I pushed the changes and opened the URL to my application. However, all I get is an empty white page.

What am I missing?

unor
  • 92,415
  • 26
  • 211
  • 360
orschiro
  • 19,847
  • 19
  • 64
  • 95

1 Answers1

0

The above getenv("OPENSHIFT_MYSQL_DB_HOST") variable did not work for me. Therefore, I ssh'ed into my application and found the HOST IP through $ env | grep mysql. It gave me something like the following:

OPENSHIFT_MYSQL_DB_URL=mysql://adminrszuv:rerewr9kGp2MpE@127.11.72.130:3316/

orschiro
  • 19,847
  • 19
  • 64
  • 95