How to set my online website to local computer.

Joomla version 1.5 is end-of-life and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
fawadmz
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Mar 06, 2013 4:51 am

How to set my online website to local computer.

Post by fawadmz » Sat Mar 15, 2014 5:52 am

I have a fully working online joomla website , for upgrade purposes i want to have it on my local computer, i backed up databases and imported them using MySQL front without any singe error, created zip of all website files and extracted them in my local folder, changed the configuration file to my local setting, now when i access my site it shows error message stating :
Parse error :
Joomla_dir\templates\my_template\html\com_content\frontpage\default.php on line 62

It has been working fine online, can some one tell me how to set my website in my local computer.

iextensions
I've been banned!
Posts: 1498
Joined: Fri Jul 12, 2013 5:37 pm
Contact:

Re: How to set my online website to local computer.

Post by iextensions » Sat Mar 15, 2014 6:54 am

- please check database config, correct path of folder: tmp and logs
- see the the variable in file config: $live_site

Parse error :
Joomla_dir\templates\my_template\html\com_content\frontpage\default.php on line 62

can you give that file and we can have a look?
p/s: if you use akeeba and backup, it will be easy and no bug

fawadmz
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Mar 06, 2013 4:51 am

Re: How to set my online website to local computer.

Post by fawadmz » Sat Mar 15, 2014 10:21 am

Here is the code :

Code: Select all

<?php // @version $Id: default.php 11917 2009-05-29 19:37:05Z ian $
defined('_JEXEC') or die('Restricted access');
?>

<div id="leftNews">
	<?if($this->params->get('show_page_title',1)):?>
		<h1>Exclusive</h1>
	<?endif?>

	<div id="fn">
		<?php $i = $this->pagination->limitstart;
		$rowcount = $this->params->def('num_leading_articles', 1);
		for ($y = 0; $y < $rowcount && $i < $this->total; $y++, $i++) : ?>
			<?php $this->item =& $this->getItem($i, $this->params);
			echo $this->loadTemplate('leadingitem'); ?>
		<?endfor?>
	</div>

	<?php $introcount = $this->params->def('num_intro_articles', 4);
	if ($introcount) :
		$colcount = $this->params->def('num_columns', 2);
		if ($colcount == 0) :
			$colcount = 1;
		endif;
		$rowcount = (int) $introcount / $colcount;
		$ii = 0;
		for ($y = 0; $y < $rowcount && $i < $this->total; $y++) : ?>
			<div>
				<?php for ($z = 0; $z < $colcount && $ii < $introcount && $i < $this->total; $z++, $i++, $ii++) : ?>
					<div class="article_column column<?php echo $z + 1; ?> cols<?php echo $colcount; ?>" >
						<?php $this->item =& $this->getItem($i, $this->params);
						echo $this->loadTemplate('item'); ?>
					</div>
				<?php endfor; ?>
			</div>
		<?php endfor;
	endif; ?>

	<?php $numlinks = $this->params->def('num_links', 4);
	if ($numlinks && $i < $this->total) : ?>
	<div class="blog_more<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
		<?php $this->links = array_slice($this->items, $i - $this->pagination->limitstart, $i - $this->pagination->limitstart + $numlinks);
		echo $this->loadTemplate('links'); ?>
	</div>
	<?php endif; ?>


	<div>
		<?php if ($this->params->def('show_pagination', 2) == 1  || ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1)) : ?>
			<?php if( $this->pagination->get('pages.total') > 1 ) : ?>
			<p class="counter">
				<?php echo $this->pagination->getPagesCounter(); ?>
			</p>
			<?php endif; ?>
			<?php if ($this->params->def('show_pagination_results', 1)) : ?>
				<?php echo $this->pagination->getPagesLinks(); ?>
			<?php endif; ?>
		<?php endif; ?>
	</div>
</div>
<?if($this->params->get('show_feed_link', 0)):?><a id=rss href="<?=feedlink?>"><img src="/english/templates/saba_tech/image/rss.gif" /></a><?endif?>


The rest of configuration is configured correctly , $live_site variable is blank as was in online version .

Code: Select all

var $live_site = '';

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31086
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: How to set my online website to local computer.

Post by Per Yngve Berg » Sat Mar 15, 2014 11:47 am

Last line:

Code: Select all

<?endif?>
shall be:

Code: Select all

<?php endif; ?>

goedda
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 130
Joined: Sat Aug 06, 2011 3:40 am

Re: How to set my online website to local computer.

Post by goedda » Sat Mar 15, 2014 1:39 pm

To be more precise, you should replace each occurrence of '<?' with '<?php'. The PHP short open tag is not supported on some systems and may cause problems.
We come in peace, always!
http://www.quadrifolia.ch

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: How to set my online website to local computer.

Post by dpacadmin » Sat Mar 15, 2014 10:08 pm

Rather then edit all php files you can enable short php tags on your local server, here are directions for WampServer;
http://stackoverflow.com/questions/4645 ... tag-in-php


Locked

Return to “Installation 1.5”