Jump to content
Sign in to follow this  
mrTom

Xin trợ giúp khi cài đặt ??System and permissions !!

Recommended Posts

PHP settings (modify via your PHP admin software):
Allowed to open external URLs
Chức năng này khi cài đặt nó hiện thông báo đỏ,
nhưng ấn next thấy vẫn qua bước kế tiếp
Xin các Bro chỉ giúp,liệu có ảnh hưởng gì kô và tác ý nghĩa của dòng thông báo trên

Share this post


Link to post
Share on other sites

Thiết lập này do hosting server đã tắt "Allow_url_fopen" (DreamHost) bằng cách


1. cấu hình trong php.ini.

; Disable allow_url_fopen for security reasons
allow_url_fopen = 'off'



2. Cấu hình Apache httpd.conf:

# Disable allow_url_fopen for security reasons
php_flag  allow_url_fopen  off



Khi đó bạn sẽ không thể mở, include được các file remote

<?php include("http://mobile.kenh360.com/index.php"); ?>



Do đó sẽ không thực hiện được 1 số chức năng như cập nhật được tỉ giá tiền Update Conversion Rate,...

Giải pháp:
Sử dụng cURL thay thế

http://wiki.dreamhost.com/index.php/Allow_url_fopen



hoặc tham khảo bài viết sau

http://www.prestashop.com/forums/viewthread/512



1. We look for the file "/ install / xml / checkConfig.php" and rename it.
2. We download the file "checkConfig.php" (attached to this post) and we place it in the path "/install/xml/checkConfig.php"
3. Prove that all will go well (Test it to make sure it works?)

Share this post


Link to post
Share on other sites

Cách sau khá mạo hiểm nếu bạn chưa hiểu rõ việc mình đang làm.

http://wiki.dreamhost.com/PHP.ini



Cấu hình php.ini cho domain của bạn. Áp dụng cho server Unix

1. Tạo thư mục cgi-bin trong thư mục root.

mkdir $HOME/example.com/cgi-bin

2. Copy file php.ini mặc định của host server

cp /etc/php5/php.ini $HOME/example.com/cgi-bin/php.ini

Sau đó thay đổi cấu hình của file này.

3. Tạo script wrapper

cat << EOF > $HOME/example.com/cgi-bin/php-wrapper.cgi

#!/bin/sh
exec /dh/cgi-system/php5.cgi $*
EOF


Hoặc dùng trình text editor tạo file /home/yourusername/example.com/cgi-bin/php-wrapper.cgi:

#!/bin/sh
exec /dh/cgi-system/php5.cgi $*

4. Set permissions

chmod 755 $HOME/example.com/cgi-bin
chmod 755 $HOME/example.com/cgi-bin/php-wrapper.cgi
chmod 640 $HOME/example.com/cgi-bin/php.ini

5. Set up the .htaccess file

The .htaccess file is located in your document root at $HOME/example.com/.htaccess.

Add this to run .php files with your custom PHP wrapper:

Options +ExecCGI
AddHandler php5-cgi .php
Action php-cgi /cgi-bin/php-wrapper.cgi
Action php5-cgi /cgi-bin/php-wrapper.cgi


You can now modify $HOME/example.com/cgi-bin/php.ini to your heart's content!

Done everything and it still doesn't work?

If you've done everything but you just can't get PHP to load the custom php.ini file you may want to edit your php-wrapper.cgi (in $HOME/example.com/cgi-bin) as follows.

Add the following after the first line:

export PHPRC=/home/yourusername/example.com/cgi-bin

Result:

#!/bin/sh
export PHPRC=/home/yourusername/example.com/cgi-bin
exec /dh/cgi-system/php5.cgi $*

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More