Setting up base directory in Xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Setting up base directory in Xampp

Postby inspiration1312 » 10. November 2012 19:58

I am trying to install a php script on a windows system using XAMPP and uploaded all files into jax folder within htdocs folder.
This is what the scripts config file has:

// Begin Configuration
$config['basedir'] = '/jax';
$config['baseurl'] = 'http://www.jax.com';

$DBTYPE = 'mysql';
$DBHOST = 'localhost';
$DBUSER = 'root';
$DBPASSWORD = 'root123';
$DBNAME = 'mysabc';

// End Configuration

Now my problem is when I am setting the above config it is showing me errors,

Warning: require_once(/jax/smarty/libs/Smarty.class.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\jaxinclude\config.php on line 26

Fatal error: require_once() [function.require]: Failed opening required '/jax/smarty/libs/Smarty.class.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\jax\include\config.php on line 26

line 26: require_once($config['basedir'].'/smarty/libs/Smarty.class.php');

Please tell me that what I have to specify in basedir & baseurl.
inspiration1312
 
Posts: 10
Joined: 13. July 2012 19:56
Operating System: windows vista

Re: Setting up base directory in Xampp

Postby inspiration1312 » 11. November 2012 04:13

anyone here?
inspiration1312
 
Posts: 10
Joined: 13. July 2012 19:56
Operating System: windows vista

Re: Setting up base directory in Xampp

Postby inspiration1312 » 11. November 2012 12:11

???
inspiration1312
 
Posts: 10
Joined: 13. July 2012 19:56
Operating System: windows vista

Re: Setting up base directory in Xampp

Postby JJ_Tagy » 11. November 2012 16:28

I see an inconsistency with what you report:

No such file or directory in C:\xampp\htdocs\jaxinclude\config.php

in C:\xampp\htdocs\jax\include\config.php
JJ_Tagy
 
Posts: 788
Joined: 30. January 2012 13:44
XAMPP version: 5.5.15
Operating System: Windows 10 Pro x64

Re: Setting up base directory in Xampp

Postby inspiration1312 » 12. November 2012 05:32

Sorry, I forgot to put \ above.
inspiration1312
 
Posts: 10
Joined: 13. July 2012 19:56
Operating System: windows vista

Re: Setting up base directory in Xampp

Postby Altrea » 12. November 2012 06:30

Hi inspiration1312,

We don't have enough information to answer your question properly.
We need to know where your ressources are located.

Starting a basedir with a slash can't be the correct way, because the starting slash means the very root of your Harddrive partition.
You can simply test that by executing the following testscript:
Code: Select all
echo realpath('/');


I don't know where your Smarty ressources are located and this is really a third party problem (for which we can't provide any support).
You could try to define $config['basedir'] without beginning slash. Maybe this already solves your problem.
Your $config['baseurl'] should be very common setted to the url which is used (e.g. http://localhost or http://www.yourdomainhere.com. If you need to place a trailing slash here is dependend on that third party script too.

best wishes,
Altrea

P.S.:
Two rules of politeness and respect:
  • If you start a new thread here, start with a short salutation line.
  • This is a volunteer board here, so we all have jobs, families, other hobbies, etc. We can't watch 24/7 at this board for new threads. So please be polite to give the helpers enough time to answer your thread without polling it every half a day.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 119 guests