php memory limit

Discussion in 'Installation/Configuration' started by torusturtle, Mar 1, 2007.

  1. torusturtle

    torusturtle ISPConfig Developer ISPConfig Developer

    Hi

    I wanted to use typo3. Problem is that I don't have enough memory allocated for php.

    I edited in /etc/php.ini the line
    Code:
    memory_limit = 32MB
    and restarted apache.

    But still I only get 8MB for typo3.

    Is there another place I have to change the settings?

    Thanks!
     
  2. Hans

    Hans Moderator ISPConfig Developer

    Within my howto http://www.howtoforge.com/typo3_on_ispconfig at STEP 10, you read what you can change/add within your ini.php for a good TYPO3 performance. :)

    And after changing your php.ini file, do not forget to restart Apache!
     
  3. torusturtle

    torusturtle ISPConfig Developer ISPConfig Developer

    Thanks for the Link.

    Still get this Error:
    I also edited the /root/ispconfig/php.ini but didn't help either.

    Restarted apache with
    Code:
    /etc/init.d/httpd restart
    on FC4.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    PLease undo this! This file is not realtaed to your hosted websites at all!

    You are editing the wrong php.ini file. To get the correct file, ,ake a script that contains the phpinfo() function from PHP, this function will print out the path to the php.ini used by php.
     
  5. Hans

    Hans Moderator ISPConfig Developer

    I do not know which Linux distribution you are running, but on Debian Linux the location of your php4 php.ini file is:
    /etc/php4/apache2/

    After you've changed that php.ini file, you can restart apache with:

    /etc/init.d/apache2 restart
     
  6. torusturtle

    torusturtle ISPConfig Developer ISPConfig Developer

    phpinfo() function says that the php.ini file is in /etc.
    I find it very odd. I even restarted the whole server but didn't help either.

    Could it be that there is another file with different settings?
     
  7. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    If you allow Options to be set in your .htaccess files, you can also set this parameter in .htaccess.

    Mind that the default ISPConfig setup disabled the possibility to modify Options in .htaccess, but I know some people have modified apache2.conf to allow for this.
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Please check if there's an .htaccess file in the document root of the web site that sets the PHP memory limit.
     
  9. torusturtle

    torusturtle ISPConfig Developer ISPConfig Developer

    No there is not.

    En contraire if I set
    Code:
    php_value memory_limit = 64M
    in .htaccess I get an error 500.
     
  10. Hans

    Hans Moderator ISPConfig Developer

    As Falko and Martinfst are suggessting:

    Please check if there is an .htaccessfile within your var/www/web18/web/.
    To avoid the internal error no. 500, you should remove that .htacces file with the command rm .htaccess
     
  11. torusturtle

    torusturtle ISPConfig Developer ISPConfig Developer

    Hi Hans

    There is a .htaccess file that I need for rewriting rules. It works perfectly as long as I don't add the php_value argument.
     
  12. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    If you want to set php_ variables, you either have to do that in the ISPConfig panel (Custom Apache directives) or allow "Options". The latter requires editing /etc/apache2/apache2.conf and lowers the security level a bit.
     
  13. falko

    falko Super Moderator ISPConfig Developer

    What's in the .htaccess file?
     
  14. torusturtle

    torusturtle ISPConfig Developer ISPConfig Developer

    .htaccess (without #comments):

    Code:
    RewriteEngine On
    
    ^/TYPO3root/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/ - [L]
    RewriteRule ^(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/ - [L]
    
    RewriteRule ^typo3$ typo3/index_re.php [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    
    
    RewriteRule .* index.php [L]
    
     
  15. torusturtle

    torusturtle ISPConfig Developer ISPConfig Developer

    Thanks for the hint. Unfortunately it didn't help.
     
    Last edited: Mar 5, 2007
  16. falko

    falko Super Moderator ISPConfig Developer

    The beginning of that line is missing...
     
  17. torusturtle

    torusturtle ISPConfig Developer ISPConfig Developer

    Yes, but I copied that line mistakenly. It is commented with # in .htaccess
     
  18. falko

    falko Super Moderator ISPConfig Developer

    What you can do to find out where memory_limit is set is this:
    Code:
    cd /
    grep -R "memory_limit" *
     

Share This Page