IIS - PHP page load only after reloading 2-3 times - php

So i have this page setup for my private game server. I host the game server and web on the same dedicated server running windows server 2016. I use IIS to host the website. Right now am facing a problem, page only loads after reloading for 2-3 times. Till then it returns HTTP error 500. Once the page is loaded, i have to refresh multiple times to load each content. What is going on ?
Page -> www.ram-sro.com
Index.php
<?php
include("_incl/config.inc.php");
$sec = new Security();
$conf = new Config();
$mssql = new mssql();
$mssql->dbOpen($conf->accountDbName);
$modDir = "mod/";
$modExt = ".php";
session_start();
?>
<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title><?php echo "$conf->siteName" ?></title>
<link type="text/css" rel="stylesheet" media="all" href="css/style.css" />
<link rel="shortcut icon" href="img/favicon.png" type="image/x-icon" />
<meta name="description" content="<?php echo $conf->description; ?>" />
<meta name="keywords" content="<?php echo $conf->keywords; ?>" />
<script type="text/javascript">
<!--
function clearText(formfield){
if (formfield.defaultValue==formfield.value) {
formfield.value = ""
}
}
-->
</script>
</head>
<body>
<center>
<div id="page-body">
<div class="page-body topbox">
<div class="page-body blackspace"></div>
<div class="page-body topbox-content">
<div class="topbox-webtitle">
</div>
<div class="topbox-user">
<div class="social-networks">
<img src="img/fb-icon.png" width="40px" height="40px;" alt="Visit us at facebook!" />
<img src="img/tw-icon.png" width="40px" height="40px;" alt="Visit us at twitter!" />
</div>
<div class="form">
<?php include($modDir."user".$modExt);?>
</div>
</div>
</div>
</div>
<div class="page-body spacer"></div>
<div class="page-body menubox">
<div class="menubox-content">
<div id="menubar">
<ul>
<?php
include($modDir."menu".$modExt);
?>
</ul>
</div>
</div>
</div>
<div class="page-body spacer"></div>
<div class="page-body content">
<div class="page-body leftblock">
<?php
include($modDir."page".$modExt);
?>
</div>
<div class="page-body rightblock">
<?php
include($modDir."social".$modExt);
?>
<div class="page-body spacer"></div>
<div class="page-body info">
<?php
include($modDir."info".$modExt);
?>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</center>
</body>
</html>

Related

Receiving blank view with status code 200 in vagrant

