[Solved] Can anyone see the error with my config.php please?!!

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

[Solved] Can anyone see the error with my config.php please?!!

Post by ncd »

Howdy,

Now I've gone and done something a bit silly, I'm practicing with cmsms on two different sites, and I went to update config.php to set up pretty urls... but foolishly I uploaded config.php from site 1 (which was working fine) onto site 2, neglecting to check if the content was unique to site 1, which of course, it is!!! Even sillier of me was not making sure I'd backed up the latest version of site 2! D'oh...

.htaccess seems to not have any unique content to site 1, so hoping this was ok to upload to site 2.

I've gone through config.php and updated the database login details, the root directory and paths, for eg.
From
(site 1 - www.wakevents.com.au)
/var/virtual/web/w1962/html/tmp/cache
To
(site 2 - www.businessbrokers.jamiesons.com.au)
/var/virtual/web/w1633/subdomain/businessbrokers/tmp/cache

I realise this was an incredibly short-sighted attempt at a short-cut, and I should've just updated the new code to the existing file... but we live and learn!

I would be eternally grateful if you could identify what I need to change in either of these to get my site back!!  :-[

config.php

Code: Select all

<?php


#CMS Made Simple Configuration File
#Please clear the cache (Site Admin->Global Settings in the admin panel)
#after making any changes to path or url related options

#-----------------
#Behaviour Settings
#-----------------

# These settings will effect the overall behaviour of the CMS application, please
# use extreme caution when editing these.  Additionally, some settings may have
# no effect on servers with significantly restricted configurability.

# If you are experiencing propblems with php memory limit errors, then you may
# want to try enabling and/or adjusting this setting.
# Note: Your server may not allow the application to override memory limits.
$config['php_memory_limit'] = '';

# In versions of CMS Made Simple prior to version 1.4, the page template was processed
# in it's entirety.  This behaviour was later changed to process the head portion of the
# page template after the body.  If you are working with a highly configured site that
# relies significantly on the old order of smarty processing, you may want to try
# setting this parameter to false.
$config['process_whole_template'] = false;

# CMSMS Debug Mode?  Turn it on to get a better error when you
# see {nocache} errors, or to allow seeing php notices, warnings, and errors in the html output.
# This setting will also disable browser css caching.
$config['debug'] = false;

# Output compression?
# Turn this on to allow CMS to do output compression
# this is not needed for apache servers that have mod_deflate enabled
# and possibly other servers.  But may provide significant performance
# increases on some sites.  Use caution when using this as there have
# been reports of incompatibilities with some browsers.
$config['output_compression'] = false;

#-----------------
#Database Settings
#-----------------

#This is your database connection information.  Name of the server,
#username, password and a database with proper permissions should
#all be setup before CMS Made Simple is installed.
$config['dbms'] = 'mysql';
$config['db_hostname'] = 'localhost';
$config['db_username'] = 'w1633';
$config['db_password'] = '***********';
$config['db_name'] = 'jamiesons_com_au_cms';
#Change this param only if you know what you are doing
$config["db_port"] = '';


#If app needs to coexist with other tables in the same db,
#put a prefix here.  e.g. "cms_"
$config['db_prefix'] = 'cms_';

#Use persistent connections?  They're generally faster, but not all hosts
#allow them.
$config['persistent_db_conn'] = false;

#Use ADODB Lite?  This should be true in almost all cases.  Note, slight
#tweaks might have to be made to date handling in a "regular" adodb
#install before it can be used.
$config['use_adodb_lite'] = true;

#-------------
#Path Settings
#-------------

#Document root as seen from the webserver.  No slash at the end
#If page is requested with https use https as root url
#e.g. http://blah.com
$config['root_url'] = 'http://www.businessbrokers.jamiesons.com.au';
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')
{
$config['root_url'] = str_replace('http','https',$config['root_url']);
}

#Path to document root. This should be the directory this file is in.
#e.g. /var/www/localhost
$config['root_path'] = '/var/virtual/web/w1633/subdomain/businessbrokers';

#Name of the admin directory
$config['admin_dir'] = 'admin';

#Where do previews get stored temporarily?  It defaults to tmp/cache.
$config['previews_path'] = '/var/virtual/web/w1633/subdomain/businessbrokers/tmp/cache';

#Where are uploaded files put?  This defaults to uploads.
$config['uploads_path'] = '/var/virtual/web/w1633/subdomain/businessbrokers/uploads';

#Where is the url to this uploads directory?
$config['uploads_url'] = $config['root_url'] . '/uploads';


#---------------
#Upload Settings
#---------------

#Maxium upload size (in bytes)?
$config['max_upload_size'] = 10000000;

#Permissions for uploaded files.  This only really needs changing if your
#host has a weird permissions scheme.
$config['default_upload_permission'] = '664';

#------------------
#Usability Settings
#------------------

#Allow smarty {php} tags?  These could be dangerous if you don't trust your users.
$config['use_smarty_php_tags'] = false;

#Automatically assign alias based on page title?
$config['auto_alias_content'] = true;

#------------
#URL Settings
#------------

#What type of URL rewriting should we be using for pretty URLs?  Valid options are:
#'none', 'internal', and 'mod_rewrite'.  'internal' will not work with IIS some CGI
#configurations. 'mod_rewrite' requires proper apache configuration, a valid
#.htaccess file and most likely {metadata} in your page templates.  For more
#information, see:
#http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs#Pretty_URL.27s
$config['url_rewriting'] = 'mod_rewrite';

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';

#--------------
#Image Settings
#--------------

#Which program should be used for handling thumbnails in the image manager.
#See http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Content/Image_Manager for more
#info on what this all means
$config['image_manipulation_prog'] = 'GD';
$config['image_transform_lib_path'] = '/usr/bin/ImageMagick/';

#Default path and URL for uploaded images in the image manager
$config['image_uploads_path'] = '/var/virtual/web/w1633/subdomain/businessbrokers/uploads/images';
$config['image_uploads_url'] = $config['root_url'] . '/uploads/images'; 


#------------------------
#Locale/Encoding Settings
#------------------------

#Locale to use for various default date handling functions, etc.  Leaving
#this blank will use the server's default.  This might not be good if the
#site is hosted in a different country than it's intended audience.
$config['locale'] = '';

#In almost all cases, default_encoding should be empty (which defaults to utf-8)
#and admin_encoding should be utf-8.  If you'd like this to be different, change
#both.  Keep in mind, however, that the admin interface translations are all in
#utf-8, and will be converted on the fly to match the admin_encoding.  This
#could seriously slow down the admin interfaces for users.
$config['default_encoding'] = 'utf-8';
$config['admin_encoding'] = 'utf-8';

#This is a mysql specific option that is generally defaulted to true.  Only
#disable this for backwards compatibility or the use of non utf-8 databases.
$config['set_names'] = true;

# URL of the Admin Panel section of the User Handbook
# Set none if you want hide the link from Error
$config['wiki_url'] = 'http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel';


?>

Code: Select all

# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
SecFilterEngine Off

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /
RewriteRule ^oldpage.html$ http://www.yoursite.com/newpage.html [R=301,L]
#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>

Last edited by ncd on Thu Oct 15, 2009 11:33 pm, edited 1 time in total.
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

Re: Can anyone see the error with my config.php please?!!

Post by ncd »

Oh... and I did update the permissions for config.php to 444 on the server.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Can anyone see the error with my config.php please?!!

Post by Rolf »

Hi ncd

The best way to create a new -working- config.php file is to copy the install folder back onto the server and do the install proces again.

But DON't let it create tables and sample content in step 5 (I think). Uncheck these options!!!
If you let it proceed, your database will be overwritten... Backup first, just in case...

Afterwards delete the install folder again and set the permission of the file back to 444

Regards, Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

Re: Can anyone see the error with my config.php please?!!

Post by ncd »

Thanks Rolf... but it hasn't worked  ???

Take a look at http://www.businessbrokers.jamiesons.com.au/install/index.php

I deleted everything in config.php, uploaded it and set it to 666... could there be anything else I need to do?

Many thanks!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Can anyone see the error with my config.php please?!!

Post by Rolf »

change the name of the .htaccess file back to htaccess.txt and try again.

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

Re: Can anyone see the error with my config.php please?!!

Post by ncd »

Thanks Rolf... I did that, but it didn't do anything, so then I changed it back to .htaccess ON the server and voi la!

However... I've got the admin up and running and all my files are there, but the site is still down?!

I did a checksum and there are 753 files missing! Most of them are language files, but I saw these missing which could be important:

/modules/MenuManager/CSSMenu.js
/modules/MenuManager/templates/cssmenu_ulshadow.tpl
/modules/MenuManager/templates/accessible_simple_navigation.tpl
/modules/MenuManager/templates/accessible_cssmenu.tpl
/modules/MenuManager/templates/cssmenu.tpl
/modules/MenuManager/templates/minimal_menu.tpl
/modules/MenuManager/templates/simple_navigation.tpl
/modules/MenuManager/action.default.php
/modules/ThemeManager/action.defaultadmin.php

Any ideas?

Thanks again!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Can anyone see the error with my config.php please?!!

Post by calguy1000 »

Here's the sample template from CGFeedmaker....

Code: Select all

{* original rss feed template *}
<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>{$feed.title}</title>
    {if isset($feed.link) && !empty($feed.link)}<link>{$feed.link}</link>{/if}
    {if isset($feed.description) && !empty($feed.description)}<description>{$feed.description}</description>{/if}
    {if isset($feed.copyright) && !empty($feed.copyright)}<copyright>{$feed.copyright}</copyright>{/if}
    {if isset($generator)}<generator>{$generator}</generator>{/if}
    {if isset($feed.managing_editor) && !empty($feed.managing_editor)}<managingEditor>{$feed.managing_editor}</managingEditor>{/if}
    {if isset($admin_email)}<webMaster>{$admin_email}</webMaster>{/if}
    {if isset($feed.image) && !empty($feed.image)}
      <image>
	{if isset($feed.description) && !empty($feed.description)}<description>{$feed.description}</description>{/if}
        {if isset($feed.link) && !empty($feed.link)}<link>{$feed.link}</link>{/if}
        <title>{$feed.title}</title>
        <url>{$file_location}/{$feed.image}</url>
      </image>
    {/if}

    {* an example of how to create a feed from a call to the news module *}
    {* you can use any smarty variable that is available in the news summary template *}
    {* you can substitute this logic with output from any module that supports a summary
       view, or possibly get artistic and mix output from different modules *}
    {Blogs assign='junk'} {* READ ME change this line to output only for individual categories, etc *}
    {foreach from=$items item='entry'}
    <item>
	<title><![CDATA[{$entry->title}]]></title>
	<link>{$entry->entryurl}</link>
	<guid>{$entry->entryurl}</guid>
        <author>{$entry->author}</author>
	<pubDate>{$entry->unixtime|rfc_date}</pubDate>
	{* <category><![CDATA[{$entry->category}]]></category> *}
	<description><![CDATA[{eval var=$entry->text|strip_tags|summarize:80}</description>
	</item>
    {/foreach}
  </channel>
</rss>
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Can anyone see the error with my config.php please?!!

Post by Rolf »

but I saw these missing which could be important:

/modules/MenuManager/CSSMenu.js
/modules/MenuManager/templates/cssmenu_ulshadow.tpl
/modules/MenuManager/templates/accessible_simple_navigation.tpl
/modules/MenuManager/templates/accessible_cssmenu.tpl
/modules/MenuManager/templates/cssmenu.tpl
/modules/MenuManager/templates/minimal_menu.tpl
/modules/MenuManager/templates/simple_navigation.tpl
/modules/MenuManager/action.default.php
/modules/ThemeManager/action.defaultadmin.php

Any ideas?
Upgrade to release 1.6.6 or upload the 1.6.6 files over the existing files on the server.
There shouldn't be any files missing... :-\ Use Filezilla!
Back-up files and database first!

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

Re: Can anyone see the error with my config.php please?!!

Post by ncd »

Thanks calguy1000... but what am I to do with that?  :-[ I'm not sure how the CGFeedmaker is relevant to getting my site back up... here it is again http://www.businessbrokers.jamiesons.com.au/
Upgrade to release 1.6.6 or upload the 1.6.6 files over the existing files on the server.
Thanks Rolf, I'm using 1.6.5... will this really help? Would I download 1.6.6 and only upload the install folder?

Cheers!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Can anyone see the error with my config.php please?!!

Post by Rolf »

I'm using 1.6.5... will this really help? Would I download 1.6.6 and only upload the install folder?
Just to be on the save side, you better upgrade the full or base package, not the diff...
And always back-up first.

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

Re: Can anyone see the error with my config.php please?!!

Post by ncd »

Wooohoooo!! Re-installing everything the new version worked!

I'm slowly getting my head round how this thing works... slowly but surely!

Onya Rolfy Boy!
Post Reply

Return to “CMSMS Core”