Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

why can't i transfer this theme over? WordPress

  • SOLVED

I'm trying to move a site off rackspace cloud sites and onto a gandi host. I initially just tried moving the theme over, but when i activated the theme, the whole thing broke (including wp-admin) giving me a 500 internal server error.

I figured that maybe a plugin was required that i hadn't transferred, so then I decided to transfer the whole site: i've downloaded the whole wordpress install and re-uploaded it, export / imported the mysql dbase, and all has gone fine except once again, the theme file is causing a 500 error. I know this because to clear the 500 error I just have to re-name the theme file and the site comes back up (and it the wp install works with any other theme, just not this one!

the original site where the theme file is causing no problems: www.techcityinsider.net

the new site where the 500 error is occurring: http://92.243.24.134

the theme is a hack of the original 'Seven Five' theme, if you need any of the theme files to look through let me know.

Thanks in advance

Dave

Answers (5)

2011-09-14

Fahad Murtaza answers:

One thing, turn wordpress debug mode on.

In wp-config.php change SCRIPT_DEBUG value to true

define('SCRIPT_DEBUG', true);

and then enable theme and see whats the issue.


Dave Smith comments:

done.


Fahad Murtaza comments:

can't see your theme, all I see is default theme. Have you activated it?


Dave Smith comments:

sorry, was just quickly trying something. have re-instated. have also just tried boosting php memory limit to 265M in .htaccess file


Fahad Murtaza comments:

3382 Parse error: syntax error, unexpected '{', expecting T_STRING in /srv/d_techcityinsid/www/www.siliconroundaboutinsider.com/htdocs/wp-content/themes/seven-five/widgets/feed.php on line 43 So please fix that page.


Fahad Murtaza comments:

Also, your cache needs to be recreated at new server. Please disable advanced caching and after removing cached files, enable advanced cache again.


Fahad Murtaza comments:

For that, just comment /htdocs/wp-settings.php on line 62


Dave Smith comments:

all done... but can anyone give me any guidance on how to fix the issue in feed.php? it's custom code produced by a developer who's not around to help out right now... a bit beyond my capabilities... here's the code:

<?php function widget_sf_feed($args) {
ob_start();
if($args) extract($args); ?>
<?php if (!get_option(THEME_PREFIX . "rss_order")){
add_option(THEME_PREFIX . "rss_order", 2);
update_option(THEME_PREFIX . "rss_order", 2);
}

$more_url = get_option(THEME_PREFIX . "feed_site");
if( isset($args["more_url"]) && !empty($args["more_url"]) )
{
$more_url = $args["more_url"];
}
$args["description"] = '';
if( isset($args["description"]) && !empty($args["description"]) )
{
$description = $args["description"];
}

// Get RSS Feed(s)
include_once(ABSPATH . WPINC . '/feed.php');

// Get a SimplePie feed object from the specified feed source.
//$feed_url = get_option(THEME_PREFIX . "feed_url");
//$rss = fetch_feed('' . $feed_url . '');

$abbr_array = array();
if ($args["feeds"])
{
$abbr_array = explode("+",$args["feeds"]);
}

$show_excerpt = 1;
if (isset($args["excerpt"])){
$show_excerpt = intval($args["excerpt"]);
}

$feeds_arr = array();

$feeds_logo_arr = array();
$feeds_title_arr = array();
for($i=1;$i<get_option(THEME_PREFIX . "rss_order");$i++)\
{
if (((sizeof($abbr_array)>0)&&in_array(get_option(THEME_PREFIX . "rss_abbr".$i),$abbr_array))||(!sizeof($abbr_array)))
{
array_push($feeds_arr, get_option(THEME_PREFIX . "rss_name".$i));
array_push($feeds_title_arr, get_option(THEME_PREFIX . "rss_title".$i));
array_push($feeds_logo_arr, get_option(THEME_PREFIX . "rss_logo".$i));
}
}

if( isset($args["columns"]) && ($args["columns"] >= 1) && (count($feeds_arr) > 0) )
{

$i = 0;
foreach($feeds_arr as $k=>$feed_url)
{
$rss = fetch_feed('' . $feed_url . '');
?>

<div id="rss-feed-columns" class="rss-feed-columns">
<div id="rss-feed-columns-header">
<h3><?=(empty($feeds_title_arr[$k])?'RSS':$feeds_title_arr[$k])?></h3>
<?
if (!empty($feeds_logo_arr[$k])) {
?>
<img src="<?php echo $feeds_logo_arr[$k] ?>" style="border:0; background:none; padding:0;" />
<?
} else {
?>
<img src="<?php bloginfo('template_url')?>/images/rss.png" style="border:0; padding:0;" />
<? }?>
</div>

<?php

// Figure out how many total items there are.
$rss_num = get_option(THEME_PREFIX . "rss_num");
if ($args["count"]) $rss_num = $args["count"];
if (!$rss->errors)
$maxitems = $rss->get_item_quantity($rss_num);

// Build an array of all the items, starting with element 0 (first element).
if (!$rss->errors)
$rss_items = $rss->get_items(0, $maxitems);
?>

<ul id="feed">
<?php if ($maxitems == 0) echo '<li>No items.</li>';
else
// Loop through each feed item and display each item as a hyperlink.
foreach ( $rss_items as $item ) : ?>
<li>
<h2<?=(!$show_excerpt ? ' class="excerpt"' : '')?>><a href="<?php echo $item->get_permalink(); ?>" title="<?=(!$show_excerpt ? strip_tags($item->get_description()) : 'Posted '.$item->get_date('j F Y | g:i a'))?>" target="_blank"><?php echo $item->get_title(); ?></a></h2>
<? if ($show_excerpt) {?>
<p><?php echo strip_tags($item->get_description()); ?></p>
<? }?>
</li>
<?php endforeach; ?>
</ul>
<div id="feed-last-item-columns"><!-- nothing to see here --></div>
<!--<a href="<?php echo $more_url?>" title="" target="_blank">View More</a>-->
</div> <!-- feed-feed -->

<?php
if( $i && ($i%3==2) ){
?>
<div style="clear:both; border-bottom:0px solid #CACACA;">&nbsp;</div>
<?php
}
$i++;
}

}
else
{
$rss = fetch_feed($feeds_arr);
?>

<div id="rss-feed" class="content-item">
<div class="content-dets">
<h3>Related on the web</h3>
<?
if (count($feeds_arr) == 1 && !empty($feeds_logo_arr[0])) {
?>
<img src="<?php echo $feeds_logo_arr[0] ?>" align="left" style="border:0; background:none; padding:0;" />
<?
} else {
?>
<? if (!empty($more_url)) {?>
<ul class="dets">
<li class="rss-link"><img src="<?php bloginfo('template_url')?>/images/rss.png" style="border:0; padding:0;" /> <a href="<?php echo $more_url?>" title="" class="rss-link" target="_blank">View More</a></li>
</ul>
<? } else {?>
<img src="<?php bloginfo('template_url')?>/images/rss.png" style="border:0; padding:0;" />
<? }?>
<? }?>


<? if (!empty($description)) {?>
<p><?=$description?></p>
<? }?>

<!--<ul class="dets">
<li class="rss-feed-link"><a href="<?php echo $more_url?>" title="<?php echo get_option(THEME_PREFIX . "feed_name"); ?>" target="_blank">View More</a></li>
</ul>-->
</div>

<div class="content-body feed-container">
<?php

// Figure out how many total items there are.
$rss_num = get_option(THEME_PREFIX . "rss_num");
if ($args["count"]) $rss_num = $args["count"];
if (!$rss->errors)
$maxitems = $rss->get_item_quantity($rss_num);

// Build an array of all the items, starting with element 0 (first element).
if (!$rss->errors)
$rss_items = $rss->get_items(0, $maxitems);
?>

<ul id="feed">
<?php if ($maxitems == 0) echo '<li>No items.</li>';
else
// Loop through each feed item and display each item as a hyperlink.
foreach ( $rss_items as $item ) : ?>
<li>
<h2<?=(!$show_excerpt ? ' class="excerpt"' : '')?>><a href="<?php echo $item->get_permalink(); ?>" title="<?=(!$show_excerpt ? strip_tags($item->get_description()) : 'Posted '.$item->get_date('j F Y | g:i a'))?>" target="_blank"><?php echo $item->get_title(); ?></a></h2>
<? if ($show_excerpt) {?>
<p><?php echo strip_tags($item->get_description()); ?></p>
<? }?>
</li>
<?php endforeach; ?>
</ul>

<div id="feed-last-item"><!-- nothing to see here --></div>
</div>
</div> <!-- feed-feed -->

<?php
}
?>

<?php if (!$args["widget_name"]){ ?>
<style>
#rss-feed {
padding-left: 0px;
width:660px !important;
border-bottom: none;
margin-top: 15px !important;
}
#rss-feed .content-dets h3 {
margin-top: 0px;
}
/*#rss-feed .content-body {
width:440px !important;
}*/
#rss-feed .content-dets {
width: 200px;
margin-left: 30px;
}