I am very new to Laravel and I have been given a very old project and asked to use vagrant/homestead. The project uses php7.2 and doesn't have php artisan. It also doesn't have public folder. The problem is that the I am getting a blank view with status code 200. My homestead.yaml is:
folders:
- map: C:\Users\Desktop\school_erp_lms
to: /home/vagrant/school_lms
sites:
- map: school-lms.test
to: /home/vagrant/school_lms
php: "7.2"
databases:
- u789138695_schoolerp
route.php is:
Route::get('/login','LoginController#index');
LoginController is:
<?php
namespace App\Http\Controllers;
use View;
class LoginController extends Controller
{
public $data = array();
public function __construct()
{
$this->panelInit = new \DashboardInit();
$this->data['panelInit'] = $this->panelInit;
}
public function index()
{
return View::make('login', $this->data);
}
}
.env is:
DB_NAME=u789138695
DB_USERNAME=user
DB_PASSWORD=""
DEBUG=true
login.blade.php is:
<!DOCTYPE html>
<html lang="en" <?php if($panelInit->isRTL == 1){ ?>dir="rtl"<?php } ?> style="background:none;">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<!-- Favicon icon -->
<?php if($panelInit->settingsArray['favicon'] == "e"){ ?>
<link rel="icon" type="image/png" sizes="16x16" href="{{URL::asset('assets/images/favicon.png')}}">
<?php } ?>
<title><?php echo $panelInit->settingsArray['siteTitle'] . " | " . $panelInit->language['signIn']; ?></title>
<!-- Bootstrap Core CSS -->
<link href="{{URL::asset('assets/plugins/bootstrap/css/bootstrap.min.css')}}" rel="stylesheet">
<!-- Custom CSS -->
<?php if($panelInit->isRTL == 1){ ?>
<link href="{{URL::asset('assets/css/style-rtl.css')}}" rel="stylesheet">
<link href="{{URL::asset('assets/plugins/bootstrap-rtl-master/dist/css/custom-bootstrap-rtl.css')}}" rel="stylesheet" type="text/css" />
<?php }else{ ?>
<link href="{{URL::asset('assets/css/style.css')}}" rel="stylesheet">
<?php } ?>
<link href="{{URL::asset('assets/css/custom.css')}}" id="theme" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<?php
$bgStyling = "";
if($panelInit->settingsArray['authPageImage'] == "1"){
$bgStyling .= "background-image:url('".URL::asset('assets/images/login-register.jpg')."'); ";
}
if($panelInit->settingsArray['authPageColor'] != ""){
$bgStyling .= "background-color:".$panelInit->settingsArray['authPageColor'].";";
}
?>
<body class="loginMark" style="<?php echo $bgStyling; ?>;background-attachment:fixed; background-repeat: repeat-y;background-size: cover;" >
<!-- ============================================================== -->
<!-- Preloader - style you can find in spinners.css -->
<!-- ============================================================== -->
<div class="preloader">
<svg class="circular" viewBox="25 25 50 50">
<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10" /> </svg>
</div>
<!-- ============================================================== -->
<!-- Main wrapper - style you can find in pages.scss -->
<!-- ============================================================== -->
<section id="wrapper" <?php if($panelInit->settingsArray['loginPageStyle'] == "r"){ echo 'class="login-register login-sidebar" style="'.$bgStyling.'"'; } ?>>
<div <?php if($panelInit->settingsArray['loginPageStyle'] == "r"){ echo 'class="login-box card"'; }else{ echo 'class="login-register" '; } ?> >
<?php if($panelInit->settingsArray['loginPageStyle'] == "c"){ ?><div class="login-box card"><?php } ?>
<div class="card-block">
<form class="form-horizontal form-material" id="loginform" action="{{URL::to('/login')}}" method="post">
<a href="javascript:void(0)" class="text-center db logo-text-login">
<?php
if($panelInit->settingsArray['siteLogo'] == "siteName"){
echo $panelInit->settingsArray['siteTitle'];
}elseif($panelInit->settingsArray['siteLogo'] == "text"){
echo $panelInit->settingsArray['siteLogoAdditional'];
}elseif($panelInit->settingsArray['siteLogo'] == "image"){
?><img src="<?php echo URL::asset('assets/images/logo-light.png'); ?>" /><?php
}
?>
</a>
<h3 class="box-title m-b-20"><?php echo $panelInit->language['signIn']; ?></h3>
#if($errors->any())
<span style='color:red;'>{{$errors->first()}}</span><br/><br/>
#endif
<div class="form-group ">
<div class="col-xs-12">
<input class="form-control" type="text" name="email" required="" placeholder="<?php echo $panelInit->language['userNameOrEmail']; ?>">
</div>
</div>
<div class="form-group">
<div class="col-xs-12">
<input class="form-control" type="password" name="password" required="" placeholder="<?php echo $panelInit->language['password']; ?>">
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<div class="checkbox checkbox-primary pull-left p-t-0">
<input id="checkbox-signup" name="remember_me" type="checkbox">
<label for="checkbox-signup"> <?php echo $panelInit->language['rememberMe']; ?> </label>
</div> <i class="fa fa-lock m-r-5"></i> <?php echo $panelInit->language['restorePwd']; ?> </div>
</div>
<div class="form-group text-center m-t-20">
<div class="col-xs-12">
<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
<button class="btn btn-info btn-lg btn-block text-uppercase waves-effect waves-light" type="submit"><?php echo $panelInit->language['signIn']; ?></button>
</div>
</div>
<?php if(isset($panelInit->settingsArray['allowPublicReg']) AND $panelInit->settingsArray['allowPublicReg'] == "1"){ ?>
<div class="form-group m-b-0">
<div class="col-sm-12 text-center">
<p><b><?php echo $panelInit->language['registerNewAccount']; ?></b></p>
</div>
</div>
<?php } ?>
<div class="form-group m-b-0">
<div class="col-sm-12 text-center">
<p><b><?php echo $panelInit->language['schoolTerms']; ?></b></p>
</div>
</div>
</form>
</div>
<?php if($panelInit->settingsArray['loginPageStyle'] == "c"){ ?></div><?php }?>
</div>
</section>
<script src="{{URL::asset('assets/plugins/jquery/jQuery-2.1.4.min.js')}}"></script>
<!-- Bootstrap tether Core JavaScript -->
<script src="{{URL::asset('assets/plugins/bootstrap/js/tether.min.js')}}"></script>
<script src="{{URL::asset('assets/plugins/bootstrap/js/bootstrap.min.js')}}"></script>
<!-- slimscrollbar scrollbar JavaScript -->
<script src="{{URL::asset('assets/js/jquery.slimscroll.js')}}"></script>
<!--Wave Effects -->
<script src="{{URL::asset('assets/js/waves.js')}}"></script>
<!--stickey kit -->
<script src="{{URL::asset('assets/plugins/sticky-kit-master/dist/sticky-kit.min.js')}}"></script>
<!--Custom JavaScript -->
<script src="{{URL::asset('assets/js/custom.min.js')}}"></script>
<?php if( isset($panelInit->settingsArray['gTrackId']) AND $panelInit->settingsArray['gTrackId'] != "" ): ?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '<?php echo $panelInit->settingsArray['gTrackId']; ?>', 'auto');
ga('send', 'pageview');
</script>
<?php endif; ?>
</body>
</html>
The "login.blade.php" file exists under resources/views. The response I am getting is a blank screen with status code 200. I have tried other blades also inplace of login and still got the same response. But when I provided an invalid blade name, I got an error saying blade doesn't exist. Any help is appreciated.
What the problem is
Hmmm... To be honest - I'm not sure. I can't really find any bad part of what you're posted.
Maybe it's a caching error.
Solution suggestions
You say that you don't have php artisan working. Hmm... How do you clear the cache then? The command: php artisan cache:clear
None the less... The first command that comes to mind is to try and clear the cache and generates composer-files, with this command:
php artisan cache:clear && composer dump-autoload
But if you can't do php artisan, then maybe just do: composer dump-autoload
Further debugging
If it was me, then I would start at the routes, changing this:
Route::get('/login','LoginController#index');
to this:
dd('hey');
Route::get('/login','LoginController#index');
And then reloading the page. You should then see it say 'Hey' on the screen.
... If that works, then change it to this:
Route::get('/login','LoginController#index');
dd('hey');
Then it _SHOULDN'T say 'Hey' on the screen.
... Then I would work my way through the controller as well.
And afterwards through the view.
To find the place where it deviates what you expect should happen and what really happens.
Fun fact:
I have tried once, where I did this - and moved the dd-statement aaaaaall the way through my code. And in the end, when I simply removed the dd-statement then the unexpected behaviour was gone. It must have been some caching or something.

how to prevent from going back to login page after logging in

I have developed a website in php. The index.php is a login form. After logging in dashboard.php is coming. But when I press the back button in the browser it is redirecting to the login page. How to prevent it. If there is any solution please tell. Thanks in advance. The codes are given below:
index.php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body style="background-image: url('https://www.pixelstalk.net/wp-content/uploads/2016/05/HD-Black-Picture.jpg');">
<section id="login">
<div class="container">
<div class="row">
<div class="col-sm-2"></div>
<div class="col-sm-8 col1">
<div class="row">
<div class="col-sm-7 co2">
<h1 class="h1">Orbit Shifters Employee Site</h1>
<h2 class="h2">Login Here <i class="fas fa-long-arrow-alt-right"></i></h2>
</div>
<div class="col-sm-5 co1">
<form method="post" action="func.php">
<div>
<input type="text" name="username" class="i1" placeholder="Enter Your Username">
</div>
<div>
<input type="password" name="password" class="i1" placeholder="Enter Your Password">
</div>
<div>
<input type="submit" name="submit" class="btn btn1">
</div>
</form>
</div>
</div>
</div>
<div class="col-sm-2"></div>
</div>
</div>
</section>
</body>
</html>
func.php
<?php
session_start();
$con=mysqli_connect("localhost","root","","login");
$connect = new PDO('mysql:host=localhost;dbname=login', 'root', '');
if(isset($_POST['submit'])){
$username=$_POST['username'];
$password=$_POST['password'];
$query="select * from signup where username='$username' and password='$password';";
$result=mysqli_query($con,$query);
$row=mysqli_fetch_assoc($result);
if(mysqli_num_rows($result)==1)
{
$_SESSION["username"] = $username;
$_SESSION['status']="Active";
header("Location:dashboard.php?name=".$row['name']);
exit;
}
else{
echo "<script>alert('Enter Correct Details!!')</script>";
echo "<script>window.open('index.php', '_self')</script>";
}
}
?>
dashboard.php
<?php
session_start();
if($_SESSION['status']!="Active")
{
header("location:index.php");
}
else{
$name=$_GET['name'];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body style="background:url(https://i.pinimg.com/originals/e5/f3/af/e5f3af2b9186af6e86187c84f4ad930e.jpg);">
<nav class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="dashboard.php?name=<?php echo $name; ?>">Dashboard</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li class="li1"><span class="glyphicon glyphicon-log-in"></span> Logout</li>
</ul>
</div>
</div>
</nav>
<section id="dashboard">
<div class="container">
<div class="row ro1">
<p class="p1"> Hello <?php echo $name; ?>, Welcome to Orbit Shifters EMployee Site.</p>
</div>
<div class="ro1">
<div class="col-sm-4 col2">
<button class="btn btn2">Project 1 <br>Report <br>Submission</button>
</div>
<div class="col-sm-4 col2">
<button class="btn btn2">Project 2 <br>Monthly Report <br>Submission</button>
</div>
<div class="col-sm-4 col2">
<button class="btn btn2">Project 3 <br>Feedback <br>Submission</button>
</div>
</div>
</div>
</section>
</body>
</html>
<?php
}
?>
logout.php
<?php
session_start();
session_destroy();
$_SESSION = array();
unset($_SESSION['username']);
unset($_SESSION['status']);
header("Location:index.php");
?>
I am not sure if I understand the problem correctly, but what if you add a check at the beginning of the index.php file that would redirect you to the dashboard if you are logged in ? Something like this
// index.php
<?php
session_start();
if (isset($_SESSION['status']) && $_SESSION['status'] === "Active") {
header("location: dashboard.php");
}
?>
<!DOCTYPE html>
<html>
<head>
...
this way, if you click back in the browser, you will still go to index.php, but then you will be redirected to the dashboard again if you are already logged in

