skip to Main Content

I’m running wordpress 2.8.6 as fcgi with safe_mode=on, on plesk9/centOS64. wordpress was installed by installatron. php.ini is being read from /etc/etc/php.ini

I need to increase php’s memory_limit, because I get many mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 40961 bytes) in /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/blah/blah.php on line X when I try to upgrade most WP plugins.

Following instructions on http://www.sakinshrestha.com/wordpress/fix-php-fatel-error-for-wordpress/, i tried creating both a php.ini and an htaccess file and placing it in /var/www/vhosts/domain.com/httpdocs/wp-content/. It didnt work. I did not try using both files at the same time. apache was restarted each time i created those files.

I thought not being able to use the setting per folder could be due to the fact that I am using fcgi. I switched the domain to use mod_php. Now when I try to upgrade a plugin I get a box asking for FTP login info (as seen in http://www.chrisabernethy.com/why-wordpress-asks-connection-info/). I put in the correct FTP login info, but when I click continue, the server tries to get me to download update.php.

So now i have two questions:

1) how do i increase memory_limit for that folder only under FCGI?

2) how do i switch to mod_php and configure WP to NOT need FTP connection info? I tried following the instructions in the last link above, but <?php echo(exec("whoami")); ?> is blocked by PHP Warning: exec() has been disabled for security reasons in /var/www/vhosts/domain.com/httpdocs/whoami.php on line 3. i turned safe_mode=off but it didnt make a difference.

arrrrghhhhh!!

2

Answers


  1. As of PHP 5.3 you can use .user.ini as an configuration file per User.

    Best wishes,
    Fabian

    Login or Signup to reply.
  2. Why in wp-content? Try creating a php.ini in /var/www/vhosts/domain.com/httpdocs.

    Also, did you edit wp-settings.php? This is the default:

    if ( !defined('WP_MEMORY_LIMIT') )
        define('WP_MEMORY_LIMIT', '32M');
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search