Page 1 of 1

how can I quickly find the config paths and urls?

Posted: Tue Jun 19, 2007 1:46 pm
by lainyrache
The default install does a really good job of finding the correct paths and urls for config.php.
I am moving server - does anyone know if  there is a quick way to find the correct paths on my new server without doing a clean install or using  guesswork. I know you can get some from php info but - i usually still have to mess around.
Any tips appreciated.

Re: how can I quickly find the config paths and urls?

Posted: Tue Jun 19, 2007 3:46 pm
by scooper
I just use a php file with the single line:

Code: Select all

<?php echo(realpath($PHP_SELF)); ?>
if you pop that on the server then open it in a browser it will just tell you the absolute path to where the file is.

Re: how can I quickly find the config paths and urls?

Posted: Tue Jun 19, 2007 3:57 pm
by tsw
if you have shell access command pwd also usually tells the right path

Re: how can I quickly find the config paths and urls?

Posted: Tue Jun 19, 2007 6:51 pm
by cyberman
lainyrache wrote: I am moving server - does anyone know if  there is a quick way to find the correct paths on my new server
As you said install wizard does one time a good work - why not use a second time ;)?

You can run install procedure once again. You have only to deactivate writing database in step 4.

Re: how can I quickly find the config paths and urls?

Posted: Wed Jun 20, 2007 8:09 pm
by lainyrache
Thanks for the replys... :)
Very strange - does not work for me .. blank page.
but it got me on the right road to .....   this worked fine  ( obviously uploading a text file as well)

no shell access unfortunately....
....and  cyberman I know it's so easy -  I am just to lazy to upload the files..  ;D

Re: how can I quickly find the config paths and urls?

Posted: Sat Sep 01, 2007 12:46 am
by calguy1000

Re: how can I quickly find the config paths and urls?

Posted: Sat Sep 01, 2007 12:47 am
by calguy1000
SitePusher will handle this issue too, when I release it :)

Re: how can I quickly find the config paths and urls?

Posted: Sat Sep 01, 2007 7:11 am
by alby
scooper wrote:

Code: Select all

<?php echo(realpath($PHP_SELF)); ?>
It's work if "register_globals" is enabled (very bad!)
Use:

Code: Select all

<?php echo(realpath($_SERVER['PHP_SELF'])); ?>
or calguy1000 code

Alby

Re: how can I quickly find the config paths and urls?

Posted: Sat Sep 01, 2007 10:20 am
by openmtl
I had my first installation under my web site URL with /cmsmadesimple and what I did was copy the whole lot up so everything lives at the root of the web site (yes I suppose I could have used redirects or rewrites but I wanted to test moving it. What I changed was really simple,

config.php was edited and the changes are obvious throughout that file,

BUT

Captcha will not find fonts as in the cms_site_prefs  table in the captcha_mapi_prof_font_path row there is a hard coding for the site.

I think thats all I remember.  BTW:  dirname(__FILE__) will give you the current file location thus create a file e.g.,



and it'll give where the file was run from for the server paths. The dirname(__FILE__) is used a lot throughout the code anyway.

Re: how can I quickly find the config paths and urls?

Posted: Sat Sep 01, 2007 2:42 pm
by calguy1000
uninstall and re-install the captcha module.