search
HomeCMS TutorialDEDECMSWhat should I do if DEDECMS5.5 cannot collect data under a foreign Linux host?

What should I do if DEDECMS5.5 cannot collect data under a foreign Linux host?

What should I do if DEDECMS5.5 cannot collect data on a foreign Linux host?

I have been playing with dedecms again recently to see how powerful the function of dedecms5.5 is. So I uploaded it to my Dreamhost host and started running it with a temporary domain name. After playing with it, I found that I couldn't collect it, and even the remote pictures and resources for downloading articles published by DEDE couldn't be used. Weird.

Recommended study: 梦Weavercms

Then I remembered that I had seen an article before saying that Dreamhost’s host disabled allow_url_fopen, resulting in the inability to collect. So I searched and searched on the Internet and found several articles in which I compiled PHP myself to allow Dreamhost to support collection. So I followed the introduction on the official website of Dreamhost, and through SSH, I finally finished compiling my own php after struggling for a long time. I happily ran to the system to collect it, but it still failed. Upload a probe and see that allow_url_fopen is indeed enabled, which is strange. I continued to Google, and repeated tests later proved that Dreamhost actually enabled allow_url_fopen by default. The articles introduced on the Internet were basically articles from 2008 or before, so Dreamhost must have figured out how to release this restriction.

After struggling for two days, I didn’t believe it. I uploaded multiple Supesite and php168, and the installation and collection were completed in one go. You darling, it turns out that dede couldn't collect it himself. Wondered. After searching the dede official website, I also found that some netizens also reported that they could not collect data on foreign Linux hosts. Ever since, I finally found a solution, which is just to change a file. I forgot where I read the article where I originally found the solution. It's just a modified file on this machine. I would like to thank that guy.

The problematic file is in the include/dedehttpdown.class.php file. After covering it with the attachment provided in this article, you can use the collection function smoothly and use "Download" when publishing articles. Remote pictures and resources" function. After comparing this file, it was found that two places had been modified.

1. Comment out the code on line 280, as follows:

The code is as follows:

// fputs($this->m_fp, $headString);

2. Find the code on line 304, and replace it with the following code:

The code is as follows:

$headString .= "Connection: Close\r\n\r\n"; 
//fputs($this->m_fp,"Connection: Close\r\n\r\n");

3. Find the code on line 308 and replace it with the following code:

The code is as follows:

$headString .= "\r\n"; 
//fputs($this->m_fp,"\r\n");

4. The code on line 315" //Get response header status information" insert the following code above:

The code is as follows:

fputs($this->m_fp, $headString);

The above is the detailed content of What should I do if DEDECMS5.5 cannot collect data under a foreign Linux host?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.