#rss-feed .content-body {
width:490px !important;
}

#rss-feed li {
width:490px !important;
}
</style>
<?php }?>

<?php
$result = ob_get_contents();
ob_end_clean();
return $result;
} register_sidebar_widget('Seven Five - Feed', 'widget_sf_feed');?>


Fahad Murtaza comments:

<?php function widget_sf_feed($args) {

ob_start();

if($args) extract($args); ?>

<?php if (!get_option(THEME_PREFIX . "rss_order")){

add_option(THEME_PREFIX . "rss_order", 2);

update_option(THEME_PREFIX . "rss_order", 2);

}



$more_url = get_option(THEME_PREFIX . "feed_site");

if( isset($args["more_url"]) && !empty($args["more_url"]) )

{

$more_url = $args["more_url"];

}

$args["description"] = '';

if( isset($args["description"]) && !empty($args["description"]) )

{

$description = $args["description"];

}



// Get RSS Feed(s)

include_once(ABSPATH . WPINC . '/feed.php');



// Get a SimplePie feed object from the specified feed source.

//$feed_url = get_option(THEME_PREFIX . "feed_url");

//$rss = fetch_feed('' . $feed_url . '');



$abbr_array = array();

if ($args["feeds"])

{

$abbr_array = explode("+",$args["feeds"]);

}



$show_excerpt = 1;

if (isset($args["excerpt"])){

$show_excerpt = intval($args["excerpt"]);

}



$feeds_arr = array();



$feeds_logo_arr = array();

$feeds_title_arr = array();

for($i=1;$i<get_option(THEME_PREFIX . "rss_order");$i++)

{

if (((sizeof($abbr_array)>0)&&in_array(get_option(THEME_PREFIX . "rss_abbr".$i),$abbr_array))||(!sizeof($abbr_array)))

{

array_push($feeds_arr, get_option(THEME_PREFIX . "rss_name".$i));

array_push($feeds_title_arr, get_option(THEME_PREFIX . "rss_title".$i));

array_push($feeds_logo_arr, get_option(THEME_PREFIX . "rss_logo".$i));

}

}



if( isset($args["columns"]) && ($args["columns"] >= 1) && (count($feeds_arr) > 0) )

{



$i = 0;

foreach($feeds_arr as $k=>$feed_url)

{

$rss = fetch_feed('' . $feed_url . '');

?>



<div id="rss-feed-columns" class="rss-feed-columns">

<div id="rss-feed-columns-header">

<h3><?=(empty($feeds_title_arr[$k])?'RSS':$feeds_title_arr[$k])?></h3>

<?

if (!empty($feeds_logo_arr[$k])) {

?>

<img src="<?php echo $feeds_logo_arr[$k] ?>" style="border:0; background:none; padding:0;" />

<?

} else {

?>

<img src="<?php bloginfo('template_url')?>/images/rss.png" style="border:0; padding:0;" />

<? }?>

</div>



<?php



// Figure out how many total items there are.

$rss_num = get_option(THEME_PREFIX . "rss_num");

if ($args["count"]) $rss_num = $args["count"];

if (!$rss->errors)

$maxitems = $rss->get_item_quantity($rss_num);



// Build an array of all the items, starting with element 0 (first element).

if (!$rss->errors)

$rss_items = $rss->get_items(0, $maxitems);

?>



<ul id="feed">

<?php if ($maxitems == 0) echo '<li>No items.</li>';

else

// Loop through each feed item and display each item as a hyperlink.

foreach ( $rss_items as $item ) : ?>

<li>

<h2<?=(!$show_excerpt ? ' class="excerpt"' : '')?>><a href="<?php echo $item->get_permalink(); ?>" title="<?=(!$show_excerpt ? strip_tags($item->get_description()) : 'Posted '.$item->get_date('j F Y | g:i a'))?>" target="_blank"><?php echo $item->get_title(); ?></a></h2>

<? if ($show_excerpt) {?>

<p><?php echo strip_tags($item->get_description()); ?></p>

<? }?>

</li>

<?php endforeach; ?>

</ul>

<div id="feed-last-item-columns"><!-- nothing to see here --></div>

<!--<a href="<?php echo $more_url?>" title="" target="_blank">View More</a>-->

</div> <!-- feed-feed -->



<?php

if( $i && ($i%3==2) ){

?>

<div style="clear:both; border-bottom:0px solid #CACACA;">&nbsp;</div>

<?php

}

$i++;

}



}

else

{

$rss = fetch_feed($feeds_arr);

?>



<div id="rss-feed" class="content-item">

<div class="content-dets">

<h3>Related on the web</h3>

<?

if (count($feeds_arr) == 1 && !empty($feeds_logo_arr[0])) {

?>

<img src="<?php echo $feeds_logo_arr[0] ?>" align="left" style="border:0; background:none; padding:0;" />

<?

} else {

?>

<? if (!empty($more_url)) {?>

<ul class="dets">

<li class="rss-link"><img src="<?php bloginfo('template_url')?>/images/rss.png" style="border:0; padding:0;" /> <a href="<?php echo $more_url?>" title="" class="rss-link" target="_blank">View More</a></li>

</ul>

<? } else {?>

<img src="<?php bloginfo('template_url')?>/images/rss.png" style="border:0; padding:0;" />

<? }?>

<? }?>





<? if (!empty($description)) {?>

<p><?=$description?></p>

<? }?>



<!--<ul class="dets">

<li class="rss-feed-link"><a href="<?php echo $more_url?>" title="<?php echo get_option(THEME_PREFIX . "feed_name"); ?>" target="_blank">View More</a></li>

</ul>-->

</div>



<div class="content-body feed-container">

<?php



// Figure out how many total items there are.

$rss_num = get_option(THEME_PREFIX . "rss_num");

if ($args["count"]) $rss_num = $args["count"];

if (!$rss->errors)

$maxitems = $rss->get_item_quantity($rss_num);



// Build an array of all the items, starting with element 0 (first element).

if (!$rss->errors)

$rss_items = $rss->get_items(0, $maxitems);

?>



<ul id="feed">

<?php if ($maxitems == 0) echo '<li>No items.</li>';

else

// Loop through each feed item and display each item as a hyperlink.

foreach ( $rss_items as $item ) : ?>

<li>

<h2<?=(!$show_excerpt ? ' class="excerpt"' : '')?>><a href="<?php echo $item->get_permalink(); ?>" title="<?=(!$show_excerpt ? strip_tags($item->get_description()) : 'Posted '.$item->get_date('j F Y | g:i a'))?>" target="_blank"><?php echo $item->get_title(); ?></a></h2>

<? if ($show_excerpt) {?>

<p><?php echo strip_tags($item->get_description()); ?></p>

<? }?>

</li>

<?php endforeach; ?>

</ul>



<div id="feed-last-item"><!-- nothing to see here --></div>

</div>

</div> <!-- feed-feed -->



<?php

}

?>



<?php if (!$args["widget_name"]){ ?>

<style>

#rss-feed {

padding-left: 0px;

width:660px !important;

border-bottom: none;

margin-top: 15px !important;

}

#rss-feed .content-dets h3 {

margin-top: 0px;

}

