Cacti Mac 10.10 install

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

Post Reply
urzh
Posts: 13
Joined: Sat Jul 13, 2013 4:04 pm

Cacti Mac 10.10 install

Post by urzh »

I'm doing a new install of cacti on mac X 10.10. I'm getting "Parse error: parse error in /cacti/include/config.php on line 27" when I try rendering the config page. Line 27 is the database hostname line (using 127.0.0.1). If I change to localhost its the same error. My database and user account are created per below. Settings below.

Versions:
PHP 5.3.29
Apache 2.4.9
MySQL 5.6.22

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql”;
$database_default = "cacti”;
$database_hostname = “127.0.0.1”;
$database_username = "cactiuser”;
$database_password = "cactiuser”;
$database_port = "3306”;
$database_ssl = false;
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti Mac 10.10 install

Post by phalek »

The line with the hostname has a different double quote than the other lines. Delete them and re-enter them again.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
urzh
Posts: 13
Joined: Sat Jul 13, 2013 4:04 pm

Re: Cacti Mac 10.10 install

Post by urzh »

Wow, good catch. I must have changed that while I was troubleshooting. It's back to the original quote butt he error is still on the same line

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql”;
$database_default = "cacti”;
$database_hostname = "127.0.0.1”;
$database_username = "cactiuser”;
$database_password = "cactiuser”;
$database_port = "3306”;
$database_ssl = false;
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti Mac 10.10 install

Post by phalek »

Try using these lines

Code: Select all

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "127.0.0.1";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";
$database_ssl = false;
Then afterwards also do a "dos2unix config.php" on the file to get rid of any windows line ending which may be included there
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
urzh
Posts: 13
Joined: Sat Jul 13, 2013 4:04 pm

Re: Cacti Mac 10.10 install

Post by urzh »

I'm not as familiar with the dos2unix command; however i'm using the lines you pasted. When I render to /include/config.php it's a blank page.


<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2012 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDTool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "127.0.0.1";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";
$database_ssl = false;

/*
Edit this to point to the default URL of your Cacti install
ex: if your cacti install as at http://serverip/cacti/ this
would be set to /cacti/
*/
//$url_path = "/cacti/";

/* Default session name - Session name must contain alpha characters */
//$cacti_session_name = "Cacti";

?>
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti Mac 10.10 install

Post by phalek »

Can you attach the file to the post ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
urzh
Posts: 13
Joined: Sat Jul 13, 2013 4:04 pm

Re: Cacti Mac 10.10 install

Post by urzh »

Thanks for your continued help, attached.
Attachments
config.txt
(2.12 KiB) Downloaded 248 times
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti Mac 10.10 install

Post by phalek »

Try the attached file
Attachments
config.txt
(2.12 KiB) Downloaded 237 times
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
urzh
Posts: 13
Joined: Sat Jul 13, 2013 4:04 pm

Re: Cacti Mac 10.10 install

Post by urzh »

Using the file, it still renders blank when I point to http://include/config.php

If I render top level, I get FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'

But the problem is I have 127.0.0.1 in the database hostname in config.php. Leads me to believe it's reading something else now.
urzh
Posts: 13
Joined: Sat Jul 13, 2013 4:04 pm

Re: Cacti Mac 10.10 install

Post by urzh »

Ok, I had to give read/write permissions to the new config file. After I did it's recognizing the sql server hostname as 127.0.0.1 which is how it is defined in the config. And I confirmed I can connect to the 'cacti' DB through sql manager and mysql. I have about 10 other db's hosted on this server that are fine.

Still can't get anywhere though.

"FATAL: Cannot connect to MySQL server on '127.0.0.1'. Please make sure you have specified a valid MySQL database name in 'include/config.php'"
urzh
Posts: 13
Joined: Sat Jul 13, 2013 4:04 pm

Re: Cacti Mac 10.10 install

Post by urzh »

Hello, any other ideas please?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests