BLOG:CMS :: Support Forum
Support Forum for BLOG:CMS
You are not logged in.
#1 04.10.2006 02:06
- lucboudreau
- newbie...
- Registered: 04.10.2006
- Posts: 3
MySQL fine, but no cfg.php
Hi there, I just installed version 4.1.2. Everything is fine, all the tables created and everything.
But, I get no cfg.php file. ALL THE DIRECTORY PERMISSIONS ARE FINE. My logs display no error. I'm a bit confused here. If I deliberately change the database password for an erronous one, I get an error (test case...). All my test cases are fine, EXCEPT the dam cfg file which doesn't get created.
I even CHMOD'ed the root folder for 777 (which is REALLY BAD by the way, no one should EVER do that).
What's going on ???
BTW. I'm a senior programmer, so cut the mumbo jumbo access rights errors in your replies please.
Offline
#2 04.10.2006 02:09
- lucboudreau
- newbie...
- Registered: 04.10.2006
- Posts: 3
Re: MySQL fine, but no cfg.php
I was able to get the following output, finally :
[client 66.254.44.203] PHP Warning: main(): Unable to access ./cfg.php in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/index.php on line 18
[client 66.254.44.203] PHP Warning: main(./cfg.php): failed to open stream: No such file or directory in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/index.php on line 18
[client 66.254.44.203] PHP Warning: main(): Unable to access ./cfg.php in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/index.php on line 18
[client 66.254.44.203] PHP Warning: main(./cfg.php): failed to open stream: No such file or directory in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/index.php on line 18
[client 66.254.44.203] PHP Warning: main(): Failed opening './cfg.php' for inclusion (include_path='.:') in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/index.php on line 18
[client 66.254.44.203] PHP Notice: Undefined variable: DIR_PLUGINS in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/index.php on line 19
[client 66.254.44.203] PHP Warning: main(related/nusoap.php): failed to open stream: No such file or directory in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/index.php on line 19
[client 66.254.44.203] PHP Warning: main(related/nusoap.php): failed to open stream: No such file or directory in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/index.php on line 19
[client 66.254.44.203] PHP Warning: main(): Failed opening 'related/nusoap.php' for inclusion (include_path='.:') in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/index.php on line 19
[client 66.254.44.203] PHP Fatal error: Unknown function: selector() in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/index.php on line 20
[client 66.254.44.203] PHP Warning: main(): Unable to access ../cfg.php in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/admin/index.php on line 27
[client 66.254.44.203] PHP Warning: main(../cfg.php): failed to open stream: No such file or directory in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/admin/index.php on line 27
[client 66.254.44.203] PHP Warning: main(): Unable to access ../cfg.php in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/admin/index.php on line 27
[client 66.254.44.203] PHP Warning: main(../cfg.php): failed to open stream: No such file or directory in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/admin/index.php on line 27
[client 66.254.44.203] PHP Warning: main(): Failed opening '../cfg.php' for inclusion (include_path='.:') in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/admin/index.php on line 27
[client 66.254.44.203] PHP Notice: Undefined index: alertOnSecurityRisk in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/admin/index.php on line 29
[client 66.254.44.203] PHP Fatal error: Call to a member function on a non-object in /home/httpd/vhosts/fredjourdain.com/httpdocs/blogcms/admin/index.php on line 55
I still don't know what's wrong
Offline
#3 05.10.2006 22:55
- Radek Hulán
- Site Admin

