Page 1 of 1

where can I change php mem limit

Posted: Thu Oct 08, 2015 9:18 pm
by nomadmike
What file can I edit to increase php memory I have looked in the php.ini file which shows 128mb but my site says only 34mb is available how can I change this

thanks

Re: where can I change php mem limit

Posted: Thu Oct 08, 2015 11:09 pm
by SCelik
/home/***USER***/conf/web/httpd.conf

Re: where can I change php mem limit

Posted: Fri Oct 09, 2015 1:41 pm
by nomadmike
Hi thanks for the reply I should have mentioned I am running ubuntu I do not have the httpd.conf I have looked at the apache2.conf and there is no setting for memory limit

these are all the files in the folder

apache2.conf snginx.conf ssl.*****.pem
nginx.conf ssl.*******.crt webalizer.******.conf
sapache2.conf ssl.******.key

Re: where can I change php mem limit

Posted: Fri Oct 09, 2015 2:29 pm
by tjebbeke
Yes apache2.conf on ubuntu is the same as httpd.conf on centos.

I think you need to add this setting in the config file.

Re: where can I change php mem limit

Posted: Fri Oct 09, 2015 7:38 pm
by SCelik
I have CentOS and my config files look like this:
<Directory /home/***USER***/web/***DOMAIN***/public_html>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value upload_tmp_dir /home/***USER***/tmp
php_admin_value upload_max_filesize 10M
php_admin_value max_execution_time 20
php_admin_value post_max_size 8M
php_admin_value memory_limit 32M
php_admin_flag mysql.allow_persistent off
php_admin_flag safe_mode off
php_admin_value session.save_path /home/***USER***/tmp
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f info@***DOMAIN***'
</Directory>

Re: where can I change php mem limit

Posted: Sun Oct 11, 2015 1:44 am
by magzen
i added the following to my httpd file

Code: Select all

  AllowOverride All
        Options +Includes -Indexes +ExecCGI
		php_admin_value upload_tmp_dir /home/admin/tmp
		php_admin_value upload_max_filesize 999M
		php_admin_value max_execution_time 80
		php_admin_value post_max_size 999M
		php_admin_value memory_limit 2048M
		php_admin_flag mysql.allow_persistent off
		php_admin_flag safe_mode off
		php_admin_value session.save_path /home/admin/tmp
		php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f [email protected]'
        Action phpcgi-script /cgi-bin/php
        <Files *.php>
            SetHandler phpcgi-script
        </Files>

but it still shows 128mb in phpinfo and i get exhausted memory issues.