News:

AbanteCart v1.4.2 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

new upgrade didn't work on my website

Started by Craig, July 02, 2012, 01:18:48 PM

Previous topic - Next topic

Craig

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

abantecart

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.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Nimitz1061

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

Nimitz1061

I see:


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

abantecart

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?
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Nimitz1061

No, but I did do a manual upload...

David

Nimitz1061

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

abantecart

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.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Nimitz1061

The file is definitely not truncated.

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

David

Nimitz1061

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>



Craig

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

Nimitz1061

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

Craig

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

Craig

did a complete new install of version 1.0.3 but same error messages appear

Nimitz1061

Craig,

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

David

Forum Rules Code of conduct
AbanteCart.com 2010 -