- From: Prague, Czech Republic
- Registered: 17.03.2004
- Posts: 2508
- Website
Re: MySQL fine, but no cfg.php
If cfg.php does not get created automatically, it will be shown at the end of installation, and you have to create it manually.
This is a cfg.php sample for my local Windows installation:
Code:
<?php
global $SQL_HOST,$SQL_USER,$SQL_PASSWORD,$SQL_DATABASE,$SQL_TYPE,$SQL_PREFIX;
global $DIR_ADMIN,$DIR_MEDIA,$DIR_SKINS,$DIR_PLUGINS,$DIR_LANG,$DIR_LIBS;
// MySQL/SQLite connection information
$SQL_HOST = 'localhost';
$SQL_USER = '*********';
$SQL_PASSWORD = '********';
$SQL_DATABASE = 'htf';
/**
* $SQL_TYPE=0: MySQL 4.0 (mysql)
* $SQL_TYPE=1: MySQL 4.1 (mysqli)
* $SQL_TYPE=2: SQLite 2.8
*/
$SQL_TYPE = 1;
$SQL_PREFIX = '';
// main BLOG:CMS directory
$DIR_ADMIN = 'C:/web/www/htf.cuni.cz/admin/';
// path to media dir
$DIR_MEDIA = 'C:/web/www/htf.cuni.cz/media/';
// extra skin files for imported skins
$DIR_SKINS = 'C:/web/www/htf.cuni.cz/skins/';
// these dirs are normally sub dirs of the BLOG:CMS dir, but
// you can redefine them if you wish
$DIR_PLUGINS = $DIR_ADMIN . 'plugins/';
$DIR_LANG = $DIR_ADMIN . 'language/';
$DIR_LIBS = $DIR_ADMIN . 'libs/';
// include libs
include($DIR_LIBS.'globalfunctions.php');
$CONF['alertOnSecurityRisk']=0;
?>Offline
#4 06.10.2006 00:06
- lucboudreau
- newbie...
- Registered: 04.10.2006
- Posts: 3
Re: MySQL fine, but no cfg.php
Thank you very much. You are a very efficient man.
Solved and solved.
Offline
#5 21.06.2007 11:41
- setans
- newbie...
- Registered: 20.06.2007
- Posts: 2
Re: MySQL fine, but no cfg.php
where must i put cfg.php file
Offline
#6 21.06.2007 12:57
- marek
- newbie...
- Registered: 08.12.2004
- Posts: 7
Re: MySQL fine, but no cfg.php
setans wrote:
where must i put cfg.php file
In root of your installation. Directory with action.php, atom.php, cfg.php, contact.php, .....
Offline
#7 22.06.2007 02:49
- HHHoagie
- newbie...
- Registered: 18.06.2007
- Posts: 3
Re: MySQL fine, but no cfg.php
Radek, I got past the mysql but did not get a cfg.php created so I used the one above and modified it. That's where I think I have gone wrong. Could you take a look at these errors and point me in the right direction please.
Your previous advice was about database rights was right on target, thank you
Bob
Last edited by HHHoagie (22.06.2007 02:51)
Offline
#8 23.06.2007 00:39
- HHHoagie
- newbie...
- Registered: 18.06.2007
- Posts: 3
Re: MySQL fine, but no cfg.php
Oops! forgot to post the errors... sorry
Code:
Warning: Cannot modify header information - headers already sent by (output started at /home/rhoaglan/www/blogcms/cfg.php:2) in /home/rhoaglan/www/blogcms/admin/libs/globalfunctions.php on line 407
Warning: Cannot modify header information - headers already sent by (output started at /home/rhoaglan/www/blogcms/cfg.php:2) in /home/rhoaglan/www/blogcms/admin/libs/globalfunctions.php on line 408
DISALLOWED (ExtraSkin)
DISALLOWED (OffsetArticles)
I did what the troubleshooting guide in the manual said to do but couldn't find any white space.
Last edited by HHHoagie (23.06.2007 00:41)
Offline
#9 16.09.2007 04:39
- jmcgranahan
- newbie...
- Registered: 16.09.2007
- Posts: 1
Re: MySQL fine, but no cfg.php
I have a similar problem and attempted to use the cfg.php file as posted on this forum, but I'm still not having any luck. When I try to access the admin area, I get this error:
System is not configured properly - globalfunctions.php / 2.
Fatal error: Call to a member function on a non-object in /home/earnnetc/public_html/blog/admin/index.php on line 55
Looking in my error log file on my server, I have this:
[Sat Sep 15 21:30:33 2007] [error] PHP Fatal error: Call to a member function on a non-object in /home/earnnetc/public_html/blog/admin/index.php on line 55
[Sat Sep 15 20:58:17 2007] [error] PHP Fatal error: Call to a member function on a non-object in /home/earnnetc/public_html/blog/admin/index.php on line 55
[Sat Sep 15 20:58:17 2007] [error] PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening '../cfg.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/earnnetc/public_html/blog/admin/index.php on line 27
[Sat Sep 15 20:58:17 2007] [error] PHP Warning: main(../cfg.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /home/earnnetc/public_html/blog/admin/index.php on line 27
[Sat Sep 15 20:58:17 2007] [error] PHP Warning: main(../cfg.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /home/earnnetc/public_html/blog/admin/index.php on line 27
[Sat Sep 15 20:58:17 2007] [error] PHP Warning: main(../cfg.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /home/earnnetc/public_html/blog/admin/index.php on line 27
Any help or guidance is greatly appreciated! Thank you!
PS. Using MySQL 4.1.22 & PHP 4.4.7 via cpanel on Apache web server.
Jamen
Offline
#10 21.09.2007 09:11
- Radek Hulán
- Site Admin

- From: Prague, Czech Republic
- Registered: 17.03.2004
- Posts: 2508
- Website
Re: MySQL fine, but no cfg.php
I think paths (like DIR_ADMIN) in your cfg.php are not set correctly. Sometimes PHP is forbidden to determine proper paths, and you have to set them manually.
Offline
