LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-10-2006, 03:50 PM   #1
jcorrea920
LQ Newbie
 
Registered: Jun 2006
Location: Oregon, USA
Distribution: Ubuntu / Fedora
Posts: 14

Rep: Reputation: 0
Question PHP ERRORS on Web Server


I use Jetbox CMS. I know bad choice. But for now I would like to correct some errors in the code, but don't know enough about php to correct them. I think Jetbox CMS was designed to work with php3 but wasn't released until php5 was widely used. I hacked some fixes suggested by other users using php5. But now I get these errors in my web log everytime someone visits the website (index.php). Not to mention it slows the load time of the site, about 8secs! Which is an improvement, it used to be 35secs! I would greatly appreciate any help or suggestions. Thanks so much in advance.

Fedora Core 6
Mysql 5.0.22
Php 5.1.6
Php 5.0.4 - fastcgi
Apache 2.2.3

Code:
#  tail /var/www/log/error.log


[Fri Nov 10 12:41:34 2006] [error] [client] PHP Notice:  Undefined offset:  9 in /var/www/index.php on line 80


[Fri Nov 10 12:41:34 2006] [error] [client] PHP Notice:  Undefined offset:  8 in /var/www/index.php on line 81


[Fri Nov 10 12:41:34 2006] [error] [client] PHP Notice:  Undefined offset:  9 in /var/www/index.php on line 82


[Fri Nov 10 12:41:34 2006] [error] [client] PHP Notice:  Undefined offset:  10 in /var/www/index.php on line 80


[Fri Nov 10 12:41:34 2006] [error] [client] PHP Notice:  Undefined offset:  11 in /var/www/index.php on line 80


[Fri Nov 10 12:41:34 2006] [error] [client] PHP Notice:  Undefined offset:  10 in /var/www/index.php on line 81


[Fri Nov 10 12:41:34 2006] [error] [client] PHP Notice:  Undefined offset:  11 in /var/www/index.php on line 82


[Fri Nov 10 12:41:34 2006] [error] [client] PHP Notice:  Undefined variable: error_message in /var/www/index.php on line 92


[Fri Nov 10 12:41:39 2006] [error] [client] PHP Notice:  Undefined index:  frontsession in /var/www/index.php on line 112


[Fri Nov 10 12:41:39 2006] [error] [client] PHP Notice:  Undefined offset:  0 in /var/www/includes/template.inc on line 320
/var/www/index.php, Lines 78-83:

Code:
for($split=0;$split<5;$split++){
        $install_dir_count+=2;
        $_URL[$url[$install_dir_count]]=$url[$install_dir_count+1];
        $url[$install_dir_count]=urldecode($url[$install_dir_count]);
        $$url[$install_dir_count]=urldecode($url[$install_dir_count+1]);
}
/var/www/index.php, Lines 92-94:

Code:
if ($install_jetbox==true || $error_message<>'') {
  include("includes/f_error_handling.php");
}

/var/www/index.php, Lines 97-121:

Code:
else{
        // Statistics
        // Can be configured in general_settings.inc.php
        if ($phpOpenTracker_enabled==true) {
                // prepend phpOpenTracker for statistics
    require_once 'phpOpenTracker.php';
    phpOpenTracker::log();
        }

        // Someone may be logged-in
        // Login and registration is handeled by webuser.php
        // All login & registration function can be found in /includes/f_jetstream_core_one.inc.php
        // Check out webuser.php for more info if something goes wrong

        // Check for front-end session
        if ($_COOKIE[session_name()]) {
                session_start();
                if ($_SESSION["uid"] && $_SESSION["type"]=="frontend") {
                        $uresult=mysql_prefix_query("SELECT * FROM webuser WHERE uid='".$_SESSION["uid"]."'") or die(mysql_error());
                        if (mysql_num_rows($uresult)>0) {
                                $uarray=mysql_fetch_array($uresult);
                        }
                }
        }
}
/var/www/includes/template.inc, Lines 304-323 :

Code:
function set_block($parent, $varname, $name = "") {
    if ($this->debug & 4) {
      echo "<p><b>set_block:</b> parent = $parent, varname = $varname, name = $name</p>\n";
    }
    if (!$this->loadfile($parent)) {
      $this->halt("set_block: unable to load $parent.");
      return false;
    }
    if ($name == "") {
      $name = $varname;
    }

    $str = $this->get_var($parent);
    $reg = "/[ \t]*<!--\s+BEGIN $varname\s+-->\s*?\n?(\s*.*?\n?)\s*<!--\s+END $varname\s+-->\s*?\n?/sm";
    preg_match_all($reg, $str, $m);
    $str = preg_replace($reg, "{" . "$name}", $str);
    $this->set_var($varname, $m[1][0]);
    $this->set_var($parent, $str);
    return true;
  }
 
Old 11-10-2006, 04:17 PM   #2
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
yeah - the code is not the nicest of all - but those are just notices and they can be ignored!
to save the log-space go to your php.ini file and set the error reporting to
E_ALL ^~E_NOTICE
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Errors on Web Server - Security stlyz3 Linux - Software 1 03-13-2006 05:50 PM
setting up a php web server mrobertson Programming 4 06-02-2005 01:29 PM
Samba on web server, errors logging in Mibble Linux - Networking 2 03-06-2005 11:39 PM
SUSE 9.1 Web Server Hangs with out any errors cdabb Linux - Enterprise 4 02-21-2005 11:18 AM
installing apache web server errors makapacs Linux - Software 6 06-06-2004 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration