开发者

How to set memory_limit php 5.3 on Dreamhost

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
开发者_C百科

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


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