php.ini warning page has more than 1000 fields - php

After reaching so many entries PhpMyAdmin started showing this warning:
Warning: a form on this page has more than 1000 fields. On submission, >some of the fields might be ignored, due to PHP's max_input_vars >configuration.
I have tried to change out the field from 1000 to 10000, then restarted php.ini.
[ ok ] Restarting php7.0-fpm (via systemctl): php7.0-fpm.service.
/etc/init.d/php7.0-fpm restart
Nothing seems to work so I can export mysql database. Please help me get this correct so I can get this database exported. Many thanks.

Solution Found.
First of, be sure that you are editing the right php.ini file. To do that you can check what it is with phpinfo().
Then restart php to reload php.ini, depending on how you installed it, it could be done like that :
brew services restart php72
Restart apache as well to be sure :
sudo apachectl -k restart
Then put the following statement in a test.php file :
echo ini_get('max_input_vars'); and check it.
At this point you will see it is correctly updated.
If you still have phpmyadmin showing error after that, you should then hard refresh your phpmyadmin page : it can be done with CMD+SHIFT+R on a Mac.
The reason for this is that phpmyadmin's local javascript file is gettting passed the value of max_input_vars from php and is responsible for deciding to display the error or not. So if the javascript local file isn't updated for caching reasons for example, then you just have to refresh it and problem gone : )

Related

phpMyAdmin - Error Incorrect format parameter

I tried to import a large sql file but its not getting imported.
And it shows the following error.
phpMyAdmin - Error
Incorrect format parameter
I have been using Xampp-php 5.6 in ubuntu16.04.
I have tried these links given below already but none of it worked.
https://www.webtrickshome.com/forum/how-to-fix-phpmyadmin-error-incorrect-format-parameter-that-appeared-while-importing-a-database
importing db phpMyAdmin - Error Incorrect format parameter
Importing large database file in MAMP phpMyAdmin
You can easily import using cmd promt
mysql -u username(of phpmyadmin) -p database_name < file_path/file_name.sql
you can also do the changes in php.ini file to increase upload size of phpmyadmin.
in php.ini of your PHP installation (note: depending if you want it for CLI, Apache, or Nginx, find the right php.ini to manipulate)
post_max_size=500M
upload_max_filesize=500M
memory_limit=900M
or set other values.
Restart/reload apache if you have apache installed or php-fpm for nginx if you use nginx.
Remote server?
increase max_execution_time as well, as it will take time to upload the file.
NGINX installation?
you will have to add: client_max_body_size 912M; in /etc/nginx/nginx.conf to the http{...} block
I was facing the same problem when I was trying to import a 90mb database. You can solve this problem by opening
xampp->phpMyadmin->libraries->config.default.php
after opening the file search for $cfg['ExecTimeLimit'] = 300;
Here you can set the time to 1000 or whatever you want after the equal sign. The default value is 300.
thanks for thi answer
post_max_size=500M
upload_max_filesize=500M
memory_limit=900M
There file format can be .sql.zip
Shown in the attached picture. It happened to me.

form on this page has more than 1000 fields

I have database on my localhost when I tried to export database it gave me this error
Warning: a form on this page has more than 1000 fields. on submission,
some of the fields might be ignored, due to PHP's max_input_vars
configuration.
so I have changed max_input_vars = 1000 to max_input_vars = 10000
now I am able to download the database but it is taking lot of time to import on server and also it might be corrupt my database.
is there any other option to get my database working? I have around 450 tables and some tables have around 4000-5000 entries
I am working on windows 7 with xammp server and I have created this database for magento website.
This is 100% working
First find to max_input_vars in php.ini file
and change to:
;max_input_vars = 1000
to
max_input_vars = 1000
This is working fine in know more please visit video link.
The following was the solution for me :
First of, be sure that you are editing the right php.ini file. To do that you can check what it is with phpinfo().
Then restart php to reload php.ini, depending on how you installed it, it could be done like that :
brew services restart php72
Restart apache as well to be sure :
sudo apachectl -k restart
Then put the following statement in a test.php file :
echo ini_get('max_input_vars'); and check it.
At this point you will see it is correctly updated.
If you still have phpmyadmin showing error after that, you should then hard refresh your phpmyadmin page : it can be done with CMD+SHIFT+R on a Mac.
The reason for this is that phpmyadmin's local javascript file is getting passed the value of max_input_vars from php and is responsible for deciding to display the error or not. So if the javascript local file isn't updated for caching reasons for example, then you just have to refresh it and problem gone : )
You should provide more information about what system you are on and the method you tried to export the database, otherwise answers can't be specific.
mysqldump is what you need for exports.
On Linux (and probably on Apple computers too) you can simply use:
mysqldump -u YOUR_USER -p YOUR_DATABASE > DESIRED_FILE_NAME.sql
mysqldump should be also be available for Windows.

Incorrect format parameter

