Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-01-07 10:03:40

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

WebFaction users

Setting up on WF. Used the Txp referral. ;)

A few questions about setting up Txp on websites…

I can create the websites and domains in the dashboard fine. I got that much. But there’s a default website in root (user.webfaction.com). Do I have to replace that with a real domain/website, or can I just leave that alone and work with new ones only? (In order to assign additional SFTP users on those unique domains.)

Also, it appears I need to create a “custom app” to assign a Txp installation to a given website. Do I need to create a separate instance (each differently named) of a custom Txp app for each website? [This is where I’m at now, at the crossroads of what to do next.]

Finally, where do I actually install the separate instances of Txp? The file tree I see on the server via Transmit, for example, is not what I’m used to seeing. Simply this:

bin
lib
logs
webapps

Offline

#2 2016-01-07 10:28:06

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: WebFaction users

I generally use the main user account and only set up separate SSH/SFTP user logins and DB users as required if I wish to keep things separate or other people are to be given access to a particular directory.

If you haven’t already, begin by adding your domains via Domains/Websites > Domains. After adding you can make any special DNS configurations or handle email separately. If you’re hosting www and email with webfaction, you can leave the settings as they are. You use this for creating subdomains too.

I then simply “Add a new Application” of type Static/CGI/PHP-version under Domains/Websites > Applications and give it a name. The name you give it defines where it is in the web apps directory as it then installs to ~/webapps/your-app-name/.

I then “Add new website” under Domains/Websites > Websites, enter the relevant domains in the Domains field and choose the aforementioned app. That essentially points the domain name(s) to the app and directory.

If you want a separate database user, you can create one first under Databases > Database User (optional). Then create your database under Databases > Databases. After creating the database you can click on it again to edit the db-user permissions.

You can then go ahead an install txp as usual in ~/webapps/your-app-name/.

In my config.php, I have something like this:

$txpcfg['db'] = 'DB-NAME';
$txpcfg['user'] = 'DB-USER';
$txpcfg['pass'] = 'DB-PASS';
$txpcfg['host'] = 'localhost';
$txpcfg['table_prefix'] = '';
$txpcfg['txpath'] = '/home/MAIN-ACCOUNT-NAME/webapps/YOUR-APP-NAME/textpattern';
$txpcfg['dbcharset'] = 'utf8';

replacing the items in caps with your respective details.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2016-01-07 10:52:32

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: WebFaction users

Helpful. Thanks!

jakob wrote #297279:

I then simply “Add a new Application” of type Static/CGI/PHP-version under Domains/Websites > Applications and give it a name.

Ah. I was selecting “Custom” as a category, which changes the types your shown, so didn’t see that at first. So the field in order are:

  • Name = “whatever”
  • Category = Static
  • Type = Static/CGI/PHP-version

Would it be bad to choose php 7 at this point? Any 4.6 constraints?

The name you give it defines where it is in the web apps directory as it then installs to ~/webapps/your-app-name/. … You can then go ahead an install txp as usual in ~/webapps/your-app-name/.

I see. Thanks again.

Offline

#4 2016-01-07 12:22:49

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: WebFaction users

Yes its a bit confusing at first with Applications – they are websites really! As Julian said, they act as the repository for your website, in this case a Textpattern install. I think 4.6 is fine with PHP 7 but haven’t tried yet.

Offline

#5 2016-01-07 13:04:28

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: WebFaction users

jstubbs wrote #297281:

Yes its a bit confusing at first with Applications – they are websites really!

Exactly. In fact it makes perfect sense to me once I think of “web app” as “virtual server” ;)

I think 4.6 is fine with PHP 7 but haven’t tried yet.

Seemingly so, as I just remembered Ruud saying.

Offline

#6 2016-01-07 13:18:43

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: WebFaction users

I’ve not tried it on a live site but I tried php 7 with MAMP yesterday, and updated an existing site to txp 4.6 (current git repo) without any problems at all. The site wasn’t even very up to date and it worked without any problems. But I guess it will also depend on the plugins you use and if they use any methods of their own that may now be deprecated.


TXP Builders – finely-crafted code, design and txp

Offline

#7 2016-01-07 13:26:47

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: WebFaction users

jakob wrote #297284:

I guess it will also depend on the plugins you use and if they use any methods of their own that may now be deprecated.

Yep. That’s probably a fact.

I feel like were at this point right now where any kind of update is conditional of something else and so on and we can’t really update anything. I feel chained to the wall with the key an inch out of reach.

Offline

#8 2016-01-07 16:55:34

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: WebFaction users

Any way to test view a website on WF before nameservers transfer?

Offline

#9 2016-01-07 20:01:37

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: WebFaction users

Destry wrote #297285:

I feel like were at this point right now where any kind of update is conditional of something else and so on and we can’t really update anything. I feel chained to the wall with the key an inch out of reach.

It depends. A lot of normal plugins may work as usual, but some with special functions may not. I was quite lucky in that pretty much everything worked on my recent attempt. I have a site with smd_user_manager that I would like to update to 4.6 some time soon.

Destry wrote #297286:

Any way to test view a website on WF before nameservers transfer?

Try http://your-account-name.webfactional.com. If that doesn’t work out of the box, you might need to add that subdomain to your website in the control panel.


TXP Builders – finely-crafted code, design and txp

Offline

#10 2016-01-07 20:01:38

mistersugar
Member
From: North Carolina
Registered: 2004-04-13
Posts: 141
Website

Re: WebFaction users

Destry wrote #297286:

Any way to test view a website on WF before nameservers transfer?

I mention this in my post here. I set up a Txp site on a subdomain (chronicles.azuiker.webfactional.com, which reminds me I need to take that down now), then when I was ready for it to go live, reused the application for my live web app.

Last edited by mistersugar (2016-01-07 20:03:31)

Offline

#11 2016-01-07 20:43:34

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: WebFaction users

jakob wrote #297287:

Try http://your-account-name.webfactional.com. If that doesn’t work out of the box, you might need to add that subdomain to your website in the control panel.

A-ha! Ok.

Also, a little bird reminded me I could just add a temporary IP line in my local hosts file and that did the trick too:

ip domain.tld

Offline

#12 2016-01-07 21:00:37

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: WebFaction users

Here’s a big question…

I just realized, after setting the whole works up and seeing a big mass of errors on the test view front-side, that I had created the “webapp” using Static/CGI/PHP-7.0. That likely explains some of the errors due to the fact it’s a Txp 4.5.7 install (not 4.6). Sigh!

As far as I can tell, based on the dashboard functionality, the only way to fix that is to create a new webapp (having a different name, by necessity) and move the entire installation into the new webapp (subdomain) folder, correct the resulting paths in config.php, etc.

So does that mean when Txp 4.6 comes out, everyone on WebFaction is going to have to do this awkward song and dance to upgrade to php 7?

That’s weird.

For the record, here’s all the errors I got:

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/XXX/webapps/XXX/textpattern/lib/txplib_db.php on line 23

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/XXX/webapps/XXX/textpattern/lib/txplib_db.php:34 Stack trace: #0 /home/XXX/webapps/XXX/textpattern/lib/txplib_db.php(50): DB->DB() #1 /home/XXX/webapps/XXX/textpattern/publish.php(31): include_once('/home/XXX...') #2 /home/XXX/webapps/XXX/index.php(82): include('/home/XXX...') #3 {main} thrown in /home/XXX/webapps/XXX/textpattern/lib/txplib_db.php on line 34

(Sorry, I can never remember how to wrap code in here.)

Offline

Board footer

Powered by FluxBB