AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: Craig on July 02, 2012, 01:18:48 PM

Title: new upgrade didn't work on my website
Post by: Craig on July 02, 2012, 01:18:48 PM
Hi team, just installed the 1.0.3 upgrade version and got these messages on my admin and website pages

Notice: Use of undefined constant DIR_SYSTEM - assumed 'DIR_SYSTEM' in /home/www/metaldetector.co.nz/core/lib/menu_control_storefront.php on line 280

Warning: fopen(DIR_SYSTEMlogs/error.txt) [function.fopen]: failed to open stream: No such file or directory in /home/www/metaldetector.co.nz/core/lib/menu_control_storefront.php on line 280

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/metaldetector.co.nz/core/lib/menu_control_storefront.php on line 280

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/metaldetector.co.nz/core/lib/menu_control_storefront.php on line 280

Notice: Use of undefined constant DIR_SYSTEM - assumed 'DIR_SYSTEM' in /home/www/metaldetector.co.nz/core/lib/attribute_manager.php on line 548

Warning: fopen(DIR_SYSTEMlogs/error.txt) [function.fopen]: failed to open stream: No such file or directory in /home/www/metaldetector.co.nz/core/lib/attribute_manager.php on line 548

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/metaldetector.co.nz/core/lib/attribute_manager.php on line 548

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/metaldetector.co.nz/core/lib/attribute_manager.php on line 548

I tried the new shipping improvements in the online demo, really good, just what I needed. Any ideas what went wrong?

Cheers

Craig
Title: Re: new upgrade didn't work on my website
Post by: abantecart on July 02, 2012, 05:39:03 PM
Something happened to your /core/init.php and definition of DIR_SYSTEM is no longer present.

Check if you have following line on /core/init.php line 274

define('DIR_SYSTEM',       DIR_ROOT . '/system/');

You can try to replace this file /core/init.php completely with file provided in upgrade package in /code/core/init.php

Possibly file was not copied completely.
Title: Re: new upgrade didn't work on my website
Post by: Nimitz1061 on July 03, 2012, 01:45:11 PM
This appears not to be the case.

The init.php file does contain a definition of the DIR_SYSTEM constant.  Its just not being processed for some reason.

(Yes, I have the same issue after a manual upgrade attempt)

David
Title: Re: new upgrade didn't work on my website
Post by: Nimitz1061 on July 03, 2012, 02:00:06 PM
I see:

Code: [Select]
Cannot send session cookie - headers already sent by (output started at /home/lifesolu/public_html/dev/core/lib/menu_control_storefront.php:280)
in error.txt - so, something else seems to be happening, I'm just not sure what..

David
Title: Re: new upgrade didn't work on my website
Post by: abantecart on July 03, 2012, 02:10:32 PM
This message usually means that you have some character or echo before header is created.
It points to file /home/lifesolu/public_html/dev/core/lib/menu_control_storefront.php
Check line 280.

It is last line in base code. Check that you did not put any space there.

Are you doing any file edits?
Title: Re: new upgrade didn't work on my website
Post by: Nimitz1061 on July 03, 2012, 02:11:48 PM
No, but I did do a manual upload...

David
Title: Re: new upgrade didn't work on my website
Post by: Nimitz1061 on July 03, 2012, 02:17:45 PM
That line does not contain any reference to DIR_SYSTEM.

It had no space after the closing bracket which was the only content on the line.

Adding define('DIR_SYSTEM',DIR_ROOT .'/system/'); at line 42 in the root idex.php file seems to fix the issue, at least temporarily...

David
Title: Re: new upgrade didn't work on my website
Post by: abantecart on July 03, 2012, 02:58:29 PM
Hmmmm.

Just adding this line might not solve all the problems. Make sure your FTP does not fail and truncates files. I seen this happening.
Title: Re: new upgrade didn't work on my website
Post by: Nimitz1061 on July 04, 2012, 04:01:52 PM
The file is definitely not truncated.

There do however, seem to be mixed end of line characters (dos / unix)

David
Title: Re: new upgrade didn't work on my website
Post by: Nimitz1061 on July 04, 2012, 07:13:32 PM
Repeated FTP upload x 3 , no error reported, no changes.

