The use of dedecms under PHP7, Weaving dream dedecsm a blank solution in the background

Source: Internet
Author: User
Tags php error php form

A few days ago,
An old customer,
Recently upgraded the server,
PHP to PHP7,
After transferring the dream dedecms to the new server,
Cannot log in to the background,
Let me have a look.

I looked at their website,
Using a dream v57_utf8_sp1.
The front page is accessible,
is because their dedecms generated an HTML static page.

But input dream backstage login URL,
There is a blank,
There's nothing.

Dream Weaving Dedecms Backstage

The main reason is that DEDECMS was developed many years ago,
Are the characteristics of the basic php4,5 era,
Now the PHP7 compared to the previous version,
Performance has improved a lot,
But a lot of code has been modified,
Lead to incompatible parts of the previous PHP code.

bash here,
Understand the 3 aspects to be considered in the upgrade installation PHP7

Let's talk about how to solve this upgrade PHP7 a series of problems.

directories and files for the following operations,
It's all relative to you. Install Dedecms directory One, open error message

A blank is not able to debug,
So the first thing to do,
Can output error messages.

Open include/common.inc.php
Find the following code
Error_reporting (E_all);
Error_reporting (E_all | | ~e_notice);

To
Error_reporting (E_all);
Error_reporting (E_all | | ~e_notice);
The main function is to turn on error prompts.

PHP Error Tips

Then refresh the background,
There will be a false hint.

After solving the problem of dream background blank,
You can change it again.

bash here,

Watch "PHP order design, PHP form write database" video Tutorials Two, ' continue ' not in the ' Loop ' or ' switch ' context error

You may encounter this error after refreshing

Fatal error: ' Continue ' not in ' loop ' or ' switch ' context in ... include/common.func.php on line 49

The above indicates that there are errors in the 49 lines of the include/common.func.php file,
The Continue; Delete
Change to return;
Can

Dream Latest Version Helper_function code

The latest version of the Dream DEDECMS-V5.7-UTF8-SP2 has changed the error over. Third, function mysql_query () not defined

Mysql_* series functions can no longer be used in PHP7,
The following error will appear
Fatal error:uncaught error:call to undefined function mysql_query () in ... include/dedesql.class.php:152

In the PHP7, you need to use the Mysqli or PDO method,
Communicating with the database,
More secure and more efficient.

Way to solve
Open File data/config.cache.inc.php
$cfg _mysql_type = ' MySQL ';
To
$cfg _mysql_type = ' mysqli ';

The latest version of the Dream DEDECMS-V5.7-UTF8-SP2 is also set.

Dream Latest Version Mysql_type type

Through the three steps above,
The old dedecms can be used on PHP7,
You can log in properly backstage. Iv. upgrade to the latest DEDECMS-V5.7-UTF8-SP2

Look at this version of the Dream source code,
should be supported by PHP7,
You can also upgrade your dream to the latest version,

3 Steps ahead can be omitted.

Updated January 27, 2018

May be the cause of the Customer system environment,

Upgrade to DEDECMS-V5.7-UTF8-SP2,

When you edit and publish an article,

It's a lot of problems,

Friends who use the dedecms dream system,

You must be careful to upgrade PHP to 7.

bash here,

Watch "PHP order design, PHP form write database" video tutorials

http://edu.csdn.net/course/play/2456/39865


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.