I am using Ubuntu server with LAMP and I installed phpMyadmin to manage database. By default phpmyadmin session is destroying after 1440 sec.
I have gone through different online tutorials and forums but no method works.
According to the documentation:
Edit the phpMyAdmin config.inc.php and add (or edit) the $cfg['LoginCookieValidity'] directive, for instance $cfg['LoginCookieValidity'] = 10080
Edit the PHP configuration file php.ini (making sure to edit the correct one; you can use phpinfo() to locate the correct location) and extend the time for session.gc_maxlifetime to at least the same value you used for LoginCookieValidity.
EDIT
You don't want to change the session.gc_maxlifetime for all of your applications, but there's still hope. Since you are using Apache and if the corresponding <Directory> entry in your Apache configuration contains AllowOverride Options (or AllowOverride All), then you should be able to configure this on a per-application basis to only affect phpMyAdmin.
You'll need to create a .htaccess file in the top level of the phpMyAdmin directory and include a line like:
php_value session.gc_maxlifetime 10080
That will force the modified setting only for that folder (and subdirectories), so as long as it's in your phpMyAdmin folder it will only affect the phpMyAdmin application.
If you prefer, you should be able to create (or modify) an Apache vhost and edit the PHP setting directly in the Apache configuration; the configuration directive would be exactly the same,
php_value session.gc_maxlifetime 10080
These methods will only work if the AllowOverride directive is set to either All or Options; lesser settings such as None will not allow these changes.
More details.
Related
I'd like to edit a few ElasticSearch 8 settings (for example: network.host), but I don't want to edit /etc/elasticsearch/elasticsearch.yml directly. What I'd like to do is to add my settings to my own file and put it in an hypothetical /etc/elasticsearch/conf.d folder, do be included automatically.
This approach is widespread with multiple other software I use (Nginx, Apache, MySQL, PHP just to name a few).
ElasticSearch already does what i need with /etc/elasticsearch/jvm.options.d, but that folder is just for the the JVM options, not for ES own settings.
What am I missing here?
You can override the config path via env variables:
ES_PATH_CONF=/path/to/my/config ./bin/elasticsearch
https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html
There is an old discussion about doing what you are asking about but didn't make it this way:
https://github.com/elastic/elasticsearch/issues/11362
I just had my server people install APC to try to decrease the amount of memory that my server uses per person.
I went into my local.xml and entered in the following within the Global mark.
<cache>
<backend>apc</backend>
<slow_backend>database</slow_backend>
<prefix>MYSTORE_</prefix>
</cache>
</global>
I then reset apache.
Then in my php.ini file I have the following:
;APC SETTINGS
apc.enabled=1
apc.shm_size=512M
apc.num_files_hint=10000
apc.user_entries_hint=10000
apc.max_file_size=10M
apc.stat=0
apc.optimization=0
apc.shm_segments=1
apc.enable_cli=1
apc.cache_by_default=1
apc.include_once_override=1
I was able to increase the size and actually enter in these settings buy updating the master php.ini on my server (rather than the local one).
However, when I go into system cached entires it only shows hidden/apc.php and on the dashboard it only shows the 1 file.
Can you guys please help me figure this out? I'm running magento 1.9.1, PHP 5.4.35, APC 3.1.13, Apache 2.2.29.
Thanks!
You're missing
extension=apc.so
Also APC is at the server/php level. The cache block in the XML is to configure higher level caching systems such as Redis.
I have an NGINX server set-up to handle caching for a website (running elsewhere).
Works like a charm, however we want to administrators to have an option to flush the cache from their backoffice. I was thinking of handling this using FTP, by simply removing all the files from the cache directory.
I have set up the caching like this:
proxy_cache_path /var/cache/nginx/my_site levels=1:2 keys_zone=MY_SITE:8m max_size=2048m inactive=720m;
However the files are stored with permissions 700. How can I tell NGINX to also give permissions to the group (770)? I would add the FTP user I created to that group then.
Any other suggestion to handle the flushing would be OK (I heave read the other thread). The backoffice is located on another location so I would have to use some remote technology.
You could use proxy_cache_purge directive, look for details http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_purge (this directive apeared in 1.5.7)
So I've edited my php.ini file to allow for a longer max_execution_time, among some other settings. When I recycle the application pool in IIS 6 on windows server 2003 and check the php info file I've created, the other settings I've changed stick, but max_execution_time stays at it's default setting (300). What's up? It is not commented out and looks like this:
max_execution_time = 1800
Like I said, I've changed max_input_time to have the same value, and it works.
max_input_time = 1800
Reading a PHP Info file shows that the max_input_time is 1800 seconds, but max_execution_time still says 300. Thoughts on this?
Edit: The Loaded Configuration File listed within the phpinfo file is the file I'm working with. As I mentioned, other settings are taking effect, however, this specific setting is not. This means that it is indeed reading the file I'm editing, it just doesn't want to change the max_execution_time. I've also restarted the server.
please check your php.ini path first after then change in correct file.
or
if you change correct file then restart server
Try you can try to use set_time_limit(0);
I want to set the include_path variable in my php.ini file (C:\Windows\php.ini).
But, I want different include_path values for different sites hosted on the same Windows server. How can I do this?
http://php.net/manual/en/configuration.file.php says:
php.ini is searched for in these locations (in order):
. . .
You can review this list and see if one of the techniques helps in your case. For example, you can set the environment variable PHPRC, or you can put a different php.ini file in each current working directory, assuming each virtual host has a distinct cwd.
Note that when using Apache and mod_php, or other module embedding PHP in the web server (e.g. FastCGI), the php.ini file is read once, at web server startup. When you use PHP in a CGI manner, the php.ini file is read during every web request, so you have more opportunity to use a different php.ini.
You can set the php include_path from an .htaccess file, assuming you have the correct AllowOverride settings in your httpd.conf file. Here's an example how:
.htaccess
php_value include_path "d:\path\to\include"
As I understand the question, its more important to have individual include paths for each server/site then multiple php.ini files? Id say keep your code in PHP as far as possible.
Then you can just set the include_path with set_include_path or ini_set.
In apache you can set it in virtual domain or .htaccess file with php_value include_path "<first path to look>:<second path>:<etc>:.". IIS probably has a similar method.
Unfortunately, I don't think you can. However, some webservers can change PHP settings on an individual basis... Apache using mod_php has the php_value setting that you can set on various virtual hosts, IIS might have something similar, but I'm not sure.
set_include_path can also override the include path at runtime.
P.S. TF2 Engineer for the win.