Do see:

2012-07-04 18:54:13 - runtime notice:  Declaration of AMenu_Storefront::_buildMenu() should be compatible with that of AMenu::_buildMenu() in <b>/somepath/public_html/dev/core/lib/menu_control_storefront.php</b> on line <b>280</b>
2012-07-04 18:54:13 - runtime notice:  Declaration of AAttribute_Manager::getAttributes() should be compatible with that of AAttribute::getAttributes() in <b>/somepath/public_html/dev/core/lib/attribute_manager.php</b> on line <b>548</b>


Title: Re: new upgrade didn't work on my website
Post by: Craig on July 05, 2012, 03:18:53 PM
hi Team,

still no luck on the upgrade.

define('DIR_SYSTEM',       DIR_ROOT . '/system/');  is included in the script /core/init.php line 274. I have downloaded both the upgrade and full package of v 1.0.3 and uploaded the core files from both but still the same error messages appear on my web page and I cant log into admin until i back up my old 1.0.2 version.

Thanks, Craig
Title: Re: new upgrade didn't work on my website
Post by: Nimitz1061 on July 06, 2012, 10:20:36 AM
I have found 2 issues which may impact this.

1.  Reference to DIR_SYSTEM has been made in a file included in init.php BEFORE definition of DIR_SYSTEM occurs.
2. The PHP system() function is used in three places in the cart, including the package manager.  Not all servers allow the use of the system function.  In fact, some servers periodically change which functions are allowed for security reasons. 

The upshot of this is, the temporary fix I mentioned above should be safe.  Some users may need to replace the system() function calls with calls to exec() or other functions in that family in order to get the functionality provided.  I'm not fully clear at this point on just what that is, but it would appear that this includes OR possibly includes backup/restore, data import/export and package management functions possibly including upgrades.

David
Title: Re: new upgrade didn't work on my website
Post by: Craig on July 06, 2012, 01:53:09 PM
thanks David, unfortunately my programming skills and understanding of the language and what it means is limited to changing a few numbers in the style sheet folder so my banner background is a different colour. I guess I'll have to wait and hope the abantecart team come up with a file i can easily upload. Cheers, Craig
Title: Re: new upgrade didn't work on my website
Post by: Craig on July 06, 2012, 10:06:44 PM
did a complete new install of version 1.0.3 but same error messages appear
Title: Re: new upgrade didn't work on my website
Post by: Nimitz1061 on July 07, 2012, 06:42:53 AM
Craig,

The dev team has acknowledged the flaw as I identified it and will update the code..

David
Title: Re: new upgrade didn't work on my website
Post by: Craig on July 07, 2012, 06:59:28 AM
cheers David, I have to admire the way you guys throw this code around, i have no idea what you're talking about. I'll keep checking in for any updates. Really like the cart from what i've seen so far. Thanks
Title: Re: new upgrade didn't work on my website
Post by: abantecart on July 08, 2012, 08:06:24 PM
Yes, this issues is already fixed in v1.0.4 branch.

See this commit.
https://github.com/abantecart/abantecart-src/commit/c2fec421c30468e651826ea0d2de1a5d6640e9be

Basically, all directory definitions moved to the top before error_reporting.   
Title: Re: new upgrade didn't work on my website
Post by: James on July 09, 2012, 01:30:05 AM
I feel there should be release of patches after each version :) until the next version is released :D
Title: Re: new upgrade didn't work on my website
Post by: abolabo on July 10, 2012, 05:31:38 AM
thanks to all.
we added changes into v1.0.4. It will be soon
Title: Re: new upgrade didn't work on my website
Post by: Craig on July 10, 2012, 07:31:14 AM
great job guys, thanks for the hard work, it's comin' together. Cheers
Title: Re: new upgrade didn't work on my website
Post by: theSarayiahpost on July 16, 2012, 04:15:08 PM
Hi
I get the same error as the original poster. I am using Movable Type 5.12 for my blog and trying to add a shopping cart to it. My host is Just Host using Linux.

I tried installing it several times, but get the same error.  Do you know when this will be remedied in a future download?