mrTom Posted February 17, 2009 Share Posted February 17, 2009 PHP settings (modify via your PHP admin software):Allowed to open external URLsChứ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ếpXin 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 Link to comment Share on other sites More sharing options...
haylam.vn Posted February 17, 2009 Share Posted February 17, 2009 Thiết lập này do hosting server đã tắt "Allow_url_fopen" (DreamHost) bằng cách1. 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?) Link to comment Share on other sites More sharing options...
haylam.vn Posted February 17, 2009 Share Posted February 17, 2009 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 Unix1. Tạo thư mục cgi-bin trong thư mục root.mkdir $HOME/example.com/cgi-bin2. Copy file php.ini mặc định của host servercp /etc/php5/php.ini $HOME/example.com/cgi-bin/php.iniSau đó thay đổi cấu hình của file này.3. Tạo script wrappercat << 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/shexec /dh/cgi-system/php5.cgi $*4. Set permissionschmod 755 $HOME/example.com/cgi-binchmod 755 $HOME/example.com/cgi-bin/php-wrapper.cgichmod 640 $HOME/example.com/cgi-bin/php.ini5. Set up the .htaccess fileThe .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-binResult: #!/bin/sh export PHPRC=/home/yourusername/example.com/cgi-bin exec /dh/cgi-system/php5.cgi $* Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now