Zen Cart Logo
Forums / General Questions / upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

Views: 1,039

Results 1 to 11 of 11
7 Mar 2017, 6:30 PM
#1
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

I did the upgrade from 1.5.5b to 1.5.5e and I see that admin/includes/functions/database.php file is supposed to have changed but the files are exactly the same in both downloads. I also removed the upload file as mentionned.

Now when trying to make some changes to an attribute or to a product, it fails. I get this in the error log:

PHP Fatal error: Class 'upload' not found in /home/.../public_html/shop/admin/attributes_controller.php on line 442

what am I missing... I've redownloaded the zip file for 1.5.5e and still the same file as I had in my original zip file for 1.5.5b

7 Mar 2017, 6:35 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

marieAA:

I did the upgrade from 1.5.5b to 1.5.5e and I see that admin/includes/functions/database.php file is supposed to have changed but the files are exactly the same in both downloads. I also removed the upload file as mentionned.
Haha! That's because we changed it in 1.5.5c and then turned it back in v1.5.5d ! So, ya, it's supposed to be the same. :D

marieAA:

Now when trying to make some changes to an attribute or to a product, it fails. I get this in the error log:

PHP Fatal error: Class 'upload' not found in /home/.../public_html/shop/admin/attributes_controller.php on line 442
I think you missed updating your /admin/includes/auto_loaders/config.core.php since it points things to load the upload class from the non-admin classes area. ;)

8 Mar 2017, 12:50 AM
#3
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

DrByte:

Haha! That's because we changed it in 1.5.5c and then turned it back in v1.5.5d ! So, ya, it's supposed to be the same. :D

I think you missed updating your /admin/includes/auto_loaders/config.core.php since it points things to load the upload class from the non-admin classes area. ;)

I had done it but I can't get back into my admin when I do that so I thought maybe it was something to do with my customization but it's not, right? loll

ok so something else is wrong. Any thougths because I had done everything else exactly as it was required except for that file.

8 Mar 2017, 3:15 AM
#4
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

also, is the same true of admin/customers.php file? it is the same in 1.5.5e as it was in 1.5.5b?

Thanks again

8 Mar 2017, 5:57 AM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

marieAA:

I had done it but I can't get back into my admin when I do that so I thought maybe it was something to do with my customization but it's not, right? loll

ok so something else is wrong. Any thougths because I had done everything else exactly as it was required except for that file.
Check your logs directory. There may be an entry related to the includes/classes/upload.php file and something about the [ character particularly if using php 5.3 or below.

As far as admin/customers.php, don't recall that the problem corrected ever got reverted. The issue was certainly discussed and perhaps the patch applied making the files on your system appear to be the same regardless. I haven't run that specific comparison to know as a matter of fact whether it is/was the same between the two versions.

8 Mar 2017, 5:46 PM
#6
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

mc12345678:

Check your logs directory. There may be an entry related to the includes/classes/upload.php file and something about the [ character particularly if using php 5.3 or below.

yes I get that error in the logs... but if I remove brackets caracter, it then gives me an error on like 208 for the brackets again. Is there something I can replace it with or? I found references to replace the bracket by ( but I still can't get in my admin

thanks for the helps

8 Mar 2017, 5:52 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

marieAA:

yes I get that error in the logs... but if I remove brackets caracter, it then gives me an error on like 208 for the brackets again. Is there something I can replace it with or? I found references to replace the bracket by ( but I still can't get in my admin

thanks for the helps
Suggest looking through the following related thread: https://www.zen-cart.com/showthread.php?t=221963

Sum and total is to try to obtain the now latest copy of 1.5.5e or apply the changes described there or both.

8 Mar 2017, 5:54 PM
#8
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

now I get this in my error logs:

Parse error: syntax error, unexpected ')' in .../includes/classes/upload.php on line 208

8 Mar 2017, 6:12 PM
#9
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

I think I got it... but since no matter how I searched I didn't find it on here... I am posting it in case it can be of some help

Error log said:

PHP Parse error: syntax error, unexpected '[' in .../includes/classes/upload.php on line 205

function set_extensions($extensions)
{
if (zen_not_null($extensions)) {
if (is_array($extensions)) {
$this->extensions = $extensions;
} else {
$this->extensions = [$extensions];
}
} else {
$this->extensions = [];
}
}

Changed it to this:

function set_extensions($extensions)
{
if (zen_not_null($extensions)) {
if (is_array($extensions)) {
$this->extensions = $extensions;
} else {
$this->extensions = COLOR=#FF0000[/COLOR]; // <------ WRONG! Should be: array/COLOR[COLOR=#ff0000]
}
} else {
$this->extensions = array();
}
}

Everything now seems to be working as it should and I no longer get error logs. If you see something wrong that could possibly be wrong with this, please don't hesitate to tell me!!!

8 Mar 2017, 6:17 PM
#10
marieaa avatar

marieaa

Zen Follower

Join Date:
Jan 2013
Posts:
113
Plugin Contributions:
0

Re: upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

mc12345678:

Suggest looking through the following related thread: https://www.zen-cart.com/showthread.php?t=221963

Sum and total is to try to obtain the now latest copy of 1.5.5e or apply the changes described there or both.

darn it, why didn't that come up in my search??? lolll... I

searched the forum for "syntax error, unexpected '['" and then I searched for "includes/classes/upload.php on line 205" when that didn't give any results, I went to Google and did the same but searching zen-cart.com and again no results?!

In any case, thanks for the help... and glad to confirm I did it right!

8 Mar 2017, 6:59 PM
#11
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: upgrading 1.5.5b to 1.5.5e admin/includes/functions/database.php is the same

marieAA:

darn it, why didn't that come up in my search??? lolll... I

searched the forum for "syntax error, unexpected '['" and then I searched for "includes/classes/upload.php on line 205" when that didn't give any results, I went to Google and did the same but searching zen-cart.com and again no results?!

In any case, thanks for the help... and glad to confirm I did it right!
Well, kind of. See below. (correct solution for below is/was in the referenced thread. Also why I asked what message was being displayed as thought it was for the same issue, but wouldn't know until the error log was referenced, read, or even briefly discussed. :))

marieAA:

I think I got it... but since no matter how I searched I didn't find it on here... I am posting it in case it can be of some help

Error log said:

Changed it to this:

Everything now seems to be working as it should and I no longer get error logs. If you see something wrong that could possibly be wrong with this, please don't hesitate to tell me!!!

This part:

 } else {
                $this->extensions = ($extensions);

Should be:

 } else {
                $this->extensions = [b]array[/b]($extensions);