We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13998
    • 19 Posts

    Hello all,

    When trying to initiate mySQL during a Modx install I get a blank page.
    For example: www.rileyskatepark.com/install/index.php :’(

    Does anyone know how to test mySQL using PHP from a web browser
    so I can debug this, and install Modx?

    NOTES:
    Apache/2.0.46 (Red Hat)
    PHP/5.0.4
    PHP info shows no mysql stats at all.
    myPHPAdmin shows all of my modx databases on existing sites, as is if everything is fine.
    All existing Modx sites showing blank pages as well.

    Server host recently upgraded Mysql to 4.1.22
    MySQL 4.1.22-standard running on localhost:3306 as admin@localhost
    MySQL charset: UTF-8 Unicode (utf8)
    MySQL connection collation: UFT8_general_ci

    NO errors reported by; PHP, mySQL, Modx, or Apache


    Thanks,
    Jeric
      • 7923
      • 4,213 Posts
      What do you mean by testing? just testing to connect to it?

      <?php
      $user="username";
      $password="password";
      $database="database";
      $host="127.0.0.1"
      mysql_connect($host,$user,$password) or die('Could not connect:' . mysql_error());
      mysql_select_db($database) or die('Unable to select database:' . mysql_error());
      //$result = mysql_query("SELECT * FROM site_content WHERE id=666");
      //if (!$result) {
      //   die('Invalid query: ' . mysql_error());
      //}
      mysql_close() or die('Could not close connection:' . mysql_error());
      echo "works";
      ?>
      


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 13998
        • 19 Posts
        Thanks Doze,

        Your test code works. Unfortunately it doesn’t get me any closer
        to solving my problem, I receive a blank page (just like when I try to invoke Modx install
        or any other mysql database).

        Why would mysql serve up a blank page, and not report an error?
        My server host is clueless on this issue.

        myPhpAdmin shows data in the databases I am trying to load.

        I wonder if/how Plesk is handling these request?

        Any thoughts?
        Jeric
          • 13998
          • 19 Posts
          Doze,

          When I say I am getting a blank page, I mean nothing.

          Not even "works" (echo "works";)
            • 7923
            • 4,213 Posts
            try doing a php page that has the following code:

            <?php phpinfo(); ?>
            


            Then access the page and see that display_errors is on, or if it’s off, see that is log_errors on and where the log is stored (error_log). Also see what’s the value for error_reporting, see the level integer values here.


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 13998
              • 19 Posts
              Doze,

              If a call up <?php phpinfo(); ?> in a PHP file, info.php for example
              I get the standard PHP information page.

              If I call <?php phpinfo(); ?> within a HTML page
              it pulls up a blank page.

              I have existing sites working that invoke PHP that
              are not using a CMS.

              Every site I have that is using a mysql DB, are pulling
              up blank pages, Modx, vBulletin, etc. This is why
              I was thinking mysql is the cause, which it may or
              may-not be.

              Regards,
              Jeric
                • 13998
                • 19 Posts
                Oops, sorry Doze,

                I didn’t see some of your last post...

                display_errors = off
                log_errors = on
                error_log = no value
                error_reporting = 2047

                Wonderfull, I will ask my host where I can locate my PHP
                error log.

                Jeric
                  • 7923
                  • 4,213 Posts
                  Yes, it seems that errors are set to be hidden and there’s probably some php error happening.. the error level is E_ALL which will show all errors. If your server host allows changing php settings, you could try to do ini_set(’display_errors’,’on’) in the top of the php script or put php.ini in your account root level that has "display_errors = On" in it.


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."