this code produces no output

Posted on 2009-12-21
Last Modified: 2012-08-13
this links to smarty templates

does gzip have to be installed

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('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']);








Open in new window

Question by:rgb192
    LVL 8

    Expert Comment

    Yes apache mod_gzip has to be installed. Comment the line 42 and see if you find any output.

    Author Comment

    see output but no pictures
    LVL 8

    Accepted Solution

    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.

    Author Comment

    now have mod gzip installed on my server

    commented/ uncommented line 42

    and still no output

    Author Comment

    is there any other option

    Author Closing Comment


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Suggested Solutions

    A colleague recently asked me about how to give his client a small part of the web site that could be completely under the client's control.  Since I have done this sort of thing before to add emergency banners to a web site, I decided I would creat…
    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now