/*#rss-feed .content-body {

width:440px !important;

}*/

#rss-feed .content-dets {

width: 200px;

margin-left: 30px;

}



#rss-feed .content-body {

width:490px !important;

}



#rss-feed li {

width:490px !important;

}

</style>

<?php }?>



<?php

$result = ob_get_contents();

ob_end_clean();

return $result;

} register_sidebar_widget('Seven Five - Feed', 'widget_sf_feed');?>


Dave Smith comments:

bingo. nice one Fahd, that's worked. It's now raised the second issue which I have with the theme, which is speed, but i'm going to post another question about that one with some more award money. Well done!


Fahad Murtaza comments:

Glad to see it works :) Cheers.

2011-09-14

Luis Abarca answers:

You should activate de debug on wp-config.php, run again and look for wp-content/debug.log


define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
@ini_set('error_reporting', E_ERROR | E_WARNING | E_PARSE );

@ini_set('log_errors','On');
// You can also set a custom path
//@ini_set('error_log','wp-content/php_error.log');

/* That's all, stop editing! Happy blogging. */


Maybe you are using a distinct version of PHP, runing on a safe_mode server, do a phpinfo() on a file to see the server env.


Luis Abarca comments:

also check for rules on .htaccess, maybe some apache modules are not active, , change the permalink attribute on wp-admin to default (/?page_id=x / ?post_id=x)

