Jump to content

How do I fix all these errors?


zanderzzz

Recommended Posts

So this is what happens now then I try to login... how do I fix this?

 

 

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

 

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

 

Notice: Only variables should be assigned by reference in /home/account/public_html/site.com/phrame/ActionController.php on line 122

 

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/HttpServletRequest.php on line 128

 

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

 

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

 

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

 

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

 

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

Link to comment
Share on other sites

can you post the relevant code?

 

the url is site/files/main.php

 

Here's main.php

 

<?php

include_once("include/include.php");

 

//release control to controller for further processing

$controller = new ActionController($options);

$controller->process($mappings);

 

 

?>

Link to comment
Share on other sites

also please use code tags

<?php
/* First include all the phrame base classes,
* the error handler and the configuration files
* and finally any project subclasses.
*/
ini_set("session.session.use_trans_sid",false);
include_once('../phrame/include.php');
include_once('mappings.php');
include_once('options.php');
include_once('errors.php');
include_once('errorHandler.php');
//include_once("classes/passive-active/session_handler.php"); // session to database and vica versa functionality TURNED OFF for functionality
//include_once('c:/www/dbconn.php'); // mysql auth windows

session_start();
if(!session_is_registered("registered")) {
   session_register("registered");
}

include_once("classes/database/db.php"); // for PEAR DB
include_once("classes/models/LoginModel.php"); // some cookie functionality in this script
include('constants.php');

//** Check the hash to validate the cookie ** //
if(isset($_COOKIE['eprimehash'])) {
   // Check to see whether the hash matches in cookie to database
      if(LoginProcess::compareHash($_COOKIE['eprimehash']) == false) {
         ob_start();
         setcookie("eprimeuser", "", time() - ((3600 * 24) * 2));
         setcookie("eprimehash", "", time() - ((3600 * 24) * 2));
         unset($_SESSION['username']);
         session_destroy();
         header("Location: user/errorhashc.php");
         ob_end_flush();
      } else {
         if(!isset($_COOKIE['eprimeuser'])) {
            ob_start();
            setcookie("eprimeuser", $_SESSION['username'], time() - ((3600 * 24) * 2));
            ob_end_flush();
         }
      }
      $_SESSION['username'] = $_COOKIE['eprimeuser'];
}
// ** ** //

if(isset($_SESSION['username'])) {
      // check for new messages
   $query = "select * from user_messages where user=? order by timestamp desc limit 5";
   $result =& $db->query($query,$_SESSION['username']);
            if (DB::isError($result)) {
                  return(die($result->getMessage()));
            }
            if($result->numRows() == 0) {
            } else {
               while ($row =& $result->fetchRow(DB_FETCHMODE_ASSOC)) {
                  $read = $row['is_read'];
                  if($read == 'no') {
                     $newmsg = 1;
                     $msgtime = time();
                  }
                }
            }
}


?>

Link to comment
Share on other sites

EDIT: Dont post all your code! Just the code that relates to the errors

 

The majority of the errors are coming from HashMap.php on line 95

 

The other two are  from ActionController.php on line 122

and HttpServletRequest.php on line 128

 

 


#
*/
#
        function &get($key, $default=PHRAME_HASHMAP_DEFAULT)
#
        {
#
                if ($this->containsKey($key)) {
#
                        return $this->_values[$key];
#
                } else {
#
                        if (PHRAME_HASHMAP_DEFAULT != $default) {
#
                                return $default;
#
                        }
#
                }
#
        }
#
        /**
#
         * Returns true if this map contains no key-value mappings.
#
         *
#
         * @access      public
#
         * @return      boolean
#
         */
#
        function isEmpty()
#
        {


 

 

 

line 95 is this.        }

Link to comment
Share on other sites

Line 122 is this

 

$actionMapping =&  $this->_mappings->findMapping($name);

 

 


#
* @access      private
#
         * @param       array                   $mappings
#
         * @param       array                   $request
#
         * @return      ActionMapping
#
         */
#
        function &_processMapping()
#
        {
#
                $name = $this->_request->getAction();
#
                $actionMapping =&  $this->_mappings->findMapping($name);
#
                if (!isset($actionMapping)) {
#
                        trigger_error("No mappings found for action '$name'");
#
                        return;
#
                }
#
                return $actionMapping;




 

Link to comment
Share on other sites

Line 128 is this

 

return $this->requestParameters->keySet();

 

 


#
#

#
        /**
#
         * Returns an array containing the names of the attributes available to this request.
#
         * @access public
#
         * @return array
#
         */
#
        function &getParameterNames(){
#
                return $this->requestParameters->keySet();
#
        }
#

#
        /**
#
         * Retrieve ALL parameters
#
         * @return array
#
         */
#
        function getParameters(){
#
                return $this->requestParameters->values();
#
        }
#

Link to comment
Share on other sites

Remove the ampersand (&) character from in front of your function names.

 

eg

function &_processMapping()

should be

function _processMapping()

 

That didnt' do anything...

 

That's not the line of the error and removing the  & doesn't change the errors displayed.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.