AbanteCart Community
Shopping Cart Operations => Support => General Support => Topic started 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
-
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.
-
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
-
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
-
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?
-
No, but I did do a manual upload...
David
-
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
-
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.
-
The file is definitely not truncated.
There do however, seem to be mixed end of line characters (dos / unix)
David
-
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>
-
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
-
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
-
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
-
did a complete new install of version 1.0.3 but same error messages appear
-
Craig,
The dev team has acknowledged the flaw as I identified it and will update the code..
David
-
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
-
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.
-
I feel there should be release of patches after each version :) until the next version is released :D
-
thanks to all.
we added changes into v1.0.4. It will be soon
-
great job guys, thanks for the hard work, it's comin' together. Cheers
-
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?