I am trying to load the php_memcache.dll extension using the Plesk Additional Directives section under the PHP Settings for a domain, subscription or subdomain. No matter what I do, I cannot get Plesk to load the extension!
The only way I can load the extension into PHP is by manually editing the php.ini, which is a dirty fix as I will need to edit this each time the server is updated as the php.ini gets overwritten each time!
The php_memcache.dll is definitely in the extensions directory referenced in the phpinfo(), this is proven by the fact that I can load the extension successfully by entering it into the php.ini manually.
I am pretty confident this is a bug, but just wanted to see if anybody else has had any similar issues?
The bug seems to be the description implying that it is possible when it really is not.
In this page: http://download1.parallels.com/Plesk/PP11/11.5/Doc/en-US/online/plesk-administrator-guide/index.htm?fileName=69696.htm it says that additional directives can take any setting that is listed as PHP_INI_USER and PHP_INI_ALL in this page: http://php.net/manual/en/ini.list.php.
In that page extension is listed as php.ini only, so it will not work from the additional directives option.
Related
I tried everything, but I can't make it work. I recently installed MAMP. The PRO version came with an option to add OAuth via a checkbox, but now that the PRO version expired I need to install it by hand.
When I check phpinfo() on my browser it says that the path to my php.ini file is:
/Applications/MAMP/bin/php/php7.1.0/conf/php.ini
Also, there is (none) under additional ini files. So I am pretty sure that is the correct php.ini file
The problem is that after adding the OAuth extension to the ini file, and restarting MAMP, PHP still can't find OAuth.
Also strange is that I don't see any of the other enabled extensions (like mcrypt) in the phpinfo() output.
Any tip in the right direction will be appreciated,
Thanks!
After much debugging, this is what I did in order to figure out the problem and solve it.
As suggested in the comments of my question, once I checked the http logs I found out that PHP was not finding the extensions.
I checked php.ini for extension_dir and it was pointing to a different path than the one that pecl was installing packages on.
If you need to find that path, simply use:
pear config-get php_dir
After correcting that everything works fine.
I have a simple wordpress web site under a windows hosting, I know that a Linux environment is better for wp but I need windows for another ASP.NET application. Anyway wordpress show me an error message about max_input_vars set to 1000 and this value should be 4000, I can't edit the php.ini then I would like to know if is it possible to set this value in the web.config, I know that in Apache it can be set in the .htaccess so I hope that can be done in the web.config as well.
Thanks in advice!
EDIT
I have found a solution: I create a php.ini file with max_input_vars=4000 and I added it to wp-admin folder after that the error message disappear and checking the environment setting by PHP Settings wordpress plugin the max_input_vars value is 4000, I don't know if this is a best practice, but works, if someone has a better solution please explain it.
Thanks!
I know it's been a long time but i thought to post a solution for anyone who search about this issue.
Go to IIS and then from the right side there is an option to stop the server.. click on it.
Go to you default programs folder. Probably C: drive (C:\Program Files (x86)) then search for PHP folder.. probably you will find more than a version. choose the one you're using in wordpress.
Inside that folder you will find a file (php.ini) edit that file using notepad (you must start notepad using admin privilege).
It is a big file.. so search for (max_input_vars = 1000) and it is commented. so you have to remove the semicolon before the word max and then increase it to 4000. You may also search for memory_limit and increase it to 128m or more.
Save the file and make sure it is saved properly. try to open it again and make sure your changes are saved.
Return back to IIS and start the server.
Close the browser and open it again. Check your wordpress if the issue is cleared.
Good luck.
There are four modes in which the PHP directives can be set:
PHP_INI_USER
PHP_INI_PERDIR
PHP_INI_SYSTEM
PHP_INI_ALL
Please have a look at how these are managed: http://www.php.net/manual/en/configuration.changes.modes.php
Each directive has one of these changeability modes defined and for that you could visit: http://www.php.net/manual/en/ini.list.php
As you'd see, the changeability attribute for directive max_input_vars is PHP_INI_PERDIR, meaning it can be overridden by adding a custom value in either of php.ini, .htaccess, httpd.conf (Apache) or .user.ini. Therefore, defining a new php.ini file to increase the limit of max_input_vars is just as fine as the other three workarounds.
Please remember though that, at times, some of the extensions that PHP would use might need to be re-enabled in custom ini files. For instance, I've at times run into problems with pdo and mysqli being considered as disabled, unless explicitly set in the custom file too, when using an override ini file.
My Prestashop install is not able to access outside urls, and its really beginning to drive me nuts!
The response in
I've already changed the php.ini setting, in
/etc/php5/cli/php.ini
which did nothing for it,
allow_url_fopen = On
Then,
I managed to try this guide, which still did not eliminate the error, which basically adds a php.ini file into the root directory with the above setting.
The server is physically located at my residence, and the prestashop install is accessible here
I'm most weak in this area, so I'm not able to understand why this is happening. Any ideas what the problem is?
The typical problem I've had with issues like PHP settings having no effect is usually having multiple php.ini files (sometimes multiple PHP setups from different attempts, as well). Search Your system for multiple php.ini files and verify which one is correct.
Alternatively, Your php.ini file may not be where PHP expects to find it. Run phpinfo() and see what php.ini file Your setup reads (or tries to read).
Thirdly, please verify that You have appropriate permissions set for the php.ini file - the web server process should be able to read this file.
I'm getting this PHP warning in my error_log and want to get it fixed. I'm told it is loaded within php.ini which I've verified as well as a bunch of configuration settings for the module. I'd like to maintain the module configuration in the place where it's loaded so I need to find out how else to remove it from the list.
Unless removing it from php.ini is just fine.
Module 'eAccelerator' already loaded
It sounds to me like you've got the configuration in multiple files.
If your set up is on Debian (or something like Debian) it could be that eAccelerator is loaded in php.ini as well as in a secondary file. For instance, on Debian, php.ini lives at /etc/php5/apache2/php.ini (for PHP 5.x and Apache 2.x). But it also parses all the files in /etc/php5/conf.d/, which in my case includes files like gd.ini, mysql.ini, and suhosin.ini. I have see misconfigured packages add configuration to the end of php.ini as well as in a separate file in conf.d. This will give the kind of error you're seeing.
FYI, this scanning is done with a compile-time configure option (specifically, --with-config-file-scan-dir=).
I need to turn allow_url_include On. How can I do this? I have access to .htaccess as well as php.ini.
I'm using PHP version 5.2.9
I've tried adding
php_value allow_url_include On
in .htaccess and
allow_url_include = On
in php.ini.
Both files are at the root of my website.
Is there a way to use the curl/get page function as a workaround?
Are you sure you're grabbing the right php.ini file?
If you're on a linux box, you might be grabbing the wrong one. I've seen that happen in the past. If you are indeed using Linux, open the terminal and type
which httpd
which php
Then you'll know if your pointing to the right locations.
Depending on what you are trying to use as a file to include you will need to enable both url_fopen and url_include.
The relevant php documentation entry is available here:
http://www.php.net/manual/en/filesystem.configuration.php