Forums / Installing on a Windows Server / autoload_func.php error on fresh installation

autoload_func.php error on fresh installation

Locked

Started by yuvallb on 3 Dec 2006, 4:32 PM · Views: 5,153

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
3 Dec 2006, 4:32 PM
#1
yuvallb avatar

yuvallb

New Zenner

Join Date:
Mar 2004
Posts:
9
Plugin Contributions:
1

autoload_func.php error on fresh installation

I had this problem with an upgrade, and was not able to get rid of,
so I did a totaly fresh install, and it reappears:

The catalog pages always raise an error:
Fatal error: Call to a member function add_current_page() on a non-object in c:\domains\foo\wwwroot\includes\autoload_func.php on line 90

the admin works properly.

Database: MySQL 4.1.13
PHP Version: 5.1.2
HTTP Server: Microsoft-IIS/6.0

session.auto_start = Off

thanks.

3 Dec 2006, 4:35 PM
#2
yuvallb avatar

yuvallb

New Zenner

Join Date:
Mar 2004
Posts:
9
Plugin Contributions:
1

Re: autoload_func.php error on fresh installation

I'm trying to install the latest zencart version: 1.3.6

3 Dec 2006, 4:42 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: autoload_func.php error on fresh installation

That suggests that your /includes/classes/navigation_history.php file is corrupt or missing.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Dec 2006, 4:54 PM
#4
yuvallb avatar

yuvallb

New Zenner

Join Date:
Mar 2004
Posts:
9
Plugin Contributions:
1

Re: autoload_func.php error on fresh installation

no, I've double and triple checked, I have the original distribution file.
I also read it, and it looks ok.

3 Dec 2006, 5:31 PM
#5
yuvallb avatar

yuvallb

New Zenner

Join Date:
Mar 2004
Posts:
9
Plugin Contributions:
1

Re: autoload_func.php error on fresh installation

if it helps:
i added:

var_dump($_SESSION[$objectName]);

in line 90 of autoload_func.ph

and got:

object(__PHP_Incomplete_Class)#2 (4) { ["__PHP_Incomplete_Class_Name"]=> string(17) "navigationHistory" ["path"]=> array(1) { [0]=> array(4) { ["page"]=> string(5) "index" ["mode"]=> string(6) "NONSSL" ["get"]=> string(0) "" ["post"]=> array(0) { } } } ["snapshot"]=> array(0) { } ["observers"]=> array(0) { } }

3 Dec 2006, 5:51 PM
#6
yuvallb avatar

yuvallb

New Zenner

Join Date:
Mar 2004
Posts:
9
Plugin Contributions:
1

Re: autoload_func.php error on fresh installation

in includes/autoload_func.php, lines 67-69:
if (isset($entry['checkInstantiated']) && $entry['checkInstantiated'] === true) {
if (!is_object($_SESSION[$objectName])) {
$_SESSION[$objectName] = new $className();

instead of:

    if (isset($entry['checkInstantiated']) && $entry['checkInstantiated'] === true) {
      if (!isset($_SESSION[$objectName])) {
        $_SESSION[$objectName] = new $className();

please let me know if this is ok, or i'm missing soething else.

3 Dec 2006, 8:01 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: autoload_func.php error on fresh installation

Sounds like your PHP configuration isn't handling sessions very well.

Perhaps you might consider installing XAMPP to use apache instead of bug-laden IIS?
This would also give you the added benefit of a server errorlog which would tell you more about what's going wrong with PHP.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Dec 2006, 9:30 PM
#8
yuvallb avatar

yuvallb

New Zenner

Join Date:
Mar 2004
Posts:
9
Plugin Contributions:
1

Re: autoload_func.php error on fresh installation

thanks, I usually work on linux servers, but this belongs to someone else.
anyway - it did not solve the problem, because now the shopping cart class get instantiated every request, so its not persistant...

3 Dec 2006, 9:35 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: autoload_func.php error on fresh installation

Yes -- running these kinds of systems on home PC's using wannabe webserver engines is often problematic.

I'm sure if you installed it to a Linux server, esp if it's configured as a common webserver, you'd have fewer problems :)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 May 2007, 9:58 PM
#10
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: autoload_func.php error on fresh installation

Im running into this same error, but my situation is not like the previous poster with the Windows server. I am using a Unix based platform with Apache web server.

Error occurs only when visiting the site at index.php (not when using admin, which works fine).

Fatal error: Call to a member function on a non-object in /export/spare/local/sites/runaraven.com/htdocs/includes/autoload_func.php on line 90

Any suggestions on what to look for? I did check to be sure the navigation_history.php file is present.

This message brought to you by Jac.
Happily developing sites with Zen Cart since 2003.

23 May 2007, 10:53 PM
#11
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: autoload_func.php error on fresh installation

Any suggestions on what to look for?

Quite strange. In your includes/autoload_func.php file (make backup first),

find:

if (is_object($_SESSION[$objectName])) {
        $_SESSION[$objectName]->$methodName();
        $debugOutput .= '$_SESSION[' . $objectName . ']->' . $methodName . '();<br />';
      } else {          
        $$objectName->$methodName();
        $debugOutput .= '$' . $objectName . '->' . $methodName . '();<br />';
      }

replace with:

if (is_object($_SESSION[$objectName])) {
        $_SESSION[$objectName]->$methodName();
        $debugOutput .= '$_SESSION[' . $objectName . ']->' . $methodName . '();<br />';
      } elseif (isset($objectName) && is_object($objectName) && method_exists($methodName)) {          
        $$objectName->$methodName();
        $debugOutput .= '$' . $objectName . '->' . $methodName . '();<br />';
      }

Will this still output the error ?

24 May 2007, 3:43 PM
#12
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: autoload_func.php error on fresh installation

Thank you for that suggestion! It did fix the problem, and the error disappeared.

This message brought to you by Jac.
Happily developing sites with Zen Cart since 2003.

2 Jun 2007, 3:46 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: autoload_func.php error on fresh installation

While the code adjustment suggested will certainly suppress the display of the error messages you were encountering, it masks the fact that something didn't get loaded which should have been loaded.

If you are finding things to not be working properly, you might consider undoing the suppression change and investigate why individual functions or classes aren't being loaded properly and therefore cannot be utilized as expected.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Jun 2007, 2:02 PM
#14
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: autoload_func.php error on fresh installation

Yes, thanks, Dr Byte,

Shortly after that error ceased to display, I began experiencing a different error that pointed our server admin to a specific issue. He repaired some things with a file and now all of that seems to be resolved. Not sure exactly what was done, but I think it might have had to do with server permissions on some files.

(Sorry I can't be more specific for other posters' sake.)

This message brought to you by Jac.
Happily developing sites with Zen Cart since 2003.