Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-04-06 08:14:36

tedweitz
Member
Registered: 2015-03-08
Posts: 19

crashed moving to a new host - Dreamhost

Hi

I moved my site to Dreamhost and it crashed my site.

I try to get into Textpattern to edit the config file but get these fatal errors:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; DB has a deprecated constructor in /home/tedweitz/tedweitz.com/textpattern/lib/txplib_db.php on line 23

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/tedweitz/tedweitz.com/textpattern/lib/txplib_db.php:34 Stack trace: #0 /home/tedweitz/tedweitz.com/textpattern/lib/txplib_db.php(50): DB->DB() #1 /home/tedweitz/tedweitz.com/textpattern/index.php(88): include(‘/home/tedweitz/…’) #2 {main} thrown in /home/tedweitz/tedweitz.com/textpattern/lib/txplib_db.php on line 34

I don’t know where to even start, it has been a while since I did any webbing

I will truly appreciate some help

Thanks so much!!!!!

Offline

#2 2018-04-06 08:32:15

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: crashed moving to a new host - Dreamhost

tedweitz wrote #310681:

Hi

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; DB has a deprecated constructor in /home/tedweitz/tedweitz.com/textpattern/lib/txplib_db.php on line 23

That looks like you are using an older textpattern on a newer php. Do you know what txp version you are using and what php version Dreamhost has?

If this is the case you may just need to update your txp files with v4.6.2 or txp4.7beta2


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2018-04-06 09:11:03

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Re: crashed moving to a new host - Dreamhost

The oldest version of PHP available at Dreamhost is 5.6 while the default is 7.0

You may try to downgrade the PHP version from the Dreamhost control panel, see if your site works better, and then upgrade to TXP 4.6.2. Double check everything again, then go back to the Dreamhost control panel to upgrade PHP to v7.0. TXP 4.6.2 runs fine on both.

But keep a back-up of your database…


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#4 2018-04-06 09:15:10

tedweitz
Member
Registered: 2015-03-08
Posts: 19

Re: crashed moving to a new host - Dreamhost

Hi

Thanks so much for that amazingly quick response.

I was able to adit my config.php and now i get only the fatal error

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/tedweitz/tedweitz.com/textpattern/lib/txplib_db.php:34 Stack trace: #0 /home/tedweitz/tedweitz.com/textpattern/lib/txplib_db.php(50): DB->DB() #1 /home/tedweitz/tedweitz.com/textpattern/index.php(88): include(‘/home/tedweitz/…’) #2 {main} thrown in /home/tedweitz/tedweitz.com/textpattern/lib/txplib_db.php on line 34

I think the error has to do with the path: /home/tedweitz/tedweitz.com/textpattern

Probably the path now should be: /home/tedweitz.com/textpattern or /tedweitz.com/textpattern

That must be defined as textpattern home somewhere but where?

Thanks so much!!!!!!!

Offline

#5 2018-04-06 09:22:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: crashed moving to a new host - Dreamhost

The error is because Textpattern 4.5.x does not work on PHP 7 or higher. After backing up your Textpattern file system and database, you have two choices as phiw13 mentioned:

  1. Upgrade Textpattern to 4.6.2 or higher.
  2. Downgrade PHP to something in the PHP 5.x range that Txp 4.5.x supports.

Either will work just fine. I would recommend the first option unless you are a heavy user of plugins that might not have been migrated to 4.6.2. But phiw13’s suggestion of downgrading first is excellent, as it’ll give you fewer headaches out of the gate.

Last edited by Bloke (2018-04-06 09:24:19)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2018-04-06 09:46:52

tedweitz
Member
Registered: 2015-03-08
Posts: 19

Re: crashed moving to a new host - Dreamhost

Thanks so much for the help!!!

Moving the PHP version to 5 from 7 brought back the deprecated but did not change the fatal error in calling the DB

I am back to PHP 7

Where do i change the definition of the Textpattern home or is it the location of the DB?

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/tedweitz/tedweitz.com/textpattern/lib/txplib_db.php:34 Stack trace: #0 /home/tedweitz/tedweitz.com/textpattern/lib/txplib_db.php(50): DB->DB() #1 /home/tedweitz/tedweitz.com/textpattern/index.php(88): include(‘/home/tedweitz/…’) #2 {main} thrown in /home/tedweitz/tedweitz.com/textpattern/lib/txplib_db.php on line 34

Thanks so much!!!!

Offline

#7 2018-04-06 10:14:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: crashed moving to a new host - Dreamhost

Odd. Which version of PHP 5 did you downgrade to? They all support mysql_* calls as far as I recall, and that’s what the message is complaining about. You can ignore the ‘constructor’ warning for now, it’ll work fine even with that issue.

I don’t think it has anything to do with paths, but you alter all such information in config.php so you need to verify that your txpath is correct according to where Dreamhost store your site files, and that your database access credentials are accurate.

You will not be able to run Textpattern v4.5.x on PHP 7. You will always get the above fatal errors because those functions have been removed from the PHP codebase.

Last edited by Bloke (2018-04-06 10:15:11)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB