2 Attachment(s)
prices wont update after a certain line number with script i am running
hi, i am using this "mod" called specialsbycategorys. it's an old oscommerce plugin i have used over the years and updated over the years. so what it does is allows you to drop down a category within a mfg or you can type the entire part numbers for a mfg and update all the pricing in one screen and also update pricing with discount pricing. this saves time from having to go through each part number through the products page esp when you have over 500 part numbers with pricing.
here is the problem, when you get to maybe the 160th part number to update pricing, after that, if you enter a new price, it does not update, the old price stays the same. yes you can go to that particular part number through products and update the pricing.
so is this a memory limit issue? i would think it's not. fyi, i just upgraded to 1.57c and it worked in 1.55d. the coding for this file was updated so it would work for my current php and mysql. php is 7.0.33. memory limit is 128M, max exec time is 30, max imput time is 60, post max size is 128M, upload max size is 128M. mysql is 5.1.73.
tia
Re: prices wont update after a certain line number with script i am running
Judging by the screenshot, I believe it's the same issue as here, and you'll probably just need to change your max_input_vars in your php.ini file.
Re: prices wont update after a certain line number with script i am running
Quote:
Originally Posted by
balihr
Judging by the screenshot, I believe it's the same issue as
here, and you'll probably just need to change your max_input_vars in your php.ini file.
thank you, i looked and i am dumb. i use plesk, the setting is not there, so i am assuming i have to sftp which i do have the software for. do you know which directory it would be under? also the max input var is set at 1000 according to zen cart admin server info
Re: prices wont update after a certain line number with script i am running
Ok i have several sites on my server, so i found the specific php,ini for this particular website under /var/www/vhosts/system/website name/etc/php.ini
BUT it does not have max_input_vars in there. would i have to add it, if so how? or do i need to go deeper to the root directorys and find a "master" php.ini? thanks for your help
Re: prices wont update after a certain line number with script i am running
Quote:
Originally Posted by
travbacon
do you know which directory it would be under? also the max input var is set at 1000 according to zen cart admin server info
Yes, it's probably 1000, but I can see you have 3 input fields per row, one is definitely hidden (products_id) and who knows what else you're submitting, so yeah, it's super easy to reach 1000.
You can try adding a php.ini file to your admin directory - it's basically a txt file. So, create a new txt file, rename it to php.ini (just change the extension), and put a line like
Code:
max_input_vars = 10000
Then check your admin->Tools->Server/Version Info for the admin value of max_input_vars (to make sure it's being picked up) and then try again.
IIRC, you can add custom php settings through Plesk, but that will apply to the domain, not just admin. I think it's better to have this php.ini file in your admin directory, instead of setting a new global value.
Re: prices wont update after a certain line number with script i am running
Thanks just to clarify, each website domain has their own php.ini. So can I edit the current php.ini file and add max_input_vars and it will overwrite the global value set overall for the host server?
again thank you so much for you help
Re: prices wont update after a certain line number with script i am running
also if so would max_input_vars=xxxxx be the correct syntax?
Re: prices wont update after a certain line number with script i am running
i set it at 2000, it worked but further down, prices would not update, 10000, helped a little and could update further down, so instead of testing back and forth, i set it a 1,000,000 and works for what i need.
so would this affect anything on the zc site, like make things work weird?
Re: prices wont update after a certain line number with script i am running
Quote:
Originally Posted by
travbacon
so would this affect anything on the zc site, like make things work weird?
No, it won't affect things visually.
It just increases the amount of RAM that PHP must allocate (an CPU cycles to do so) in order to handle the number of possible input values that could be sent by ANY page on your site. In practice the impact is probably minimal, causing just minor delay on most pages, and slightly longer delay on pages where you're actually submitting that many values.
You might want to experiment a little further to reduce it down a bit.
Re: prices wont update after a certain line number with script i am running
i am willing to send this file to the zc crew to review and make necessary adjustments and upload it as a free plugin. this script is soooooo friggin helpful and saves so much time.
Re: prices wont update after a certain line number with script i am running
Quote:
Originally Posted by
travbacon
Thanks just to clarify, each website domain has their own php.ini. So can I edit the current php.ini file and add max_input_vars and it will overwrite the global value set overall for the host server?
The php.ini file works based on directory and applies to all subdirectories inside it. So, if you put it in your store root, it will affect everything that's in root - your frontend, your admin, and even other websites if you have them installed as a subfolder (ie. yourdomain.com/blog or yourdomain.com/whatever).
If you have an existing php.ini it's always best to just ADD a new line with your new directive.
Quote:
Originally Posted by
travbacon
also if so would max_input_vars=xxxxx be the correct syntax?
Yes, it would.
Quote:
Originally Posted by
travbacon
i set it at 2000, it worked but further down, prices would not update, 10000, helped a little and could update further down, so instead of testing back and forth, i set it a 1,000,000 and works for what i need.
so would this affect anything on the zc site, like make things work weird?
As long as you keep this setting just for your admin, meaning in your store_root/YOUR_ADMIN/php.ini, I don't see how it could cause problems. I wouldn't set it as a global value for the entire domain or entire server, there's a reason why it's limited. But, since the admin is just for you, you probably won't be doind DDoS attacks on yourself from the admin so I guess you can set it to a quantillion if you want, although you should keep in mind you're gonna be hitting your server with a lot of data which will probably need quite some processing power.
Quoting:
Quote:
What is the purpose of Max Input Vars?
It helps lessen the severity of the DDoS (Denial of Service) attacks using hash collisions.
Quote:
Effects of higher Max Input Vars limit
The max_input_value should always be a reasonable level, which is called the ‘sanity check’. When this limit is exceeded, it makes you more vulnerable to attacks and can drench the server down.
Re: prices wont update after a certain line number with script i am running
"causing just minor delay on most pages, and slightly longer delay on pages where you're actually submitting that many values."
so what you are saying is having it at 1,000,000 is overkill and the servers ram will allocate that much everytime even though i don't need it, so i really need to experiment and if 500,000 helps, it will reduce load? (even though that load will really will be minimal?). basically try to trim it get the optimal perfomance from the zc site?
Re: prices wont update after a certain line number with script i am running
thank you. yeah, this script is only for updating pricing on the admin in. who wants to individually update pricing one at a time for EACH mfg (we have maybe 200 mfgs) and each mfg has 100-900 part numbers. so this scripty helps a lot. go figure, this is from 2001 oscommerce days and it still works haha (of course with minor changes as php upgrades affected it to not work)
thanks again so much for your helpful insight
Re: prices wont update after a certain line number with script i am running
Quote:
Originally Posted by
travbacon
so this scripty helps a lot. go figure, this is from 2001 oscommerce days and it still works haha (of course with minor changes as php upgrades affected it to not work)
Feel free to zip it up and attach it here. Someone may spruce it up a bit.
Re: prices wont update after a certain line number with script i am running
Quote:
Originally Posted by
travbacon
"causing just minor delay on most pages, and slightly longer delay on pages where you're actually submitting that many values."
so what you are saying is having it at 1,000,000 is overkill and the servers ram will allocate that much everytime even though i don't need it, so i really need to experiment and if 500,000 helps, it will reduce load? (even though that load will really will be minimal?). basically try to trim it get the optimal perfomance from the zc site?
Uhm, where did I say that? :smile:
No, I'm just saying that as long as you keep that setting for admin-only, it's fine. I very much doubt you'll experience any lags on any other page in admin, and yeah, you should expect some lag on this page, but it's just something you'll need to learn to live with.
Quote:
Originally Posted by
travbacon
thank you. yeah, this script is only for updating pricing on the admin in. who wants to individually update pricing one at a time for EACH mfg (we have maybe 200 mfgs) and each mfg has 100-900 part numbers. so this scripty helps a lot. go figure, this is from 2001 oscommerce days and it still works haha (of course with minor changes as php upgrades affected it to not work)
thanks again so much for your helpful insight
Well, if it works for you, that's great, but you might wanna consider using EasyPopulate or DbIo and upload that data through spreadsheets. It would probably be quicker for you...
Also, the 2001 script... I don't really think it's that good to have so many products listed per page, perhaps it doesn't have pagination. It would probably be a better idea to add pagination and display let's say 200-500-1000 products per page. I know it's not as simple to use as it is with ALL products shown at once, but...
Re: prices wont update after a certain line number with script i am running
i agree, it should have pagination like 100 products per page and the max vars could be set at default 1000, but like i said, this is from 2001 haha. and yes, i would love to use easypop or whatever, i have sent you a PM. thank you so much for your insight!
Re: prices wont update after a certain line number with script i am running
Quote:
Originally Posted by
DrByte
Feel free to zip it up and attach it here. Someone may spruce it up a bit.
Sorry, I have been slammed. I also have sent you an important question (well at least I think it is). Thanks.