Jump to content

Need some beginning help with developmental server..


Recommended Posts

Not quite sure which forum to post this, so please move it if needed...

 

I have put my website up and running, and I wanted to start making some changes, but don't want to disrupt the live site.  So I am trying to learn, understand, and start with a local server setup.  I have setup easyphp and want to make sure I understand everything before I begin.  If anyone knows of some good online tutorials, that would be great.  Here is how I understand things, please correct me if I am wrong.  Currently I use bluehost and have an addon domain (mydomain.com).  I went to public_html and copied the mydomain folder to my easyphp folder in the www directory.  I exported the database file (data.sql) as well.  The database was set up on bluehost as database mydata with the _joom tables.  As there are multiple databases, when I go to mydata it show main_mydata.

 

So I went to easyphp administration, clicked on phpmyadmin, and added a new database called mydata.  I then imported the data.sql file and all the tables are there.  I then went to configuration.php and changed the username, password, and database to the new names.  Also had a second configuration file for the database in another folder and changed them.  When I click on the folder in www, my site comes up but no menu items are there and there is text at the top:

 

$v) {if($an==''&& $v>$f) { $an = $p; if($s<66) { $u = base64_decode("aHR0cDovL3d3dy5qb29tbGFzaGFjay5jb20=");} else { $u = base64_decode("aHR0cDovL3d3dy5qb29tbGFzaGFjay5jb20=")."/".$l[$p]; }foreach($e as $es=>$k) {if($el=='' && $k>$t) { $el = $es; }}}}$jstpl = base64_decode("PGEgaHJlZj0n").$u.base64_decode("Jz4=").$an.base64_decode("PC9hPg==").$el;?> 

 

What did I do wrong or what am I missing?

 

thanks

Doc

 

 

Link to comment
Share on other sites

Not sure what you are asking by the opening php tag, so let me know if this is wrong.  In the main directory (mydomain) do you mean the index.php file?  If so, here is that code.

 

 

<?php
/**
* @version		$Id: index.php 11407 2009-01-09 17:23:42Z willebil $
* @package		Joomla
* @copyright	Copyright (C) 2005 - 2009 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// Set flag that this is a parent file
define( '_JEXEC', 1 );

define('JPATH_BASE', dirname(__FILE__) );

define( 'DS', DIRECTORY_SEPARATOR );

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );

JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;

/**
* CREATE THE APPLICATION
*
* NOTE :
*/
$mainframe =& JFactory::getApplication('site');

/**
* INITIALISE THE APPLICATION
*
* NOTE :
*/
// set the language
$mainframe->initialise();

JPluginHelper::importPlugin('system');

// trigger the onAfterInitialise events
JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
$mainframe->triggerEvent('onAfterInitialise');

/**
* ROUTE THE APPLICATION
*
* NOTE :
*/
$mainframe->route();

// authorization
$Itemid = JRequest::getInt( 'Itemid');
$mainframe->authorize($Itemid);

// trigger the onAfterRoute events
JDEBUG ? $_PROFILER->mark('afterRoute') : null;
$mainframe->triggerEvent('onAfterRoute');

/**
* DISPATCH THE APPLICATION
*
* NOTE :
*/
$option = JRequest::getCmd('option');
$mainframe->dispatch($option);

// trigger the onAfterDispatch events
JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
$mainframe->triggerEvent('onAfterDispatch');

/**
* RENDER  THE APPLICATION
*
* NOTE :
*/
$mainframe->render();

// trigger the onAfterRender events
JDEBUG ? $_PROFILER->mark('afterRender') : null;
$mainframe->triggerEvent('onAfterRender');

/**
* RETURN THE RESPONSE
*/
echo JResponse::toString($mainframe->getCfg('gzip'));

 

Doc

Link to comment
Share on other sites

I'm not sure if we are talking about the same thing.  For your 1st question, I have a file in the main directory called test.php (in 127.0.0.1:8888/test.php) as follows:

 

<?php
$hostname = "localhost";
$dbuser = "root";
$dbpassword = "";
$link = mysql_connect($hostname,$dbuser,$dbpassword); if (!$link) { die('Could not connect to MySQL: ' . mysql_error()); } echo 'Connection OK'; mysql_close($link); ?>

 

This returns Connection OK.

 

This should answer the question if any php works.

 

As to the code in the first post, let me explain a little further.  Lets say I did all this with phpfreaks.com.  If you look at the main page (of phpfreaks) you see the whole site and a menu bar (Home, tutorials, blog, etc).  At the top is a grey bar that has Subsribe to phpfreaks rss.  What I am ending up with is the site as shown, but there is nothing in the menu bar (no words or links), and ABOVE the top grey bar is the text as shown in the first post.  I cannot figure out where this is coming from, and why the site seems to be there with those couple of problems.  Otherwise, the site seems to work on the local server, just this stuff at the top I can't figure out.  I even took a snippet of the text and tried to GREP on the phpeasy entire folder with no results.

 

Doc

Link to comment
Share on other sites

The only thing that stands out in the information you have posted is that you are using a non-standard port number, 8888, and EVERY url and every external css/javascript link will need to specify that port number in the url for the site to work correctly.

 

Is there some reason you did not use port 80?

Link to comment
Share on other sites

OK, finally solved part of the problem.  I redid the GREP in pieces and found the file at fault.  It was the template file.  The beginning of that file was <? instead of <?php.  When I changed it, the text at the top went away.  I guess my host is more forgiving of this then easyphp is.  I still cannot figure out why no menu items are there.  I do have a bottom menu which shows up.  And I went to the database and all the menu item entries are there, but if I go to the joomla administrator settings and look at the menu items, they all show no items, even the bottom menu.  Very weird.  If anyone has any ideas, I would appreciate the help.

 

Doc

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.