SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2007
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Blank page or missing DIV

    Before few hrs I setup a Apache in my windows 2003 server and config PHP.The phpinfo(); works well with me.

    http://173.45.80.154:8080/phpinfo.php

    But when I tried to make my script using class its not working.

    The code :


    Code PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    body {
    	margin-left: 0px;
    	margin-top: 0px;
    	margin-right: 0px;
    	margin-bottom: 0px;
    }
    -->
    </style></head>
     
    <body>
     
    <div class="wrapper">
     
    <div class="head_bg">
     
    <div class="flash">
      <div align="center"><img src="images/RotatingGlobe.gif" /></div>
    </div>
     
    <div class="logo"></div>
     
    <div class="caption"></div>
     
    </div>
     
     
     
    <div class="header">
     
    <div class="pic1"></div>
     
    <div class="pic2"></div>
     
    <div class="pic3"></div>
     
    <div class="pic4"></div>
     
    <div class="pic5"></div>
     
    <div class="pic6"></div>
     
    <div class="pic7"></div>
     
    <div class="pic8"></div>
     
    </div>
     
    <div class="menu_container">
     
    <li  id="menu_current" class="menu_home"><a href="#">Home</a></li>
    <li class="menu_home"><a href="#">DownloadDialer</a></li>
     
          <li class="menu_home"><a href="#">Contact</a></li>
     
    	  </ul>
     
    </div>
     
    <div class="content_main">
     
    <div class="welcome">Welcome To Free2Call</div>
     
    <div class="content">
     
    <div class="login">
    <form name="form1" method="post" action="">
    <center>
      <table width="200" border="1" align="center">
        <tr>
          <td width="115">User Name : </td>
          <td width="152"><input type="text" name="user" id="textfield"></td>
        </tr>
        <tr>
          <td>Password : </td>
          <td><label>
            <input type="password" name="password" id="textfield2">
          </label></td>
        </tr>
      </table>
     
        <label>
     
     
          <input type="submit" name="submit" id="button" value="Submit">
     
        </label>
      </p>
      </center>
    </form></div>
     
    </div>
     
    </div>
     
    <div class="footer">copyright  2008-2009.GALTech .All Rights Reserved</div>
     
    </div>
     
    </body>
    </html>
    <?php 
     
    if(isset($_REQUEST['submit']))
    {
    require_once("classes/DB.Class.php");
     
    $myusername=$_POST['user'];
    $mypassword=$_POST['password'];
     
    // To protect MySQL injection (more detail about MySQL injection)
     
    $obj=new DBCon();
    $obj->table_name = "clientse164" ;
    $obj->sel_condition = "login='$myusername' and password='$mypassword'" ;
     
    $result = $obj->SelectSQL() ;
     
     
    // Mysql_num_row is counting table row
    $count=mysql_num_rows($result);
    // If result matched $myusername and $mypassword, table row must be 1 row
     
     
     
    if($count==1){
     
     
    }
    else {
    echo "<font color=RED>Wrong Username or Password</font>";
    }
    }
     
    ?>

    I dont know why its not working while even simple file upload works.

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    view your error log.

  3. #3
    SitePoint Evangelist
    Join Date
    Jun 2007
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by crmalibu View Post
    view your error log.
    where I can view it ?

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your phpinfo() hasn't defined one, so errors are probably saved to your apache error log, which is probably in a dir named logs.

  5. #5
    SitePoint Evangelist
    Join Date
    Jun 2007
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got the error :

    [Fri May 01 09:47:49 2009] [error] [client 59.93.3.3] PHP Fatal error: Call to undefined function mysql_connect() in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\classes\\DB.Class.php on line 52, referer: http://173.45.80.154:8080/
    can anyone advise ?

  6. #6
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you need to enable to the mysql extension

    you can do a search using part of the error message for more info
    "Call to undefined function mysql_connect"

  7. #7
    SitePoint Evangelist
    Join Date
    Jun 2007
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow !

    Thanks a lot at last after 10hrs I got the problem rectified.Now it works for me.

    There was three problems :

    1. Extension directory path was wrong
    2. lib_mysql.dll was not copied to windows dir
    3. mysql extension in php.in was not config.

    Thanks all!

    crmailbu thanks a lot!


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
  •