Post by adam.boustead » Sun May 15, 2016 9:36 pm

Hi all,

This one has been baffling me for a while and I still haven't found an answer yet hence why I'm asking on here.

I'm running a fresh install on Opencart 2.1.0.2 so I know it's not to do with any additional vqmods etc.

To cut a long story short I plan to have a UK & a Rest of World Shipping geozone.

If i setup a new Geozone & add all the countries listed to it (apart from the UK), then save, whenever i go back into the geozone to edit it it gives me a 500 internal server error.

I honestly don't know if this is to do with memory limits or what. Has anyone else come across this error?

Newbie

Posts

Joined
Sun Oct 11, 2015 11:45 pm

Post by artcore » Sun May 15, 2016 10:11 pm

Hi,
A 500 is a generic error, can you check the server logs for specifics?
Or add this to the admin index.php right below the opening <?php

Code: Select all

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
and hopefully something meaningful will come up.

...always us e a decent code editor like sublimetext

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by phamxuanvinh2110 » Mon Dec 05, 2016 3:21 pm

the same one. how can i fix it?
error with geozone at line 28 and line 30.

Attachments

Untitled.png

Untitled.png (7.11 KiB) Viewed 1824 times

Untitled1.png

Untitled1.png (161.52 KiB) Viewed 1824 times


New member

Posts

Joined
Mon Nov 28, 2016 11:41 am

Post by artcore » Mon Dec 05, 2016 4:20 pm

Try this:

Code: Select all

			foreach ($data['zone_to_geo_zone'] as $value) {//line 27
				if(!isset($value['zone_id']))continue;//add this

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by phamxuanvinh2110 » Mon Dec 05, 2016 4:59 pm

artcore wrote:Try this:

Code: Select all

			foreach ($data['zone_to_geo_zone'] as $value) {//line 27
				if(!isset($value['zone_id']))continue;//add this
error when login admin -> geozone

New member

Posts

Joined
Mon Nov 28, 2016 11:41 am

Post by artcore » Mon Dec 05, 2016 6:14 pm

You have be more specific or no one will be able to assist.
Did you add the new line of code as I suggested at the exact spot?
What's the error?

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by phamxuanvinh2110 » Mon Dec 05, 2016 10:47 pm

artcore wrote:You have be more specific or no one will be able to assist.
Did you add the new line of code as I suggested at the exact spot?
What's the error?
I using new vers OPC. I set multi flat rate base on weight.
My country have 63 provine, I set one provine have fee shipping 25.000 vnd, and other province (62 province) have fee shipping 30 000 vnd.
result:
+ One provine ( 25000 vnd) is ok, well done
+ and how other province (62 province) set? GEO zone must 63 option => save option, then edit is error with 500 internal, and losing zone. img attack error

Attachments

Untitled1.png

Untitled1.png (161.52 KiB) Viewed 1792 times


New member

Posts

Joined
Mon Nov 28, 2016 11:41 am

Post by artcore » Mon Dec 05, 2016 11:56 pm

A 500 server error is very generic. Do you have a file in the admin root -> error_log?
If so post the relevant error
Otherwise add this to admin/index.php right below the opening <?php

Code: Select all

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Visit the page again that causes the error and report the error message.

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by phamxuanvinh2110 » Tue Dec 06, 2016 12:39 am

artcore wrote:A 500 server error is very generic. Do you have a file in the admin root -> error_log?
If so post the relevant error
Otherwise add this to admin/index.php right below the opening <?php

Code: Select all

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Visit the page again that causes the error and report the error message.
in the admin root -> error_log:
"[05-Dec-2016 15:56:29 Asia/Ho_Chi_Minh] PHP Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /home/xxx/public_html/admin/model/localisation/geo_zone.php on line 21
[05-Dec-2016 15:58:21 Asia/Ho_Chi_Minh] PHP Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /home/xxx/public_html/admin/model/localisation/geo_zone.php on line 21"

New member

Posts

Joined
Mon Nov 28, 2016 11:41 am

Post by phamxuanvinh2110 » Tue Dec 06, 2016 12:42 am

artcore wrote:A 500 server error is very generic. Do you have a file in the admin root -> error_log?
If so post the relevant error
Otherwise add this to admin/index.php right below the opening <?php

Code: Select all

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Visit the page again that causes the error and report the error message.
Otherwise add this to admin/index.php right below the opening <?php

Code: Select all

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
=> can't login admin, error "The phukienvatrangsuc.net page isn’t working

phukienvatrangsuc.net is currently unable to handle this request.
HTTP ERROR 500"

New member

Posts

Joined
Mon Nov 28, 2016 11:41 am

Post by artcore » Tue Dec 06, 2016 2:09 am

PM me your admin login and FTP and I'll have a look.

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by phamxuanvinh2110 » Tue Dec 06, 2016 2:27 pm

"ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);"
I add above code at php.ini, and it create error_log.php, and notice:
"[06-Dec-2016 13:16:38 Asia/Ho_Chi_Minh] PHP Fatal error: Call to undefined function phpini_set() in /home/xxxxxx/public_html/index.php on line 1
[06-Dec-2016 13:16:59 Asia/Ho_Chi_Minh] PHP Fatal error: Call to undefined function phpini_set() in /home/xxxxxx/public_html/index.php on line 1"

I use original new vers, no new module, no SEO extension. language Vietnamese.

New member

Posts

Joined
Mon Nov 28, 2016 11:41 am

Post by phamxuanvinh2110 » Tue Dec 06, 2016 2:42 pm

I just install localhost => no error
so error with hosting server???

New member

Posts

Joined
Mon Nov 28, 2016 11:41 am

Post by artcore » Tue Dec 06, 2016 3:26 pm

We will never find out if you don't follow the instructions to the letter.
To know what causes the 500 error you need to have a detailed description which is either in the file 'error_log' in your admin folder. Or you change admin/index.php so it displays the error.

you put that code in a completely different file and expect it to work.

If it's related to php_max_inputs_vars, try saving geo zone with 20 zones, than 30 and so on until you get the error. Then ask your host to raise this value.

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by phamxuanvinh2110 » Tue Dec 06, 2016 3:56 pm

"Tue Dec 06 14:45:09 2016] [error] [client 14.186.33.71] (12)Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for /home/phuki867/public_html/index.php, referer: http://phukienvatrangsuc.net/admin/inde ... _zone_id=8
[Tue Dec 06 14:45:09 2016] [error] [client 14.186.33.71] (12)Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for /home"
I contact support with host server. But don't know it depend on what properties. memory? or max_input_vars???
I test, 5 input => no error. larger 5 input => error with 500 internal server

New member

Posts

Joined
Mon Nov 28, 2016 11:41 am

Post by phamxuanvinh2110 » Tue Dec 06, 2016 5:16 pm

fix done. I edit php.ini (root index.php), set memori_limit = 128M => no error
Thank you very much. Love :)

New member

Posts

Joined
Mon Nov 28, 2016 11:41 am
Who is online

Users browsing this forum: No registered users and 8 guests