phpmyadmin blank white page after new install

Problems with the Windows version of XAMPP, questions, comments, and anything related.

phpmyadmin blank white page after new install

Postby flashgraham » 08. February 2015 15:48

Hi,
I have a problem with a blank white page at "localhost/phpmyadmin/", new install Xampp 5.5.19
Windows 7 Pro installed
I have made a couple of changes to to get Xampp to where I am now ( see below )
This is the Firefox error console message below for the white page source code:
SyntaxError: missing ; before statement get_scripts.js.php:1
ReferenceError: $ is not defined messages.php:245
ReferenceError: PMA_commonParams is not defined phpmyadmin:2
ReferenceError: AJAX is not defined phpmyadmin:354
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. jquery-min.js:3
( changes )
Change xampp/htdocs/xampp/mysql.php 04/02/2012
From "localhost" to "127.0.0.1"

Change xampp/htdocs/xampp/phonebook.php 05/02/2012
Line 35 change this if(!($db=new SQLite3('sqlite/phonebook.sqlite3', '0666')))
To if(!($db=new SQLite3('sqlite/phonebook.sqlite3')))
as per https://community.apachefriends.org/f/viewtopic.php?f=16&t=69342#p240347

Change xampp/security/htdocs/lang.php 05/02/2012
Line 3 Change ($lang == "sl") to ($lang == "it")
as per https://community.apachefriends.org/f/viewtopic.php?f=16&t=69342#p240347

Change xampp/htdocs/xampp/cds.php 08/02/2012
Line 78 changed from 'localhost' to '127.0.0.1

Any help would be very much appreciated,
Thank You!
flashgraham
 
Posts: 2
Joined: 16. June 2013 08:34
Location: Holmfirth UK
Operating System: Windows 7 Professional

Re: phpmyadmin blank white page after new install

Postby PercocoMike » 27. August 2015 22:01

I too was getting the blank page with these errors. I found where the code generating a "display:none" was and commented it out. I now have a partial phpMyAdmin screen, but with no styles applied and additional errors (which I suspect are a cascade effect). The additional error is # of "Could not include class "Node", file "Nodes/Node.class.php" not found" (may not be related, but suspect without the javascript loading/functioning, that the path is not correct for Node.class.php)?)

ReferenceError: $ is not defined messages.php:245
ReferenceError: PMA_commonParams is not defined phpmyadmin:2
ReferenceError: AJAX is not defined phpmyadmin:354


From a google search I found this http://jquery-howto.blogspot.com/2013/02/referenceerror-jquery-is-not-defined.html

From what I can tell the problem (at least that I'm having) is the get_scripts.js.php is either not working or not retrieving any of the scripts it is suppose to. I've determined this by accessing a working version of phpMyAdmin (on my webhost) and clicking on the get_scripts.js.php line in the source. On the working install, clicking on that in the sources (using google Chrome at least) displays the results of get_scripts.js.php (a lot of javascript). However on the XAMPP install that is the issue, clicking on the get_scripts.js.php in the source just gives a blank page (and view source shows nothing). I've tried changing the mime type of Apache from application/javascript js (default) to text/javascript js with no effect (based on other similar things I found via google on StackOverFlow & other sites).

A problem with get_scripts.js.php (and in my case the lack of output) is why the 3 quoted errors above are happening (based on google again, it appears the ReferenceErrors are due to the jquery library not being loaded, which is what lead me to the get_scripts.js.php) and why I suspect the additional errors are occurring (Could not include class "Node", file "Nodes/Node.class.php" not found - however this may be a separate issue). If anyone else has figured out a fix for this I too would be interested in how to fix it. I did a clean install of the latest XAMPP (5.6.11) on a Win7Pro (64bit) machine.
Mike
==========
Win7Pro
XAMPP 5.6.11
PercocoMike
 
Posts: 3
Joined: 27. August 2015 21:13
Operating System: Win7 Pro (64bit)

Re: phpmyadmin blank white page after new install

Postby PercocoMike » 28. August 2015 16:19

Ok, found my issue (which may or may not be anyone else's issue. In my case I have installed XAMPP on a network drive. That network drive was previously on a WinSBS2003 server. Recently that network drive was moved to a NAS. Even though all explicit users had read/write access, the user "EVERYONE" did not. Adding Read Access to EVERYONE solved my problem. I found that php was not reading the file after adding various lines of code to the get_scripts.js.php file. Below is the modified debug version of get_scripts.js.php I used to find the issue in case it is useful for anyone else to debug there javascripts not loading (or loading completely) for phpMyAdmin.

Code: Select all
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Concatenates several js files to reduce the number of
 * http requests sent to the server
 *
 * @package PhpMyAdmin
 */

chdir('..');

// Close session early as we won't write anything there
session_write_close();

// Send correct type
header('Content-Type: text/javascript; charset=UTF-8');
//header('Content-Type: application/javascript; charset=UTF-8');
// Enable browser cache for 1 hour
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');

// When a token is not presented, even though whitelisted arrays are removed
// in PMA_removeRequestVars(). This is a workaround for that.
$_GET['scripts'] = json_encode($_GET['scripts']);

// Avoid loading the full common.inc.php because this would add many
// non-js-compatible stuff like DOCTYPE
define('PMA_MINIMUM_COMMON', true);
require_once './libraries/common.inc.php';

include_once './libraries/OutputBuffering.class.php';
$buffer = PMA_OutputBuffering::getInstance();
$buffer->start();
register_shutdown_function(
   function() {
      echo PMA_OutputBuffering::getInstance()->getContents();
   }
);
echo "Starting to get scripts\n";
$_GET['scripts'] = json_decode($_GET['scripts']);
if (! empty($_GET['scripts']) && is_array($_GET['scripts'])) {
   echo "Not empty)\n"; // Added to debug code -- Did we receive parameters?
    foreach ($_GET['scripts'] as $script) {
        // Sanitise filename
      echo "1st foreach\n"; // Added to debug code -- Just checking for progress in the loop
        $script_name = 'js';

        $path = explode("/", $script);
      echo $path . "\n"; // Added to debug code -- Do we have useable data or garbage?
        foreach ($path as $index => $filename) {
            // Allow alphanumeric, "." and "-" chars only, no files starting
            // with .
      echo "2nd foreach\n"; // Added to debug code -- Just checking for progress in the loop
            if (preg_match("@^[\w][\w\.-]+$@", $filename)) {
                $script_name .= DIRECTORY_SEPARATOR . $filename;
            echo "1st Preg_Match\n"; // Added to debug code -- Was there a preg_match here?
            echo $script_name ."\n"; // Added to debug code -- Is the path/filename correct now?
            }
        }

        // Output file contents
        if (preg_match("@\.js$@", $script_name)) {
         echo "2nd Preg_Match\n"; // Added to debug code -- Was there a preg_match here (2nd)?
      }         
      echo "File Exists: " . file_exists ($script_name) . "?\n"; // Added to debug code -- Can script find file? Added this when is_readable failed.
      echo "Is Readable: " . is_readable($script_name) . "?\n"; // Added to debug code -- Can the file be read?
      echo "Is NOT Readable: " . !is_readable($script_name) . "?\n"; // Added to debug code -- Added this when above line produced no result, was expecting True/False (or 1/0) but just got nothing (now know to indicate FALSE).
        if (preg_match("@\.js$@", $script_name) && is_readable($script_name)) {
            readfile($script_name);
            echo ";\n\n";
        }
    }
}

if (isset($_GET['call_done'])) {
    echo "AJAX.scriptHandler.done();";
}
echo "all done\n"; // Added to debug code -- Did Script end properly?
?>
Mike
==========
Win7Pro
XAMPP 5.6.11
PercocoMike
 
Posts: 3
Joined: 27. August 2015 21:13
Operating System: Win7 Pro (64bit)


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 146 guests