Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Posts
    128
    Plugin Contributions
    0

    Default White pages in both store and admin folder

    Copied all files and installed store with no problems. But I can't get into admin or store both are just white page. After reading on here I went to logs folder and I am getting

    [12-Apr-2015 14:09:08 America/Chicago] PHP Warning: require_once(/home/e4mpdnk7/public_html/aydan1/includes/classes/vendors/password_compat-master/lib/password.php): failed to open stream: No such file or directory in /home/e4mpdnk7/public_html/aydan1/includes/classes/class.zcPassword.php on line 52
    [12-Apr-2015 14:09:08 America/Chicago] PHP Fatal error: require_once(): Failed opening required '/home/e4mpdnk7/public_html/aydan1/includes/classes/vendors/password_compat-master/lib/password.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/e4mpdnk7/public_html/aydan1/includes/classes/class.zcPassword.php on line 52

    I went into the class.zcPassword.php file and add (include_path='.:/usr/lib/php:/usr/local/lib/php'). It did not change anything. Not sure I did it right


    <?php
    /**
    * File contains just the zcPassword class
    *
    * @package classes
    * @copyright Copyright 2003-2014 Zen Cart Development Team
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version GIT: $Id: Author: wilt Modified in v1.5.4 $
    */
    /**
    * class zcPassword
    *
    * helper class for managing password hashing for different PHP versions
    *
    * Updates admin/customer tables on successful login
    * For php < 5.3.7 uses custom code to create hashes using SHA256 and longer salts
    * For php >= 5.3.7 and < 5.5.0 uses https://github.com/ircmaxell/PHP-PasswordLib
    * For php >= 5.5.0 uses inbuilt php functions
    *
    * @package classes
    */
    class zcPassword extends base
    {
    /**
    *
    * @var $instance object
    */
    protected static $instance = null;
    /**
    * enforce singleton
    *
    * @param string $phpVersion
    */
    public static function getInstance($phpVersion)
    {
    if (! self::$instance) {
    $class = __CLASS__;
    self::$instance = new $class($phpVersion);
    }
    return self::$instance;
    }
    /**
    * constructor
    *
    * @param string $phpVersion
    */
    public function __construct($phpVersion = PHP_VERSION)
    {
    if (version_compare($phpVersion, '5.3.7', '<')) {
    require_once (realpath(dirname(__FILE__)) . '/../functions/password_compat.php');
    } elseif (version_compare($phpVersion, '5.5.0', '<')) {
    XXXXXXXXX require_once (include_path='.:/usr/lib/php:/usr/local/lib/php') . '/vendors/password_compat-master/lib/password.php');
    }
    }
    /**
    * Determine the password type
    *
    * Legacy passwords were hash:salt with a salt of length 2
    * php < 5.3.7 updated passwords are hash:salt with salt of length > 2
    * php >= 5.3.7 passwords are BMCF format
    *
    * @param string $encryptedPassword
    * @return string
    */
    function detectPasswordType($encryptedPassword)
    {
    $type = 'unknown';
    $tmp = explode(':', $encryptedPassword);
    if (count($tmp) == 2) {
    if (strlen($tmp [1]) > 2) {
    $type = 'compatSha256';
    } elseif (strlen($tmp [1]) == 2) {
    $type = 'oldMd5';
    }
    }
    return $type;
    }
    /**
    * validate a password where format is unknown
    *
    * @param string $plain
    * @param string $encrypted
    * @return boolean
    */
    public function validatePassword($plain, $encrypted)
    {
    $type = $this->detectPasswordType($encrypted);
    if ($type != 'unknown') {
    $method = 'validatePassword' . ucfirst($type);
    return $this->{$method}($plain, $encrypted);
    }
    $result = password_verify($plain, $encrypted);
    return $result;
    }
    /**
    * validate a legacy md5 type password
    *
    * @param string $plain
    * @param string $encrypted
    * @return boolean
    */
    public function validatePasswordOldMd5($plain, $encrypted)
    {
    if (zen_not_null($plain) && zen_not_null($encrypted)) {
    $stack = explode(':', $encrypted);
    if (sizeof($stack) != 2)
    return false;
    if (md5($stack [1] . $plain) == $stack [0]) {
    return true;
    }
    }
    return false;
    }
    /**
    * validate a SHA256 type password
    *
    * @param string $plain
    * @param string $encrypted
    * @return boolean
    */
    public function validatePasswordCompatSha256($plain, $encrypted)
    {
    if (zen_not_null($plain) && zen_not_null($encrypted)) {
    $stack = explode(':', $encrypted);
    if (sizeof($stack) != 2)
    return false;
    if (hash('sha256', $stack [1] . $plain) == $stack [0]) {
    return true;
    }
    }
    return false;
    }
    /**
    * Update a logged in Customer password.
    * e.g. when customer wants to change password
    *
    * @param string $plain
    * @param integer $customerId
    * @return string
    */
    public function updateLoggedInCustomerPassword($plain, $customerId)
    {
    $this->confirmDbSchema('customer');
    global $db;
    $updatedPassword = password_hash($plain, PASSWORD_DEFAULT);
    $sql = "UPDATE " . TABLE_CUSTOMERS . "
    SET customers_password = assword:
    WHERE customers_id = :customersId:";

    $sql = $db->bindVars($sql, ':customersId:', $_SESSION ['customer_id'], 'integer');
    $sql = $db->bindVars($sql, 'assword:', $updatedPassword, 'string');
    $db->Execute($sql);
    return $updatePassword;
    }
    /**
    * Update a not logged in Customer password.
    * e.g. login/timeout
    *
    * @param string $plain
    * @param string $emailAddress
    * @return string
    */
    public function updateNotLoggedInCustomerPassword($plain, $emailAddress)
    {
    $this->confirmDbSchema('customer');
    global $db;
    $updatedPassword = password_hash($plain, PASSWORD_DEFAULT);
    $sql = "UPDATE " . TABLE_CUSTOMERS . "
    SET customers_password = assword:
    WHERE customers_email_address = :emailAddress:";

    $sql = $db->bindVars($sql, ':emailAddress:', $emailAddress, 'string');
    $sql = $db->bindVars($sql, 'assword:', $updatedPassword, 'string');
    $db->Execute($sql);
    return $updatedPassword;
    }
    /**
    * Update a not logged in Admin password.
    *
    * @param string $plain
    * @param string $admin
    * @return string
    */
    public function updateNotLoggedInAdminPassword($plain, $admin)
    {
    $this->confirmDbSchema('admin');
    global $db;
    $updatedPassword = password_hash($plain, PASSWORD_DEFAULT);
    $sql = "UPDATE " . TABLE_ADMIN . "
    SET admin_pass = assword:
    WHERE admin_name = :adminName:";

    $sql = $db->bindVars($sql, ':adminName:', $admin, 'string');
    $sql = $db->bindVars($sql, 'assword:', $updatedPassword, 'string');
    $db->Execute($sql);
    return $updatedPassword;
    }
    /**
    * Ensure db schema has been updated to support the required password lengths
    * @param string $mode
    */
    public function confirmDbSchema($mode = '') {
    global $db;
    if ($mode == '' || $mode == 'admin') {
    $sql = "ALTER TABLE " . TABLE_ADMIN . " MODIFY admin_pass VARCHAR( 255 ) NOT NULL DEFAULT ''";
    $db->Execute($sql);
    $sql = "ALTER TABLE " . TABLE_ADMIN . " MODIFY prev_pass1 VARCHAR( 255 ) NOT NULL DEFAULT ''";
    $db->Execute($sql);
    $sql = "ALTER TABLE " . TABLE_ADMIN . " MODIFY prev_pass2 VARCHAR( 255 ) NOT NULL DEFAULT ''";
    $db->Execute($sql);
    $sql = "ALTER TABLE " . TABLE_ADMIN . " MODIFY prev_pass3 VARCHAR( 255 ) NOT NULL DEFAULT ''";
    $db->Execute($sql);
    $sql = "ALTER TABLE " . TABLE_ADMIN . " MODIFY reset_token VARCHAR( 255 ) NOT NULL DEFAULT ''";
    $db->Execute($sql);
    }
    if ($mode == '' || $mode == 'customer') {
    $found = false;
    $sql = "show fields from " . TABLE_CUSTOMERS;
    $result = $db->Execute($sql);
    while (!$result->EOF && !$found) {
    if ($result->fields['Field'] == 'customers_password' && strtoupper($result->fields['Type']) == 'VARCHAR(255)') {
    $found = true;
    }
    $result->MoveNext();
    }
    if (!$found) {
    $sql = "ALTER TABLE " . TABLE_CUSTOMERS . " MODIFY customers_password VARCHAR( 255 ) NOT NULL DEFAULT ''";
    $db->Execute($sql);
    }
    }
    return;
    }
    }

    the XXXXXXXXX is line 52 on the php where I add the (include_path='.:/usr/lib/php:/usr/local/lib/php')


    My cpanel said my PHP was at 5.4 and I saw where it suggested to use the highest so I changed it to 5.5 and I still cannot get anything but white pages.

    when you sign in at bearlymakinit.com/new_ayden1 after hitting enter it comes up as bearlymakinit.com/new_aydan1/ I don't know if that means anything either. But when I sign into the old website the / is not there.

    Any suggestions?

  2. #2
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: White pages in both store and admin folder

    Looks like might be related to one of the known issues at: http://www.zen-cart.com/showthread.p...s)-with-v1-5-4
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Feb 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: White pages in both store and admin folder

    Quote Originally Posted by mc12345678 View Post
    Looks like might be related to one of the known issues at: http://www.zen-cart.com/showthread.p...s)-with-v1-5-4

    I saw that one and none of the entries apply to a class.zcPassword.php error.

  4. #4
    Join Date
    Feb 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: White pages in both store and admin folder

    gave up and did a complete new install. Thank you

 

 

Similar Threads

  1. v150 Filter drop down and text are both white
    By vinayag79 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 20 Feb 2012, 05:50 PM
  2. v150 Country drop down background and forn are both white
    By vinayag79 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 12 Feb 2012, 04:28 PM
  3. Replies: 5
    Last Post: 16 Mar 2011, 06:46 AM
  4. Moved store into folder for updating. Both store registering updates
    By BrooklynArtist in forum Installing on a Linux/Unix Server
    Replies: 6
    Last Post: 22 Jan 2011, 07:38 PM
  5. Admin Pages Broken After Rename of Store Admin Folder
    By sarshmeh in forum Basic Configuration
    Replies: 4
    Last Post: 26 Mar 2010, 02:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg