raksmart活动促销

分享

写回答

发帖

Lunarpages针对Session save path Unwriteable 技术回文,请协助翻译

英文翻译专版 英文翻译专版 3821 人阅读 | 2 人回复

发表于 2008-1-4 20:07:14 | 显示全部楼层 |阅读模式

先感谢各位网友的协助

Hello,

You may edit the settings for session.save_path via your php.ini file.

Because we use suPHP to parse php files, you have the option of using a custom php.ini file.

Your account can have multiple php.ini files on your account in different folders so you can customize the php processing in different folders should your script require it. A php.ini file will not inherit down into subfolders, however, you can create a .htaccess file in the same folder as the php.ini file and place the following code into it:

suPHP_ConfigPath /home/username/public_html/

where "username" is your cPanel username. This will cause the php.ini file to affect all subfolders, unless a php.ini file is in a subfolder, at which point the php.ini in the subfolder takes precedence.

In php.ini, you will need to use the actual php.ini syntax instead of the php_value or php_flag syntax you would normally use in .htaccess (Which should not be used at all):

setting_name = setting_value

So, this means if you move the settings from .htaccess to php.ini, you must convert the format. Let's say you have the following line in your .htaccess file:

php_value register_globals 0

the corresponding php.ini format is as follows:

register_globals = Off

Notice how the value 0 becomes Off and 1 becomes On. Now if your php_value has quotes like the following, for example:

php_value include_path ".:/home/user/lib"

The corresponding php.ini format is:

include_path = ".:/home/user/lib"

and so on. You should only use the settings you need to change in your php.ini.

For the PHP settings you do not have in your php.ini file, PHP will use our default configurations.

--
Feel free to contact us if you have any questions or need additional assistance.

Best regards,
Flora Lui
support@lunarpages.com

Phone: 1-714-521-8150
Fax: 1-714-521-8195
24 hour Network Status Line: 1-562-697-8106
Website - http://lunarpages.com
Online Community - http://lunarforums.com
Online Tutorials - http://lunarpages.com/tutorials

回答|共 2 个

NSPY

发表于 2008-1-5 00:33:37 | 显示全部楼层

你好,

你可以通过编辑php.ini来设置session.save_path。

因为我们用suPHP来解析php文件,你可以自己定制php.ini文件。

你的账户在不同文件夹下有多个php.ini,所以可以根据脚本的需要来定制php处理方式。php.ini的设置不会继承到子文件夹,但是可以在php.ini所在文件夹下创建.htaccess文件,里面写入下面的内容:

suPHP_ConfigPath /home/username/public_html/

"username"是你cPanel的用户名。这样就可以使php.ini的设置对所有子文件夹有效,除非在一个php.ini优先级高的子文件夹。

在php.ini里,要用php.ini的语法写,而不要用.htaccess中用的语法。(根本不能用)

setting_name = setting_value

这样就意味着如果把设置从.htaccess转移到php.ini中,必须要转换格式。也就是说在.htaccess中是这样写的:

php_value register_globals 0

相应的php.ini中的格式是这样的:

register_globals = Off

注意,0代表关,1代表开。如果php_value的引用像下面这样,例如:

php_value include_path ".:/home/user/lib"

相应的php.ini格式是:

include_path = ".:/home/user/lib"

等等。你只需要在php.ini写你要修改的设置。

对于你的php.ini中没有的设置,PHP会用默认的设置。

主机FBI

发表于 2008-1-5 22:44:34 | 显示全部楼层

您需要登录后才可以回帖 登录 | 注册

本版积分规则