Webmaster Sun Login
Not a member yet? Sign up

fattal error

  • HOME
  • FORUMS
  • WHAT'S NEW
  • BLOGS
  • MARKETPLACE
  • ADVERTISING
  • SPECIAL OFFERS
  • WEB HOSTING
  • QUICK MENU
  • REGISTER HERE - Join us for FREE
Results 1 to 3 of 3

Thread: fattal error

    Stick this thread
  1. #1
    Join Date
    Dec 2019
    Posts
    3
    Thumbs Up/Down
    Received: 0/0
    Given: 0/0
    Thanks
    0
    Thanked 0 Times in 0 Posts

    fattal error

    Greetings to everyone,

    I have a php webiste which its change password page is displaying blank / white page and i got this in the error log :

    Failed opening required 'lib/config.php' (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear')

    The page code is below :

    <?php
    /**
    * index.php
    *
    * Main user page after login
    */

    require_once 'lib/config.php';
    require_once 'lib/functions.php';
    require_once 'lib/opendb.php';
    require_once 'lib/checkUser.php';

    $errorMessage = '';
    if (isset($_POST['btnModify'])) {
    $userId = $_SESSION['userId'];
    $oldPassword = $_POST['txtOldPassword'];
    $newPassword = $_POST['txtNewPassword1'];

    $sql = "SELECT userId FROM tbl_user WHERE userId = $userId AND password = PASSWORD('$oldPassword')";
    $result = mysql_query($sql) or die(mysql_error());
    if (mysql_num_rows($result) != 1) {
    $errorMessage = 'Old password is incorrect';
    } else {
    $sql = "UPDATE tbl_user
    SET password = PASSWORD('$newPassword')
    WHERE userId = $userId";
    mysql_query($sql) or die('Modify failed. ' . mysql_error());
    header('Location: index.php');
    exit;
    }
    }

    $pageTitle = 'Change Password';
    require_once 'lib/header1.php';
    ?>
    <p align="center"><strong><font color="#660000"><?php echo $errorMessage; ?></font></strong></p>
    <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post" name="frmPassword" id="frmPassword">
    <table width="550" border="0" align="center" cellpadding="2" cellspacing="1" class="whiteTable">
    <tr>
    <td width="150" align="left" valign="top">Old Password</td>
    <td width="10" align="left" valign="top">:</td>
    <td align="left" valign="top">
    <input name="txtOldPassword" type="password" class="box" id="txtOldPassword" size="20" maxlength="20"></td>
    </tr>
    <tr>
    <td width="150" align="left" valign="top">New Password</td>
    <td width="10" align="left" valign="top">:</td>
    <td align="left" valign="top"><input name="txtNewPassword1" type="password" class="box" id="txtNewPassword1" size="20" maxlength="20"></td>
    </tr>
    <tr>
    <td width="150" align="left" valign="top">Repeat New Password</td>
    <td width="10" align="left" valign="top">:</td>
    <td align="left" valign="top">
    <input name="txtNewPassword2" type="password" class="box" id="txtNewPassword2" size="20" maxlength="20">
    <small> </small></td>
    </tr>
    <tr>
    <td width="150">&nbsp;</td>
    <td width="10">&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td colspan="3"><div align="center">
    <input name="btnModify" type="submit" class="bluebox" id="btnModify" value="Submit" onClick="return checkPassword();">
    &nbsp;&nbsp;
    <input name="btnCancel" type="button" class="bluebox" id="btnCancel" onClick="window.location.href='listUser.php';" value="Cancel">
    </div></td>
    </tr>
    <tr>
    <td colspan="3">&nbsp;</td>
    </tr>
    </table>
    </form>
    <script language="JavaScript" type="text/javascript">
    function checkPassword()
    {
    theForm = window.document.frmPassword;

    if (theForm.txtOldPassword.value == '') {
    alert('Enter current password');
    theForm.txtOldPassword.focus();
    return false;
    } else if (theForm.txtNewPassword1.value == '') {
    alert('Enter new password');
    theForm.txtNewPassword1.focus();
    return false;
    } else if (theForm.txtNewPassword2.value == '') {
    alert('Repeat new password');
    theForm.txtNewPassword2.focus();
    return false;
    } else if (theForm.txtNewPassword1.value != theForm.txtNewPassword2.value) {
    alert('New password don\'t match');
    theForm.txtNewPassword2.focus();
    return false;
    } else {
    return true;
    }
    }
    </script>
    <?php
    require_once 'lib/footer1.php';
    ?>



    ==================================


    Please help me with solution. Thank you I apreciate

  2. #2
    Join Date
    May 2016
    Location
    USA
    Posts
    1,815
    Thumbs Up/Down
    Received: 551/2
    Given: 28/1
    Thanks
    13
    Thanked 228 Times in 211 Posts
    The error is telling you the problem. The config.php file is not in the lib folder above the running script.

    Navigate to the directory the script is running in.

    1. Is there a lib folder in that directory?
    2. If so, is there a config.php file in the lib folder?

  3. #3
    Join Date
    Feb 2013
    Posts
    189
    Thumbs Up/Down
    Received: 8/0
    Given: 130/0
    Thanks
    125
    Thanked 12 Times in 10 Posts
    Have you check file lib/config.php ?
    or the problem can come from PHP version, I would suggest you to change to PHP 7 and retry your web script.

Newer Threads

  1. poco
    ethelglover
    Replies: 3 | Views: 521
    Last post by ethelglover, 02-10-2020, 07:00 AM
  2. ORLOVA
    watersquad
    Replies: 6 | Views: 215
    Last post by watersquad, 02-16-2020, 12:18 PM
  3. IamDonna
    BillEssley
    Replies: 2 | Views: 263
    Last post by BillEssley, 02-11-2020, 04:16 PM
  4. simonrichard
    Ranking Loss for some keyword?
    By simonrichard in forum Google
    Brill Mindz
    Replies: 6 | Views: 288
    Last post by Brill Mindz, 02-13-2020, 09:15 AM

Older Threads

  1. Tony Stark
    BillEssley
    Replies: 3 | Views: 399
    Last post by BillEssley, 02-11-2020, 04:17 PM
  2. ayanii21
    jassdomin
    Replies: 3 | Views: 281
    Last post by jassdomin, 02-15-2020, 05:21 AM
  3. ayanii21
    jassdomin
    Replies: 2 | Views: 221
    Last post by jassdomin, 02-15-2020, 05:36 AM
  4. susanburling
    Rob Whisonant
    Replies: 1 | Views: 312
    Last post by Rob Whisonant, 02-06-2020, 07:54 PM
  5. poco
    Rob Whisonant
    Replies: 1 | Views: 133
    Last post by Rob Whisonant, 02-06-2020, 05:47 AM

Latest Threads

  1. Carlos
    Carlos
    Replies: 0 | Views: 32
    Last post by Carlos, Yesterday, 11:34 PM
  2. susanburling
    Brill Mindz
    Replies: 2 | Views: 77
    Last post by Brill Mindz, Yesterday, 09:08 AM
  3. simonrichard
    simonrichard
    Replies: 0 | Views: 110
    Last post by simonrichard, 02-19-2020, 02:18 AM
  4. shoptechmedia
    shoptechmedia
    Replies: 0 | Views: 107
    Last post by shoptechmedia, 02-18-2020, 08:25 AM
  5. simonrichard
    Rob Whisonant
    Replies: 1 | Views: 133
    Last post by Rob Whisonant, 02-18-2020, 06:59 AM

Similar Threads

  1. sunny_pro
    sunny_pro
    Replies: 0 | Views: 854
    Last post by sunny_pro, 05-20-2018, 09:00 PM
  2. sunny_pro
    Ridew
    Replies: 6 | Views: 2242
    Last post by Ridew, 02-01-2018, 03:42 PM
  3. mitali
    skullofskill
    Replies: 10 | Views: 2123
    Last post by skullofskill, 01-10-2017, 07:23 AM
  4. denvercardonations
    Namecheap and error 508's
    By denvercardonations in forum Web Hosting
    RDO Servers
    Replies: 6 | Views: 2307
    Last post by RDO Servers, 03-02-2016, 11:57 AM
  5. lindanancy
    Tommy
    Replies: 3 | Views: 2103
    Last post by Tommy, 02-20-2013, 03:39 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
  •  

Internet Marketing Forum

Webmaster Sun is a forum where you’ll find in-depth discussions and resources to help you succeed on the web whether you are new or experienced. You’ll find it all here. With topics ranging from internet marketing, search engine optimization, social networking, make money online, web hosting, affiliate marketing as well as hands-on technical support for web design, programming and more. We are a growing community of like-minded people that is keen to help and support each other with ambitions and online endeavors. Learn and grow, make friends and contacts for life.

Come Hang Out With Us

    Facebook Twitter Webmaster Forum Google+

    Webmaster Sun Logo
Copyright ©2012 - 2019, WebmasterSun.com. All rights reserved. Internet marketing forum for internet marketers, webmasters, web hosting providers, designers and affiliate marketers.

Welcome to Webmaster Sun

The World's Number 1 Webmaster Community, SEO and Marketplace

Log in!

Continue with Facebook
Continue With Email. By signing up you indicate that you have read and agree to the Terms of Service and Privacy Policy.

Sign in Manually

Need an account? Sign up now!