How to change session.gc_maxlifetime? - mysql

After setting $cfg['LoginCookieValidity'] = 604880; for phpMyAdmin, I'm getting the following warning in phpMyAdmin:
Your PHP parameter session.gc_maxlifetime is lower than cookie
validity configured in phpMyAdmin, because of this, your login will
expire sooner than configured in phpMyAdmin.
Where do I have to set session.gc_maxlifetime? Is /etc/php5/php.ini the right place for it? Because nano /etc/php5/php.ini shows me a blank file. What's the right syntax to set session.gc_maxlifetime?

If you run phpinfo() (in a browser), the output from that will have a setting: Loaded Configuration File that shows the path to the php.ini file that was used (see below). That will be the file to edit.
The setting in the file is a simple number/value change. Search the file for session.gc_maxlifetime as there is other information above that variable in the file.

Related

How to edit the php.ini file in Ubuntu 19.04 (Disco Dingo)

Consider:
Now I am getting this error. How can I resolve this issue?
I found found some related issue, but that told me change max-size inside file php.ini, so how can I edit file php.ini (phpmyadmin-config)?
Importing into MySQL, the database size is above 100 MB. And the MySQL database size converts it into a ZIP file, and then import working, but it is not inserting all tables.
I'm not sure which OS or Apache server you're using right now.
If you are not aware of the php.ini file path then create one info.php file inside your www/htdocs folder and write the below line of code inside that file.
<?php echo phpinfo(); ?>
Execute the above file in your web browser. You will find the loaded php.ini configuration file path, like shown below.
Now go to the file path and increase the values of the below two variables as per your need.
upload_max_filesize=128M
post_max_size=128M
PS: Don't forget to restart your Apache server. :)
The configuration file is located at the below path:
/etc/php/php_version/apache2/php.ini
Now increase the value of:
post_max_size = 150MB
upload_max_size = 150MB
Then restart the server:
sudo service apache2 restart

Can't find 'secure_file_priv' variable in my.cnf

I'm using mysql, and I want to enable saving queries to text files in any location. Currently, when I run the mysql command:
show variables like 'secure_file_priv';
I receive the value for 'secure_file_priv':
/var/lib/mysql-files/
I am able to save my queries to files in this location but nowhere else of course. (I'm also having trouble accessing this folder, even when I try to access it as root)
I found my 'my.cnf' file in '/etc/my.cnf', but it doesn't contain the variable 'secure_file_priv'!
I added it in myself as:
secure_file_priv=""
But this didn't do anything.
I also tried changing it through the mysql terminal, but it is a readonly variable, so I wasn't able to.
Where is this variable located and how can I change it to allow me to write the results of queries to files anywhere?

phpMyAdmin gives export.php instead of database sql dump

Environment
Wamp server 2.5 x64 (MySQL 5.6.17, phpmyadmin4.1.14) on Windows 10 Enterprise x64 (Fresh installation, no major changes since yesterday total installation)
Full control access to C:\wamp\tmp\ folder for windows everyone group, and the folder is not read-only
Problem
When I try to export my database using Export tab, under my database page, It gives me the export.php file, the body part of which is like this:
<body>
<h1>phpMyAdmin - Error</h1>
<p>export.php: Missing parameter: export_type<a href="./doc/html/faq.html#faqmissingparameters" target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a><br /></p>
</body>
But, I expect the .sql dump file!
My effort
I googled for export.php: Missing parameter: export_type with no success.
I also visited http://localhost/phpmyadmin/doc/html/faq.html#faqmissingparameters for any useful notes, with no success.
In config.inc.php, the $cfg['PmaAbsoluteUri'] directive is empty.
In php.ini the arg_separator.input directive has value ;&.
Edit
Screenshot added, right before pressing Go button
I tried to use my browser's (Google Chrome 47.0.x.x) console to see If there is something wrong with it and I noticed this warning there:
Resource interpreted as Document but transferred with MIME type text/x-sql
Then I tried disable my browser's extensions one-by-one where I found this extension was the cause:
Free Download Manager Chrome extension (1.0.23)
I disabled it and now everything is fine.
I had a similar issue on a CentOS Cloud Server with Magento CE installed. My selection was to Export all tables, SQL format, Save to Output File, Add "Drop Table..", Add "IF NOT EXISTS".
Instead of dropping a .sql file, it always dropped a "sql" file without any extension and regardless any filename I was choosing. Inside that "sql" file there was the html source of the current phpmyadmin page!
I solved the issue by uncommenting and increasing the variable "max_input_vars" inside php.ini to 3000 rather than 1000.
Hope this helps!
I was trying to export my Magento database. And phpmyadmin instead of dropping a .sql file, retured a sql named file with no extension. Finally, I solved the problem by navigating to the php.ini file and uncommenting the "max_input_vars" variable and increasing its value. Don't forget to restart your xampp/wamp server after making the changes in php.ini.
Check up "Settings"(from main menu),then "Export" tab. "Save as file" checkbox should be checked.
When you setting up the export options, choose:
"Custom - display all possible options" radio button instead "Quick".
Set "Save output to file" radiobutton in "Output" section.
Set "Format" dropdown box to "SQL".
Then press "Go" button.
I suppose you are running http://localhost/phpmyadmin/export.php on Google Chrome. Switch to some other browser (Ex: Microsoft Edge) and then run http://localhost/phpmyadmin/export.php. Now export the database as usual.
I got same problem, but I solved it after increasing the Disk Space Usage of website.I don't know your probblem will be solved or not but i solve by increasing Disk Space Usage
Hi select custom display option when exporting database and uncheck option
Dump TIMESTAMP columns in UTC (enables TIMESTAMP columns to be dumped and reloaded between servers in different time zones)
This will resolve the issue.

an error occurred while processing this directive in justhost

when i upload my website to my hosting Justhost it not working and it show only error like this
an error occurred while processing this directive
Please help me to correct this error
try the steps that follow:
Go to cPanel
Open File Manager from Files section
Navigate to domain folder
Check "Perms" column on far right hand side
Files should be set to: 0644 (this is the UNIX file permissions)
Folders should be set to: 0755
This will change your file permissions to their proper settings for the justhost file system. Additionally, if you have PHP code within.htm or .html files, you will need to add an additional Apache handler to tell justhost to parse these files as PHP. Do this using Apache Handlers in cPanel:

mySQL installer - access to path is denied

I'm trying to install mySQL 5.7.7, but on the 'Apply Server Configuartion' page the 'writing configuration file' fails and the log gives the error as:
'Could't find path 'C:\ProgramData\MySQL\MySQL Server 5.7\my.ini'
So then I manually added the folder and got this error:
'Access to the path 'C:\ProgramData\MySQL\MySQL Server 5.7\my.ini' is denied.'
Following advice online I've given 'Everyone' full-access to mySQL plus all files in the path, but I still keep getting the same error.
Any ideas? Much appreciated, thanks
Maybe your my.ini file is not where it should be. To figure out exactly what his location is:
Open the Task Manager, go to the Services tab and then hit the Services button.
Search in the list for the service called 'MySQL56'. Right click on it, and hit Properties.
In the General tab, look for "Path to executable". After --defaults-file= you should see the exact path of the file my.ini.
If the file is in the folder you specified but you still can't access it, maybe you should try to reinstall.