Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-12-31 16:43:39

allfive
Member
From: Boston, MA
Registered: 2008-06-08
Posts: 10
Website

Errors in index.php after moving hosts

Hi. Textpattern 4.4.1 site.

Moved textpattern tree and db as instructed in documentation from one server to another within same hosting company (ICDsoft). (Was confused in documentation what moving “default.php” meant.)

Configured as requested. Except these lines not included in config.php, but exist in documentation:

$txpcfg[‘txpath’] = ‘/home/.some_name/site_username/yourname.com/textpattern’;
$txpcfg[‘doc_root’] = ‘/home/.some_name/site_username/yourname.com/’;

Going to the new site URL I get:

(The errors look like this, posting 4 out of 7 errors):
Warning: include(/home/artsouthend/www/text/textpattern/lib/constants.php) [function.include]: failed to open stream: No such file or directory in /home/artsouthend/www/text/index.php on line 36

Warning: include() [function.include]: Failed opening ‘/home/artsouthend/www/text/textpattern/lib/constants.php’ for inclusion (include_path=’.:/usr/local/php53/lib/php’) in /home/artsouthend/www/text/index.php on line 36

Warning: include(/home/artsouthend/www/text/textpattern/lib/txplib_misc.php) [function.include]: failed to open stream: No such file or directory in /home/artsouthend/www/text/index.php on line 37

(three more, then the following)

Fatal error: Call to undefined function textpattern() in /home/artsouthend/www/text/index.php on line 45

There are no files like contants.php or txplib_misc.php in the original installation nor in the new one.

From the errors, can you tell what is going on?

thanks.

Last edited by allfive (2011-12-31 16:49:09)

Offline

#2 2011-12-31 18:16:28

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

Re: Errors in index.php after moving hosts

Hi Don

Can you log in?

If so can you post your diagnostics?


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 2011-12-31 20:11:38

allfive
Member
From: Boston, MA
Registered: 2008-06-08
Posts: 10
Website

Re: Errors in index.php after moving hosts

I can’t log in. I get no log in screen, just more errors (15) looking like:
Warning: include_once(/home/artsouthend/www/text/textpattern/lib/constants.php) [function.include-once]: failed to open stream: No such file or directory in /home/artsouthend/www/text/textpattern/index.php on line 42

Warning: include_once() [function.include]: Failed opening ‘/home/artsouthend/www/text/textpattern/lib/constants.php’ for inclusion (include_path=’.:/usr/local/php53/lib/php’) in /home/artsouthend/www/text/textpattern/index.php on line 42

And the final one, a fatal error:
Fatal error: Call to undefined function getmicrotime() in /home/artsouthend/www/text/textpattern/index.php on line 50

Thank you, colak.

Offline

#4 2012-01-01 01:16:31

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

Re: Errors in index.php after moving hosts

Hi

Can you post your config.php file? (without including password of course)

Offline

#5 2012-01-01 10:51:29

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Errors in index.php after moving hosts

allfive wrote:

as instructed in documentation

The wiki page (which you are likely referring to) isn’t exactly up-to-date and the information given can be a bit misleading.

Configured as requested. Except these lines not included in config.php, but exist in documentation:

Please refer to the config.php generated by Textpattern v4.4.1 and to config-dist.php for the correct format.

The mentioned $txpcfg['doc_root'] haven’t been used in ages, and $txpcfg['txpath'] is only used for backwards compatibility. Neither are used by Textpattern itself.

There are no files like contants.php or txplib_misc.php […] From the errors, can you tell what is going on?

Textpattern does have and need those files (i.e. /textpattern/lib/txplib_misc.php). If the files do not exists, something has gone badly wrong. Try by downloading and using stock Textpattern installation files.

Offline

#6 2012-01-01 18:58:52

allfive
Member
From: Boston, MA
Registered: 2008-06-08
Posts: 10
Website

Re: Errors in index.php after moving hosts

Dragondz:
>Can you post your config.php file?

<?php
$txpcfg['db'] = 'artsouthend_textpattern';
$txpcfg['user'] = 'xxxxx';
$txpcfg['pass'] = 'xxxxx';
$txpcfg['host'] = 'localhost';
$txpcfg['table_prefix'] = '';
$txpcfg['txpath'] = '/home/artsouthend/www/text/textpattern';
$txpcfg['dbcharset'] = 'utf8';
?>​

Gocom:
>Textpattern does have and need those files (i.e. /textpattern/lib/txplib_misc.php).

Thanks for that. Perhaps it was an incomplete FTP transfer. (Scratching head.)

>If the files do not exists, something has gone badly wrong. Try by downloading and using stock Textpattern installation files.

OK. After I do that, how do I add the content/images from the original site? Is there an import function or do I just move the appropriate folders?

Thanks much.

Offline

#7 2012-01-01 20:56:06

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Errors in index.php after moving hosts

allfive wrote:

OK. After I do that, how do I add the content/images from the original site? Is there an import function or do I just move the appropriate folders?

Content is stored in the database. Replacing the installation files replaces just the installation files, nothing else.

You can pretty safely replace index.php, css.php and textpattern/ directory with the stock files. Then just place your own existing config.php to textpattern directory, and that’s it. As far as your own content files (images, downloads, admin-side themes) go, just do not overwrite those and they won’t be affected, as all content is kept in the database, which I assume you have already moved (exported and imported, as outlined in the wiki page) from the old server to the new one.

Last edited by Gocom (2012-01-01 21:00:23)

Offline

#8 2012-01-03 03:56:43

allfive
Member
From: Boston, MA
Registered: 2008-06-08
Posts: 10
Website

Re: Errors in index.php after moving hosts

Gocom:
>Content is stored in the database. Replacing the installation files replaces just the installation files, nothing else.

Thanks much for this advice, Gocom, and for your further advice. It is good to have this info for future use.

The problem was an incomplete ftp transfer. When I did a server to server migration, everything worked well.

Thanks, too, Dragondz.

don

Offline

Board footer

Powered by FluxBB