HTTP Error 500 PHP

I am getting an HTTP Error 500 on my website. The PHP code checker doesn't see anything suspicious.
I think it's caused by PDO but I'm not sure because when I remove all the PHP code it still gives me the same error.
Here's my code:
Index.php:
<?php
include_once('includes/db_connect.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable="no>
<!-- Custom CSS -->
<link rel="stylesheet" href="css/custom.css">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css" />
<!-- Optional theme (flatly) -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootswatch/latest/flatly/bootstrap.min.css" />
<!-- Font awesome -->
<link href="//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet" />
<link rel="stylesheet" href="css/contact.css" rel="stylesheet">
<!-- jQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="js/contact.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/latest/js/bootstrap.min.js"></script>
<title><?php
foreach($dbh->query('SELECT * FROM page_info') as $row) {
echo $row['title'];
}
?></title>
</head>
<body>
<div class="banner">
<div class="name"><?php
foreach ($dbh->query('SELECT * FROM page_info') as $row) {
echo $row[“name”];
}
?></div>
</div>
<div class="about">
<div class="about-container">
<div class="about-main-text">
<h1>About me:</h1>
<?php
foreach ($dbh->query('SELECT * FROM about') as $row) {
echo '
<span>'.$row["text"].'</span>
';
}
?>
</div>
</div>
</div>
<div class="projects">
<div class="projects-container">
<div class="projects-main-text">
<h1>My projects:</h1>
</div>
<div class="row">
<?php
foreach($dbh->query('SELECT * FROM projects') as $row) {
echo '
<div class="col-md-4 nopadding">
<div class="project-box">
<img src="data:image/jpeg;base64,'.base64_encode( $row['image'] ).'" alt="Project Image">
<h1>'.$row["name"].'</h1>
<p>'.$row["desc"].'</p>
</div>
</div>
';
}
?>
</div>
</div>
</div>
<div class="contact">
<div class="contact-container">
<div class="contact-main-text">
<h1>Contact me:</h1>
</div>
<div class="row">
<form action="contact/send.php" method="post" style="float: left;">
<div class="field name-box">
<input type="text" id="name" name="name" placeholder="Who Are You?"/>
<label for="name">Name</label>
<span class="ss-icon">check</span>
</div>
<div class="field email-box">
<input type="text" id="email" name="email" placeholder="name#email.com"/>
<label for="email">Email</label>
<span class="ss-icon">check</span>
</div>
<div class="field msg-box">
<textarea id="msg" rows="4" placeholder="Your message goes here..."/></textarea>
<label for="msg">Msg</label>
<span class="ss-icon">check</span>
</div>
<input class="button" type="submit" value="Send" />
</form>
</div>
</div>
</div>
<div class="footer">
<span class="copyright">
© <?php
foreach ($dbh->query('SELECT * FROM page_info') as $row) {
echo $row['copyright'];
}
echo ' ' . date("Y");
?> - All rights reserved
</span>
</div>
</body>
</html>
And here is db_connect.php:
<?php
$uname = ‘rik_root’;
$upass = ‘*********’;
$dbh = new PDO('mysql:host=localhost;dbname=nijdeken’, $uname, $upass);
?>
I hope someone can help me. Thanks in advance!
Don't use a word processor to edit your code:
$uname = ‘rik_root’;
^--------^
those are not valid php quote characters, and are probably killing your code with a fatal parse error:
$dbh = new PDO('mysql:host=localhost;dbname=nijdeken’, $uname, $upass);
^--start of string ^--NOT an end-of-string

favicon will not show up after I point my noip to my domain name

My favicon will not show up on three different web browsers opera, Firefox, and Chrome and I have cleared cookies and cache so it’s not that. This started happening after I pointed my noip my domain name. What did I do wrong? How can I fix it?
http://404tool.dns.net has the favicon
http://404tool.com favicon is gone
<?php
session_start();
include('inc/config.php');
include('inc/functions.php');
BlockIP();
LoggedInTrue();
?>
<html>
<head>
<title>404Tool - Home</title>
<link rel="icon"type="image/ico"href="img/favicon.ico">
<link rel="stylesheet" href="css/main.css" type="text/css"
media="screen" />
</head>
<body>
<div id="wrapper">
<div id="sidebar">
<div id="menu">
<div id="menu-header">
<div id="title">
<span>404</span>Tools
</div>
</div>
<div id="menu-account">
<div id="account-info">
<table>
<tr>
<td>User</td>
<td><span><?php echo $_SERVER['REMOTE_ADDR']; ?></span></td>
</tr>
<tr>
<td>Level</td>
<td><span>Guest</span></td>
</tr>
</table>
</div>
</div>
<div id="menu-menu">
<div class="menu-news">
<h2 class="current">Home</h2>
</div>
<div id="menu-login">
<ul>
<li id="loginstrip"class="current">Login</li>
<div id="dropdown">
<form method="POST">
<div id="dropdown-strip">
<div id="dropdown-text">
<input type="text" name="username" placeholder="Username" autocomplete="off" />
</div>
</div>
<div id="dropdown-strip">
<div id="dropdown-text">
<input type="password" name="password" placeholder="Password" autocomplete="off" />
</div>
</div>
<div id="dropdown-strip2">
<div id="dropdown-text">
<span id="loginbutton"><input type="submit" value="Login" name="login" /></span>
</div>
</div>
<?php Login(); ?>
</form>
</div>
</ul>
</div>
</div>
</div>
</div>
<div id="main-news">
<div id="main-header">
<div id="main-title">
Home
</div>
</div>
<div id="main-content-news">
This is a Private Service and accounts are created by filling out the form below. Please wait 48 hours for the account to be created before submitting another account request!
</div>
<div id="main-content-news">
<div id="box">
<br />
<br />
<div id="box-header">
</div>
<div id="box-content">
<div id="box-title">
</div>
</div>
<div id="box-content">
It currently looks like you are serving different version of the app. Look at the source code from each of those sites and you'll see that 404tools.com does not have a favicon link in the <head>...</head>
http://404tools.ddns.net/:
<head>
<title>404Tools - Home</title>
<link rel="icon" type="image/ico" href="img/favicon.ico">
<link rel="stylesheet" href="css/main.css" type="text/css" media="screen">
</head>
http://404tools.com/
<head>
<title>404 tools</title>
<meta name="keywords" content="email bomber, skype resolver, skype, 404, tools, sms bomber, geo location, ip logger,">
<meta name="description" content="">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css"></style>
</head>

Zend Framework layout or view lag

I have a website built on ZF. I don't know why but is lagging as hell. Loading simple page tooks 4s. Time is going down when I disable layout. When rendering is enabled it's working normally. So I can use action views but I can't use layouts. Can it be someting bad with layout? Or I'm not setting up layout properly?
Site: http://zgarnijlicke.pl
Edit:
I'm adding layout code below:
<<?php ?>?xml version="1.0" encoding="UTF-8"?<?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" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" type="text/css" media="screen"
href="<?php echo $this->baseUrl;?>/public/styles/style.css" />
<link rel="stylesheet" type="text/css" media="screen"
href="<?php echo $this->baseUrl;?>/public/styles/menu.css" />
<link rel="shortcut icon"href="<?php echo $this->baseUrl;?>/public/images/favicon.ico">
<script src="<?php echo $this->baseUrl;?>/public/scripts/jquery.js"></script>
<script src="<?php echo $this->baseUrl;?>/public/scripts/jquery.corner.js"></script>
<script src="<?php echo $this->baseUrl;?>/public/scripts/jquery.media.js"></script>
<title><?php echo $this->title . ' - '; echo ($this->cattitle != '') ? $this->cattitle . ' - ' : '';?>Zgarnijlicke.pl</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div id="naglowek">
<div id="logo"><img src="<?php echo $this->baseUrl;?>/public/images/logo.png" width="338px" height="63px" /></div>
<div id="szukajka">
<div id="szukaj">Szukaj</div>
<div id="poleszukaj"><input name="search" maxlength="20" size="20" value="wpisz cos..." onblur="if(this.value=='') this.value='wpisz cos...';" onfocus="if(this.value=='wpisz cos...') this.value='';" type="text"> </div>
</div>
</div>
<?php echo $this->partial('top_menu1.phtml', array()); ?>
<div class="clear"> </div>
<div id="banner"><img src="<?php echo $this->baseUrl;?>/public/images/banner.png" width="994px" height="212px" />
</div>
<?php echo $this->placeholder('top_menu2'); ?>
<div class="clear"> </div>
<div id="wrapper">
<div id="container">
<div id="side-a">
<div class="widget"><?php echo $this->partial('menu_left_1.phtml', array()); ?></div>
<div class="clear"> </div>
<div class="widget">Lewa strona</div>
</div>
<div id="content">
<div class="content_elem"><?php echo $this->layout()->content; ?></div>
</div>
<div id="side-b">
<div class="widget">Prawa strona</div>
</div>
</div>
<div class="clear"> </div>
<div id="footer">
<img src="<?php echo $this->baseUrl;?>/public/images/stopka.png" width="992px" height="34px" />
</div>
</div>
<script type="text/javascript">
$("#menu_top1").corner();
//$(".widget").corner();
//$("#top_menu2").corner();
//$(".content_elem").corner();
$('a.media').media();
</script>
</body>
</html>
This is impossible to say without any code to review. Do you happen to use the action stack a lot? If so, this is likely the culprit as it goes through the entire dispatch for each call.
Your best bet: use a XDebug or Zend Debugger to find the bottleneck in your application.

Categories