Currently, when I visit localhost/phpmyadmin, I am seeing the following error:
ERROR: Token Mismatch (In tooltip)
Incorrect format parameter
I will explain the changes I did step by step:
I had xampp of version 1.7.1 installed.
To upgrade it to latest, I renamed Xampp folder in c:// to "xampp_1" and took the group database backup in .sql format.
From this link, I downloaded php_oauth-1.2.3-5.6-ts-vc11-x86.zip and copied the php_oauth.dll to c://xampp/php/ext/ and then in php.ini, I mentioned extension=php_oauth.dll.
After this, I ran Apache server and Mysql through Xampp.
then tried to import the sql backup file through CLI as follows:
mysql -u root < localhost.sql
I got some error in command prompt. (I will update this soon)
Then later when I visited localhost/phpmyadmin, I am seeing this page:
In my case this worked:
logout
clear url (remove all after ?, wspecially token=blablabla must be removed)
remove all cookies
refresh
login
This can't fix the problem basically as the same error may appear in any time
Find php.ini in the xampp
1- post_max_size: 128M (give a size for example 128)
2- upload_max_filesize : 64M (for example 64)
post_max_size must be larger than upload_max_filesize to fix the problem.
Reason: You are getting this error because size of your filename.sql is greater than maximum upload limit. (By default you can import upto Max:2,048KiB)
Solution:
Navigate to xampp\php\php.ini
Find upload_max_filesize and increase it to desired upload side (e.g. upload_max_filesize=128M) and save
Restart xampp
Adding solution as a answer text so that the question drops from the Unanswered Questions list. Original answer is provided by the question author in a reply/comment on his original question text:
I uninstalled both 1.7.1 and 5.6.3 and then re-installed 5.6.3. That
did the trick.
The problem is with the Post Maximum size, open the PHP.ini file and find the
post_max_size=8M and increase it up to post_max_size=128M,
1.PHP.ini ->increase the post_max_size parameter from 8M up to 128M,
that's it.
I found a perfect solution in the following tool:
BigDump: Staggered MySQL Dump Importer
which allowed me to change the connection charset to match that of the dumpfile. Works fine without any installs/re-installs.
set this database and ini file
SET GLOBAL max_allowed_packet=1073741824;
max_allowed_packet = 64M
then: use CLI (cmd)
goto ->xamp->mysql->bin
copy the path n set in Cmd
use below command to dumb db
mysql.exe -u root -p db_name< "C:\Users\path\file.sql"

LAMP When i upload php code, but browser is not reflesh until i restart my apache2 services in linux

in my system i install lamp,
i disable my varnish,
now i update my php code, and when i reflesh my browser, the php code like never change,
after i service apache2 restart, then the code are shown.
the scenario are
at first i submit
<?php
echo time();
?>
then i restart apache 2
screen will print timestamp
and then i modify code without restart apache2 services
<?php
echo time();
echo time();
?>
its still showing one timestamp,by right it should display 2 time stamp.
and everytime i reflesh the timestamp are changing ,so this is not a varnish issue.
but after i service apache2 restart, then 2 timestamp will show....
in my AWS ubuntu i do not hav opcache, and im using php 5.3.10
may i know how to disable this caching mechanism?
or anything i miss
some other case in mamp, it refer to something call opcache, but i did not use any or this.
FYI i install apc and memcache, but should not causing this problem, because i got another server also install the same thing.
Anyone please help , thanks
It's probably opcode cache.
<?php
ini_set('wincache.ocenabled', false); //<-- this desactivate it. (you may as well edit your php.ini file to edit this option.
echo time();
?>
If that doesn't work, a hack consists in calling your script passing a random parameter to it :
http://server.com/script.php?t=1
then update your code, and if you call :
http://server.com/script.php?t=2
The result should be updated.

Session Start Failure

This is not your average session failed to start question, there is no whitespace, i have not called it in another file etc.
Im currently working on an application as I have started to build my session library, now when I call session_start I get the following error:
A session had already been started - ignoring session_start()
For those who wish to see the source: https://github.com/AdminSpot/ASFramework/blob/master/system/libraries/session.php
This usually means that the session.autostart directive is set to 1, but that's the thing.. it's not, it's set to 0 and I have verified this by doing the following:
Search my entire system for php.ini* files, checked them
Executed the following command php --ini amd validated the ini files
executed the following command php -i | grep session.auto_start. which responded with session.auto_start => Off => Off
Checked the PHPInfo page, see image below
Checked the php.ini files for cgi
There is no htaccess files on nginx
grep -lir "session_start" * only shows my library file
Restarting FastCGI, Nginx and the entire server
I have created a basic test script to test where i have just called session start on it's own.
The phpinfo() call stats the active php.ini is /etc/php5/cgi/php.ini so after running cat /etc/php5/cgi/php.ini | grep session.auto_start I get session.auto_start = 0, so it disabled, Could it be NGinx ?
Has anyone got any idea what's going on, some server information below:
PHP: PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch
MySQL: Ver 14.14 Distrib 5.1.54, for debian-linux-gnu (i686) using readline 6.2
Nginx: Version: nginx/0.8.54
PHPInfo screen:
My first guess would be that you have an auto-prepend file or an .htaccess which is modifying the settings in the meanwhile.
You can use ini_get to retrieve the value of session.auto_start and auto_prepend_file to confirm. phpinfo() should work too.
Edit
Could it be that your session library is being instantiated twice? Since return $this->session_started is an instance variable, that could cause issues. What happens if you set that to a class-level variable?
Side note:
You also have this return $this->session_started = true; at the end of the start() method. It shouldn't matter, but it looks funny.
How about .htaccess containing a php_value session.auto_start 1? PHP on the command line would totally ignore settings overrides in .htaccess files. Remember that commandline PHP and web-based PHP have completely different .ini files in most standard configurations, so checking via command line is a waste of time.
I'd suggest having your script do a phpinfo() immediately before one of your session_start calls and check what the effective settings are there.
And anyway you can just verify if a session has already started or not.
if (!isset($_SESSION)) {
session_start();
}
http://php.net/manual/en/function.session-start.php#90007
Check and see if you are being passed a session cookie. May help you narrow it down.

Categories