CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   WordPress PHP Issue (http://www.codingforums.com/showthread.php?t=267967)

jcjanssen 07-16-2012 07:41 AM

WordPress PHP Issue
 
I have recently moved my WordPress installation over to a different server. I can no longer access my site.

My new host gives an error message when accessing my site:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/iwhblog1/public_html/admin.php on line 30

The code for admin.php is:

PHP Code:

<?php
/**
 * WordPress Administration Bootstrap
 *
 * @package WordPress
 * @subpackage Administration
 */

/**
 * In WordPress Administration Screens
 *
 * @since 2.3.2
 */
if ( ! defined('WP_ADMIN') )
    
define('WP_ADMIN'TRUE);

if ( ! 
defined('WP_NETWORK_ADMIN') )
    
define('WP_NETWORK_ADMIN'FALSE);

if ( ! 
defined('WP_USER_ADMIN') )
    
define('WP_USER_ADMIN'FALSE);

if ( ! 
WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) {
    
define('WP_BLOG_ADMIN'TRUE);
}

if ( isset(
$_GET['import']) && !defined('WP_LOAD_IMPORTERS') )
    
define('WP_LOAD_IMPORTERS'true);

require_once(
dirname(dirname(__FILE__)) '/home/iwhblog1/wp-load.php' include_path='/usr/local/php53/pear';

if ( 
get_option('db_upgraded') ) {
    
$wp_rewrite->flush_rules();
    
update_option'db_upgraded',  false );

Line 30 is:
PHP Code:

require_once(dirname(dirname(__FILE__)) '/home/iwhblog1/wp-load.php' include_path='/usr/local/php53/pear'



I am new to PHP although I now HTML as WordPress a lot. I cannot access any of my WP site, but I can access the files for it.

Any help would be greatly appreciated! :)

stevenmw 07-16-2012 07:52 AM

Check you config file to make sure all the DB connection info is correct. Make sure any settings that you established on the old server are changed to match the new server.

Do you have info / content you don't want to lose? I'd just reinstall WP.

phpdude 07-16-2012 03:20 PM

You have dirname repeated twice in that string

Inigoesdr 07-16-2012 03:51 PM

Looks like you have manually edited the core of Wordpress, which is generally a bad idea because it prevents your ability to update easily. That admin.php file should be under /wp-admin/ and that line should look like this:
PHP Code:

require_once(dirname(dirname(__FILE__)) . '/wp-load.php'); 


keyfuly 07-17-2012 03:14 PM

Do you have info / content you don't want to lose? I'd just reinstall WP.
Make sure any settings that you established on the old server are changed to match the new server.Check you config file to make sure all the DB connection info is correct click here for more info.

mlseim 07-17-2012 03:21 PM

I would save your theme directory in a safe place and
totally re-install WordPress from square one.

If your blog database is important, you can save that also.

The only place where you should edit or customize is
your theme directory ... no other places.

Also make sure .htaccess has been created correctly.

Keleth 07-17-2012 03:32 PM

Well, I'd say you can edit/customize your core with the complete understanding that it will screw up on upgrades/moves and that you must know 100% what you're doing and how to replicate it in the future.

That being said, I've never come across a situation where it was worth the hassle.


All times are GMT +1. The time now is 06:59 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.