Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

this code produces no output

Posted on 2009-12-21
6
Medium Priority
?
358 Views
Last Modified: 2012-08-13
this links to smarty templates

does gzip have to be installed
<?php
define('_VALID', true);
require 'include/config.php';
require 'include/function_global.php';
require 'include/function_smarty.php';


$sql_add	= NULL;
$sql_delim	= ' WHERE';
if ( $config['show_private_videos'] == '0' ) {
    $sql_add   .= $sql_delim. " type = 'public'";
    $sql_delim	= ' AND';
}

$sql_add       .= $sql_delim. " active = '1'";  

$sql            = "SELECT VID, title, duration, addtime, thumb, viewnumber, rate, type
                   FROM video" .$sql_add. " ORDER BY viewtime DESC LIMIT " .$config['watched_per_page'];
$rs             = $conn->execute($sql);
$viewed_videos  = $rs->getrows();
$viewed_total   = count($viewed_videos);
$sql            = "SELECT VID, title, duration, addtime, thumb, viewnumber, rate, type
                   FROM video" .$sql_add. " ORDER BY addtime DESC LIMIT " .$config['recent_per_page'];
$rs             = $conn->execute($sql);
$recent_videos  = $rs->getrows();

$smarty->assign('errors',$errors);
$smarty->assign('messages',$messages);
$smarty->assign('menu', 'home');
$smarty->assign('index', true);
$smarty->assign('viewed_total', $viewed_total);
$smarty->assign('viewed_videos', $viewed_videos);
$smarty->assign('recent_videos', $recent_videos);
$smarty->assign('self_title', $seo['index_title']);
$smarty->assign('self_description', $seo['index_desc']);
$smarty->assign('self_keywords', $seo['index_keywords']);
$smarty->display('header.tpl');
$smarty->display('errors.tpl');
$smarty->display('messages.tpl');
$smarty->display('index.tpl');
$smarty->display('footer.tpl');
$smarty->gzip_encode();
?>

Open in new window

0
Comment
Question by:rgb192
  • 4
  • 2
6 Comments
 
LVL 8

Expert Comment

by:biztiger
ID: 26102189
Yes apache mod_gzip has to be installed. Comment the line 42 and see if you find any output.
0
 
LVL 1

Author Comment

by:rgb192
ID: 26104357
see output but no pictures
0
 
LVL 8

Accepted Solution

by:
biztiger earned 2000 total points
ID: 26105220
That means previously it was error occured as you don't have mod_gzip installed on your server. The reason you can't see pictures now, because either there is no picture at all or you have error on setting the picture path.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:rgb192
ID: 26108669
now have mod gzip installed on my server

commented/ uncommented line 42

and still no output
0
 
LVL 1

Author Comment

by:rgb192
ID: 26149112
is there any other option
0
 
LVL 1

Author Closing Comment

by:rgb192
ID: 31668845
thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question