Author Topic: new upgrade didn't work on my website  (Read 20826 times)

Offline Craig

  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
new upgrade didn't work on my website
« 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

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: new upgrade didn't work on my website
« Reply #1 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.
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

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: new upgrade didn't work on my website
« Reply #2 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

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: new upgrade didn't work on my website
« Reply #3 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

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: new upgrade didn't work on my website
« Reply #4 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?
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

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: new upgrade didn't work on my website
« Reply #5 on: July 03, 2012, 02:11:48 PM »
No, but I did do a manual upload...

David

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: new upgrade didn't work on my website
« Reply #6 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

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: new upgrade didn't work on my website
« Reply #7 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.
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

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: new upgrade didn't work on my website
« Reply #8 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

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: new upgrade didn't work on my website
« Reply #9 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>



Offline Craig

  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
Re: new upgrade didn't work on my website
« Reply #10 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

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: new upgrade didn't work on my website
« Reply #11 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

Offline Craig

  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
Re: new upgrade didn't work on my website
« Reply #12 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

Offline Craig

  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
Re: new upgrade didn't work on my website
« Reply #13 on: July 06, 2012, 10:06:44 PM »
did a complete new install of version 1.0.3 but same error messages appear

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: new upgrade didn't work on my website
« Reply #14 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

 

Powered by SMFPacks Social Login Mod