I'm currently using dreamhost to host my webiste. However an application i'm using requires a higher memory limit then the default for 90M. I'm relatively new to this and I've tried the following to try to modify the php.ini file but without any luck.
I've looked through the wiki on how to create a custom php.ini file for php 5.3, but I'm having issues setting the memory_limit.
I've followed the instructions on the following link: http://wiki.dreamhost.com/PHP.ini
Log into the panel at https://panel.dreamhost.com/index.cgi?tr...in.manage& and change your domain to use php5.3 (probably fast cgi)
Create a directory under your user called .php, with a subdirectory called 5.3. Files under this directory will be used by all domains under that user which are set to use PHP 5.3.
Example for the terminal
mkdir ~/.php
mkdir ~/.php/5.3
Once this directory exists, there are two files you can create in it:
To add custom directives to PHP, create a file under .php/5.3/ called "phprc" and add configuration directives to it. You do not need to copy the default php.ini to this file, as it is used in addition to the system php.ini; if a directive appears in both files, the one in this file will take precedence.
nano phprc
In my phprc file i've added the following lines:
zend_extension=/home/mikdur2/peachjar.com/ioncube/ioncube_loader_lin_5.3.so
ini_set('memory_limit', '128M');
The zend_extension gets picked up and verified in the phpinfo(), however, the memory_limit doesn't change to 128M. Is there another way to change the memory limit? Or is changing it in the phprc file not the correct approach. There was another post that stated that all the commands except init_set of the memory_limit worked.
Btw: here is the phpinfo() - http://peachjar.com/phpinfo.php
The default memory limit is 256M and this is usually more than sufficient for most needs. If you need to raise this limit, you must create a phprc file.
A typical appropriate memory limit for PHP running Drupal is 128MB per process; for sites with a lot of contributed modules or with high-memory pages, 256MB or even 512MB may be more appropriate. It's often the case that the admin section of a site, or a particular page, uses much more memory than other pages.
By default, a PHP script can allocate up to 128 megabytes of memory. To verify the current value of the memory_limit directive and other directives, you can use the phpinfo() function.
May be just write
memory_limit=128M
instead of ini_set
Full code for phprc:
[PHP]
zend_extension=/home/username/ioncube/ioncube_loader_lin_5.3.so
memory_limit=1280M
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With