Hello,

Please cek this website: Infracom

There are some errors after I move it from localhost to webserver.

header.inc.php

<?php
if( !defined('WDS_ROOT') )
    exit;

$meta = array();
$meta['title'] = 'Error 404 Object Not Found';
$meta['keywords'] = $config['sitekeywords'];
$meta['description'] = $config['sitename'] . ' :: The page you looking for is not found at this site.';
$meta['robots'] = 'noindex,nofollow';

switch(getCurrentFilename()) :
    case "index.php" :
        $meta['title'] = $config['sitename'] . ' :: ' . $config['sitedescription'];
        $meta['keywords'] = $config['sitename'] . ', ' . $config['sitekeywords'];
        $meta['description'] = $config['sitedescription'];
        $meta['robots'] = 'index,follow';
    break;
    case "company.php" :
        if ( isset($_GET['pageSlug']) && !empty($_GET['pageSlug']) ) {
            $metaCheck = new wdsQuery("SELECT pages_ID, pages_title, pages_description, pages_content, pages_slug FROM " . $dbtable['pages'] . " WHERE pages_slug = '" . slugs($_GET['pageSlug']) . "'");
            if ( $metaCheck->numRows() == '1' ) {
                $metaResult = $metaCheck->fetchArray();
                $meta['title'] = $metaResult['pages_title'];
                $meta['keywords'] = $metaResult['pages_title'] . ',' . $config['sitekeywords'];
                $meta['description'] = $config['sitename'] . ' :: ' . $metaResult['pages_title'] . ' | ' . $metaResult['pages_description'];
                $meta['robots'] = 'index,follow';
            }
        }
    break;
    case "contact.php" :
        $meta['title'] = "Contact";
        $meta['keywords'] = 'contact,' . $config['sitekeywords'];
        $meta['description'] = $config['sitename'] . ' :: Contact Us';
        $meta['robots'] = 'noindex,nofollow';
    break;
    default:
        $meta['title'] = 'Error 404 Object Not Found';
        $meta['keywords'] = $config['sitekeywords'];
        $meta['description'] = $config['sitename'] . ' :: The page you looking for is not found at this site.';
        $meta['robots'] = 'noindex,nofollow';
endswitch;
?>

I wonder how to fix all those website errors:

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\infracom\WDS_engines\class.wdsConnect.php on line 64

Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\infracom\WDS_engines\class.wdsConnect.php on line 84

Parse error: syntax error, unexpected ')', expecting '(' in C:\xampp\htdocs\infracom\config.php(20) : eval()'d code on line 1

Notice: Undefined variable: config in C:\xampp\htdocs\infracom\WDS_inc\header.inc.php on line 7

Notice: Undefined variable: config in C:\xampp\htdocs\infracom\WDS_inc\header.inc.php on line 8

Notice: Undefined variable: config in C:\xampp\htdocs\infracom\WDS_inc\header.inc.php on line 13

Notice: Undefined variable: config in C:\xampp\htdocs\infracom\WDS_inc\header.inc.php on line 13

Notice: Undefined variable: config in C:\xampp\htdocs\infracom\WDS_inc\header.inc.php on line 14

Notice: Undefined variable: config in C:\xampp\htdocs\infracom\WDS_inc\header.inc.php on line 14

Notice: Undefined variable: config in C:\xampp\htdocs\infracom\WDS_inc\header.inc.php on line 15

Recommended Answers

All 4 Replies

$config must be a GLOBAL array ?
Resolve the errors from Connect.php first.

how can this dir "C:\xampp\htdocs" still on web server ?
check the config dir for your script.

yes, it's probably a global array. I search where all the $config located and there are bunches of them (I didn't create the program someone else does it. I just need to know how to fix it).

How to resolve the errors from connect.php ?

For mysql_num_rows() and mysql_free_result() the have a result set as parameters. This result set has value false because mysql_query("sql") dont return any row from database. This may be: you have not connected to database or the sql is wrong.

For this:
Parse error: syntax error, unexpected ')', expecting '(' in C:\xampp\htdocs\infracom\config.php(20) : eval()'d code on line 1
Missing '}' at the end of a function or a class definition.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.