Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-16-2012, 07:41 AM   PM User | #1
jcjanssen
New to the CF scene

 
Join Date: Jul 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
jcjanssen is an unknown quantity at this point
Exclamation 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! :)
jcjanssen is offline   Reply With Quote
Old 07-16-2012, 07:52 AM   PM User | #2
stevenmw
Regular Coder

 
stevenmw's Avatar
 
Join Date: Jun 2007
Location: OK
Posts: 449
Thanks: 26
Thanked 30 Times in 30 Posts
stevenmw is an unknown quantity at this point
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.
stevenmw is offline   Reply With Quote
Old 07-16-2012, 03:20 PM   PM User | #3
phpdude
New Coder

 
Join Date: May 2012
Posts: 17
Thanks: 0
Thanked 3 Times in 3 Posts
phpdude is an unknown quantity at this point
You have dirname repeated twice in that string
phpdude is offline   Reply With Quote
Old 07-16-2012, 03:51 PM   PM User | #4
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,604
Thanks: 2
Thanked 399 Times in 392 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
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'); 
Inigoesdr is offline   Reply With Quote
Old 07-17-2012, 03:14 PM   PM User | #5
keyfuly
New to the CF scene

 
Join Date: Jul 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
keyfuly is an unknown quantity at this point
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.
keyfuly is offline   Reply With Quote
Old 07-17-2012, 03:21 PM   PM User | #6
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,056
Thanks: 8
Thanked 1,032 Times in 1,023 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
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.
mlseim is offline   Reply With Quote
Old 07-17-2012, 03:32 PM   PM User | #7
Keleth
Senior Coder

 
Join Date: Jun 2008
Location: New Jersey
Posts: 2,354
Thanks: 45
Thanked 247 Times in 244 Posts
Keleth is on a distinguished road
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.
Keleth is offline   Reply With Quote
Reply

Bookmarks

Tags
error, syntax, t_string, wordpress

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:46 AM.


Advertisement
Log in to turn off these ads.