Results 1 to 5 of 5

Thread: More PHP help -

  1. #1
    Join Date
    Dec 2006
    Posts
    1,128
    Tokens
    0

    Latest Awards:

    Default More PHP help -

    Yes, lets go..

    Edit Pass script:
    Getting these errors

    Warning: main(functions.php): failed to open stream: No such file or directory in /home/speedan/public_html/sc/admin/editpass.php on line 6

    Warning: main(functions.php): failed to open stream: No such file or directory in /home/speedan/public_html/sc/admin/editpass.php on line 6

    Warning: main(functions.php): failed to open stream: No such file or directory in /home/speedan/public_html/sc/admin/editpass.php on line 6

    Warning: main(): Failed opening 'functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/speedan/public_html/sc/admin/editpass.php on line 6

    Fatal error: Cannot instantiate non-existent class: checklogin in /home/speedan/public_html/sc/admin/editpass.php on line 7

    code:

    PHP Code:
    <?php
    if(isset($_SESSION["EON_CNTPNL_USERNAME"]))
    $check->login(); }
    else{
    session_start();
    include(
    "inc/config.php");
    $check = new checklogin;
    $check->login(); }
    echo(
    "
                      <b>Edit your password!</b><br/>
                     <br/>"
    );
    if(
    $_GET["act"] == "update")
    {
        
    $password clean($_POST["password"]);
        
    $password2 md5($password);
    $password2 sha1($password2);
        
    mysql_query("UPDATE `users` SET `password` = '$password2' WHERE `username` = '{$_SESSION["panel_username"]}'");
        echo(
    "Password Updated");
        exit;
    }
    else
    {
        
    $rand generateRandStr(13);
        echo(
    "Please set a new password:<br/><form action=\"?page=editpass&amp;act=update\" method=\"POST\"><input type=\"text\" name=\"password\" value=\"$rand\" class=\"formbox\"> <b><-- Suggested</b><br/><br/><input type=\"submit\" name=\"submit\" value=\"Change Password\"><br/><br/>
        The suggested password was 
    $rand<br/>(So you can copy and paste)</form>");
    }
    ?>
    This one aswell.

    PHP Code:
    <?
    include('../inc/dotconnect.php');

    $id $_POST['id'];
    $name $_POST['name'];
    $owner $_POST['owner'];
    $port $_POST['port'];
    $listeners $_POST['listeners'];

    $result mysql_query("SELECT * FROM servers WHERE port='$port'")
    or die(
    mysql_error());  

    $row mysql_fetch_array$result );
    $id $row['id'];

    $num=mysql_num_rows($result); 

    if(
    $num 1){ } ELSE { echo 'Server with the chosen port already exists, Please cose this windows and try again'; die();}

    mysql_query("INSERT INTO servers  (id, nick, owner, port, listeners) VALUES('$id', '$name', '$owner', '$port', '$listeners' ) "
    or die(
    mysql_error());  

    ?>

    <p><font face="Verdana" size="4">Your information has been updated, You may now 
    close this window</font></p>

    <table border="1" width="51%" id="table1">
        <tr>
            <td width="135">Server Name</td>
            <td><? echo $name ?></td>
        </tr>
        <tr>
            <td width="135">owner</td>
            <td><? echo $owner ?></td>
        </tr>
        <tr>
            <td width="135">Port</td>
            <td><? echo $port ?></td>
        </tr>
        <tr>
            <td width="135">Listeners</td>
            <td><? echo $listeners ?></td>
        </tr>
    </table>
    Help, thanks

  2. #2
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Why cant people just read the error messages?

    Warning: main(functions.php): failed to open stream: No such file or directory in /home/speedan/public_html/sc/admin/editpass.php on line 6

    Its pretty simple. the file functions.php, did not open. Becuse that files DOES NOT EXISTS, where your script is saying it should...

  3. #3
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    693
    Tokens
    0

    Default

    Quote Originally Posted by 01101101entor View Post
    Why cant people just read the error messages?

    Warning: main(functions.php): failed to open stream: No such file or directory in /home/speedan/public_html/sc/admin/editpass.php on line 6

    Its pretty simple. the file functions.php, did not open. Becuse that files DOES NOT EXISTS, where your script is saying it should...
    Or it could be CHMOD'd incorrectly, but yes, I agree. Annoying as hell when it says the error, but they still ask.
    XHTML, CSS, AJAX, JS, php, MySQL.

    --

    HxF moderators can't read timestamps.

  4. #4
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    Nick.

    Your the php expert... You should know that. Seriously. If you cant identify that error you cant code well. Its a simple thing.


    You don't like me
    Chances are I don't like you.

  5. #5
    Join Date
    Dec 2006
    Posts
    1,128
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by 01101101entor View Post
    Why cant people just read the error messages?

    Warning: main(functions.php): failed to open stream: No such file or directory in /home/speedan/public_html/sc/admin/editpass.php on line 6

    Its pretty simple. the file functions.php, did not open. Becuse that files DOES NOT EXISTS, where your script is saying it should...
    I did that last night, but thanks

Posting Permissions

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