i can view http://92.243.24.134/?post_id=1

But http://92.243.24.134/?post_id=2, shows an error from a plugin "w3 total cache"


Fatal error: Out of memory (allocated 10747904) (tried to allocate 315393 bytes) in /srv/d_techcityinsid/www/www.siliconroundaboutinsider.com/htdocs/wp-content/plugins/w3-total-cache/lib/W3/Cache/File.php on line 150


Luis Abarca comments:


define('SCRIPT_DEBUG', true);


It's for debugging javascript files


Luis Abarca comments:


Parse error: syntax error, unexpected '{', expecting T_STRING in /srv/d_techcityinsid/www/www.siliconroundaboutinsider.com/htdocs/wp-content/themes/seven-five/widgets/feed.php on line 43


I recommend you to:

1.- Reset permalinks to default
2.- Desactivate all plugins and activate one at the time


Dave Smith comments:

see my response to fahd above... the feed.php is not being pulled in by a plugin, it's part of the theme... responsible for pulling in rss feeds from various 3rd parties... no idea how to fix the error..


Dave Smith comments:

ps I put a phpinfo here: http://92.243.24.134/phpinfo.php

2011-09-14

Lew Ayotte answers:

Just a guess, but the IP is probably a shared host IP... so going to the IP won't get you any valid site, it requires a hostname.

Try created a CNAME in your domains' DNS like, dev.techcityinsider.net that points to the IP.

Alternatively, you could create an index.html file and put it in the root directory of the new site. If it displays, then you know everything with your host/IP is kosher.

Lew


Dave Smith comments:

i know there's no probs with the host, the wp install is working fine with any other theme. it's only this theme which is causing the problems.


Lew Ayotte comments:

Curious, does the original Seven Five theme work?

2011-09-14

Ryan Riatno answers:

try to revert the permalink, all the link is return to 404 error. and as far as i know debug is doesn't have a change to display when it returned an error 500.

2011-09-14

marco Nardi answers:

- Disable Permalink in Wp admin
- Chmod +777 your root directory
- cancel your .htaccess
- Restore your Permalink in WP admin

Wp will generate htaccess for you and that restore +755 to your WP root Directory...

i'v resolved today this same error..

Bye

Marco