5 Replies - 1610 Views - Last Post: 08 January 2012 - 06:00 PM Rate Topic: -----

#1 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 559
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

$smarty

Posted 08 January 2012 - 01:59 PM

Hey, I have the task of transfering a website to a new server. Unfortunately however, it uses plesk, and is not as simple as copying the files. I am trying to now figure out some issues. I was wondering first if anyone has any experience with $smarty so I can ask the question?

Nick
Is This A Good Question/Topic? 0
  • +

Replies To: $smarty

#2 KingCuddles  Icon User is offline

  • D.I.C Regular

Reputation: 171
  • View blog
  • Posts: 490
  • Joined: 20-December 08

Re: $smarty

Posted 08 January 2012 - 02:05 PM

Whats the question?
Was This Post Helpful? 0
  • +
  • -

#3 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 559
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: $smarty

Posted 08 January 2012 - 02:29 PM

Well, when I test the register page on the website, I get the error

Quote

Warning: orHelper::require_once(C:/Users/MentorDCT/Desktop/localhost/website/backend/include/misc.inc.php) [function.orHelper-require-once]: failed to open stream: No such file or directory in /var/www/vhosts/manoliahomes.co.uk/httpdocs/lib/or_helper.php on line 552


or_helper line 552 is
require_once($config['basepath'] . '/include/misc.inc.php');


Now firstly, $config is a global variable. Is there anyway I can see which class sets it? I think I know which one does, which means basepath would be
define('BASEPATH',$smarty->get_config_vars('APPLICATON_ROOT')."/");


I think I need to see what is being printed out by line 552 as I dont think the prefix is working?

I am slightly lost, so trying to go through this slowly :dontgetit:
Was This Post Helpful? 0
  • +
  • -

#4 Jstall  Icon User is offline

  • Lurker
  • member icon

Reputation: 434
  • View blog
  • Posts: 1,042
  • Joined: 08-March 09

Re: $smarty

Posted 08 January 2012 - 02:44 PM

Hi,

I don't believe they are the same variable. $config looks like it is an array. The line:
define('BASEPATH',$smarty->get_config_vars('APPLICATON_ROOT')."/");


defines a constant with the name BASEPATH and it is accessed differently.

Try doing:
print_r($config);



to see the values of the array.

The only reliable way I can think of to see where it is defined is to go through the code that is being called when the page loads. You could try to grep for "$config = " or something like that but I would chose the former.

Is there a "C:/Users/MentorDCT/Desktop/localhost/website/backend/include/misc.inc.php" file?

Hope this helps :)
Was This Post Helpful? 1
  • +
  • -

#5 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 559
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: $smarty

Posted 08 January 2012 - 03:31 PM

Your right, config was an array, and I managed to find where the elements are set. One element
$config["basepath"] = $misc->make_db_unsafe($recordSet->fields["controlpanel_basepath"]);


Now looking at the database table, the value which it is getting is
C:/Users/MentorDCT/Desktop/localhost/website/backend


Now as I got this from someone else computer, and trying to move it on my own computer to my server, I dont have the user MentoDCT on my computer. Anyways, why would this be a url absolute to a computers hard drive instead of a web url?

Nick
Was This Post Helpful? 0
  • +
  • -

#6 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 934
  • View blog
  • Posts: 2,329
  • Joined: 15-February 11

Re: $smarty

Posted 08 January 2012 - 06:00 PM

That's because you're not using the web server. I'm sure you've heard from time to time about http://localhost which is in fact your machine. You can download web server bundles like XAMPP or do config it individually with Apache, PHP and MySQL.

You can also add host names to your host file but then you'll also have to configure Apache's vhost file.
Configuring Virtual Hosts
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1