SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Linux Upgrade Issue

    Hello,

    I had 2 php scripts working prior to upgrade to Linux 5.2.9.

    No changes were made to these 2 scripts.

    Does any one know what could have changed to make the scripts stop working?

    Thanks.

  2. #2
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Welcome to the forums.

    PHP 5.2.9, you mean? I doubt it has anything to do with Linux as an operating system.

    Possible issues could be that you have overridden settings in PHP.ini when you upgraded, that your code is outdated or you are using old practises deemed unsafe (therefore removed by default).

    Without you showing us the code, we can't tell you.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  3. #3
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, it's hard to tell what you mean, did you really upgrade Linux kernel or just php or maybe moved to a different Linux server?

  4. #4
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm sorry I was unclear.

    My new boss said....

    We upgraded from an old version of linux running 5.?? to a new version of linux running 5.2.9.

    I am a real newbie to this.

  5. #5
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yeah, but we need to see the code to find out what's wrong

    If you have error_reporting set off, turn it on and it may output some errors (which can help you solve the problems)

    It being Linux should have nothing to do with it.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  6. #6
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    @Kath, press your boss to give those exact numbers, and post some code.

  7. #7
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried posting my code, but it indicates that I'm not allowed to post my code.

  8. #8
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You are allowed to post your code, but you might have to remove the URLs inside it (spam protection, you can post urls after 10 posts - may be frustrating at first but it really helps to stop spamming).

    It will definitely help if you post the code inside [php] bbcode tags.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  9. #9
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <?
    include "config.php";
    session_start();
    if ($logout=="true") { $_SESSION = array(); unset($logname); unset($userid); unset($u_level); unset($logout); header ("Location: upload.php");}

    if (@mysql_connect($host,$dbusername,$dbpass)) {} else { echo "DB Connection Error:".mysql_errno().": ".mysql_error()."<BR>"; exit; }
    if (@mysql_select_db($workingdb)) {} else { echo "Table Connection Error:".mysql_errno().": ".mysql_error()."<BR>"; exit; }

    if(!isset($userid))
    {
    $_SESSION = array();
    $u=$REQUEST_URI;
    ?>
    <html><head><title> Please Log In for Access <?php if(!isset($userid)) {echo $_SERVER['PHP_SELF'];}
    ?></title></head>
    <body><form method="POST" action="/ac.php">
    <table width="450" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#000000">
    <tr>
    <td colspan="2" align="center" bordercolor="#FFFFFF" bgcolor="#663366"><font color="#FFFFFF" size="6" face="Verdana, Arial, Helvetica, sans-serif"><strong>Login Required </strong></font></td>
    </tr>
    <tr align="center">
    <td colspan="2" bordercolor="#FFFFFF"><font size="-1" face="Arial">You must log in to access this server. </font></td>
    </tr>
    <tr>
    <td width="238" align="right" valign="middle" bordercolor="#FFFFFF">
    <font face="Arial, Helvetica, sans-serif">User ID: <br>
    Password</font>: <br>
    </td>
    <td width="198" align="left" bordercolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif">
    <input type="hidden" name="loginnow" value="65987412">
    <input type="text" name="userid" size="20">
    <input name="pwd" type="password" size="20" maxlength="20">
    </font></td>
    </tr>
    <tr align="center">
    <td colspan="2" valign="middle" bordercolor="#FFFFFF"><input name="submit" type="submit" value="Log in"></td>
    </tr>
    </table></form>
    </body></html>
    <? exit;
    }

    if ($loginnow=="65987412")
    {

    if ($userid=="") {$userid="Bad Login";}
    if ($pwd=="") {$pwd="*B*a*d* *L*o*g*i*n*";}
    unset($loginnow);
    $ip=$REMOTE_ADDR;
    $dns = gethostbyaddr($ip);
    $sql = "SELECT id,username,companyname,password,auth_level FROM `authority` WHERE username = '$userid'";
    $result = mysql_query($sql);
    if (!$result)
    {
    error("A database error occurred while checking your ".
    "login details.\\nIf this error persists, please ".
    "contact HardSoft Systems Ltd.");
    }

    $loginresult=mysql_fetch_array($result);
    $co_name=$loginresult["companyname"];
    $u_level=$loginresult["auth_level"];
    $logname=$loginresult["username"];
    $userid=$loginresult["id"];
    $dbpwd=$loginresult[password];

    #$pwd=md5($pwd);
    $pwd='';

    if ($dbpwd==$pwd) { $validuser=true; } else { $validuser=false; }

    if ($validuser) {
    session_register("userid");
    session_register("co_name");
    session_register("logname");
    session_register("u_level");
    if ($conf != true) $reload=true;
    header("Location: upload.php");
    }
    else {
    $_SESSION = array(); unset($logname); unset($userid); unset($u_level); unset($logout);
    $badlogin=true;
    ?>
    <html><head><title> Access Denied </title></head>
    <body>
    <table width="450" border="1" align="center" cellpadding="2" cellspacing="0">
    <tr>
    <td align="center" bgcolor="#663366"><font color="#FFFFFF" size="5" face="Verdana, Arial, Helvetica, sans-serif"><strong>Access Denied </strong></font></td>
    </tr>
    <tr>
    <td align="center"><font face="Arial, Helvetica, sans-serif">Your user ID or password is incorrect, or you are not a registered user on this site. To try logging in again, click <url goes here>?logout=true">here</a>.
    </td>
    </tr>
    </table>
    </body></html>
    <? exit;
    }
    } //loginnow
    ?>

  10. #10
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    I have removed all the links from upload.php and it still won't let me upload it.

  11. #11
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Me
    It will definitely help if you post the code inside [php] bbcode tags.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona


Tags for this Thread

Bookmarks

Posting Permissions

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