Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Redhat / Fedora Linux Help > PHP ERRORS on Web Server

Forgot Password?
 Redhat / Fedora Linux Help   Help and discussion related to Redhat and Fedora Linux.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 11-10-2006   #1 (permalink)
Just Joined!
 
Join Date: Nov 2006
Posts: 4
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;
  }
jcorrea920 is offline  


Reply With Quote
Old 11-11-2006   #2 (permalink)
Linux User
 
Join Date: Aug 2006
Location: Croydon, PA
Posts: 392
Send a message via AIM to Skiboy
Well the weird thing about code sometimes the error is not where it states only where it fails. Meaning the the actual error could be way before where the code fails.

But I think you will bget more help in the "GNU LINUX ZONE" section of this web site, under "Servers".
__________________
Good Luck,
Ski
RHCT
Skiboy is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 07:27 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2