PHP not intialising after installing Cacti
Moderators: Developers, Moderators
PHP not intialising after installing Cacti
Hi ,
I am new to cacti & php environment ,
below is the error
Fatal error: Call to undefined function mysql_pconnect() in c:\Inetpub\wwwroot\Cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 355
Regards,
Subu
I am new to cacti & php environment ,
below is the error
Fatal error: Call to undefined function mysql_pconnect() in c:\Inetpub\wwwroot\Cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 355
Regards,
Subu
PHP Extension
You have to enter the Lines
extension=mysql.so
extension=snmp.so
in yout php.ini!
extension=mysql.so
extension=snmp.so
in yout php.ini!
If you're running MySQL 4.1 then you will need to apply the old password trick for user authentication to work with Cacti.
1. Stop the MySQL service, edit your my.ini file, and add the following:
#Use old password encryption method (needed for 4.0 and older clients).
old-passwords
2. You will also need to update the cactiuser account with the old password style:
shell> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipw') WHERE Host = 'localhost' AND User = 'cactiuser';
mysql> FLUSH PRIVILEGES;
1. Stop the MySQL service, edit your my.ini file, and add the following:
#Use old password encryption method (needed for 4.0 and older clients).
old-passwords
2. You will also need to update the cactiuser account with the old password style:
shell> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipw') WHERE Host = 'localhost' AND User = 'cactiuser';
mysql> FLUSH PRIVILEGES;
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Errors repeated .
Hi,
Have tried the given solution but have not solved the problem.
Also, posting the errors occurred.
--------------------------------------------------------------------------------------
Warning: session_start() [function.session-start]: open(C:\WINDOWS\TEMP\\sess_16d462b9bc70cb9f342fad7e006d5111, O_RDWR) failed: Permission denied (13) in c:\Inetpub\wwwroot\Cacti\include\config.php on line 95
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\Inetpub\wwwroot\Cacti\include\config.php:95) in c:\Inetpub\wwwroot\Cacti\include\config.php on line 95
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\Inetpub\wwwroot\Cacti\include\config.php:95) in c:\Inetpub\wwwroot\Cacti\include\config.php on line 95
Fatal error: Call to undefined function mysql_pconnect() in c:\Inetpub\wwwroot\Cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 355
Warning: Unknown: open(C:\WINDOWS\TEMP\\sess_16d462b9bc70cb9f342fad7e006d5111, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
------------------------------------------------------------------------------------
If someone knows to rectify this errors pls do let me know.
Thanks.
Have tried the given solution but have not solved the problem.
Also, posting the errors occurred.
--------------------------------------------------------------------------------------
Warning: session_start() [function.session-start]: open(C:\WINDOWS\TEMP\\sess_16d462b9bc70cb9f342fad7e006d5111, O_RDWR) failed: Permission denied (13) in c:\Inetpub\wwwroot\Cacti\include\config.php on line 95
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\Inetpub\wwwroot\Cacti\include\config.php:95) in c:\Inetpub\wwwroot\Cacti\include\config.php on line 95
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\Inetpub\wwwroot\Cacti\include\config.php:95) in c:\Inetpub\wwwroot\Cacti\include\config.php on line 95
Fatal error: Call to undefined function mysql_pconnect() in c:\Inetpub\wwwroot\Cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 355
Warning: Unknown: open(C:\WINDOWS\TEMP\\sess_16d462b9bc70cb9f342fad7e006d5111, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
------------------------------------------------------------------------------------
If someone knows to rectify this errors pls do let me know.
Thanks.
You need to give IIS_USR modify rights to C:\WINDOWS\TEMP\ so PHP can store the session files.
Make sure you have php_mysql.dll uncommented from php.ini.
Make sure you have php_mysql.dll uncommented from php.ini.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
PHP and IIS
Hi,
Have tried the suggested options and now again facing the same old error .
Fatal error: Call to undefined function mysql_pconnect() in c:\Inetpub\wwwroot\Cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 355
Thanks.
Have tried the suggested options and now again facing the same old error .
Fatal error: Call to undefined function mysql_pconnect() in c:\Inetpub\wwwroot\Cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 355
Thanks.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Open a command prompt/shell and type the following:
"php -m" and "php -v".
Post the output.
TheWitness
"php -m" and "php -v".
Post the output.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
C:\Documents and Settings\suiyer>php -m
PHP Warning: PHP Startup: Unable to load dynamic library 'c:\php\ext\msql.so' -
The specified module could not be found.
in Unknown on line 0
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
ftp
iconv
libxml
mysql
odbc
pcre
Reflection
session
SimpleXML
snmp
sockets
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
C:\Documents and Settings\suiyer>php -v
PHP Warning: PHP Startup: Unable to load dynamic library 'c:\php\ext\msql.so' -
The specified module could not be found.
in Unknown on line 0
PHP 5.1.2 (cli) (built: Jan 11 2006 16:40:00)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
I have tried copying libmySQL.dll to windows\system32 folder
PHP Warning: PHP Startup: Unable to load dynamic library 'c:\php\ext\msql.so' -
The specified module could not be found.
in Unknown on line 0
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
ftp
iconv
libxml
mysql
odbc
pcre
Reflection
session
SimpleXML
snmp
sockets
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
C:\Documents and Settings\suiyer>php -v
PHP Warning: PHP Startup: Unable to load dynamic library 'c:\php\ext\msql.so' -
The specified module could not be found.
in Unknown on line 0
PHP 5.1.2 (cli) (built: Jan 11 2006 16:40:00)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
I have tried copying libmySQL.dll to windows\system32 folder
Why are you trying to use a Linux plugin? c:\php\ext\msql.so you should be using *.dll instead of *.so files.
libmySQL.dll in your windows directory won't fix anything. Please read this any apply the fix: http://dev.mysql.com/doc/refman/5.0/en/old-client.html
libmySQL.dll in your windows directory won't fix anything. Please read this any apply the fix: http://dev.mysql.com/doc/refman/5.0/en/old-client.html
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
After just a few hours of sleep, BSOD hit's one out of the ballpark
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Same Problem
Hi, I'm new to PHP and Cacti and I'm having this same issue.
Here's a few things about the server.
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
ftp
iconv
libxml
odbc
pcre
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
and
PHP 5.1.2 (cli) (built: Jan 11 2006 16:40:00)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
I went into the ini file and made the discussed changes to the file. I have a question though, while looking around in the file I came across this.
[SQL]
sql.safe_mode = OFF
[ODBC]
odbc.default_db = Not yet implemented
odbc.default_user = Not yet implemented
odbc.default _pw = Not yet implemented
I know that's not correct and I'm in the learning stages of mysql, so I'm at a loss of what to do here.
I also made sure all the security settings were in place for all the folders talked about and they were all done.
Thanking you guys in advance
Here's a few things about the server.
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
ftp
iconv
libxml
odbc
pcre
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
and
PHP 5.1.2 (cli) (built: Jan 11 2006 16:40:00)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
I went into the ini file and made the discussed changes to the file. I have a question though, while looking around in the file I came across this.
[SQL]
sql.safe_mode = OFF
[ODBC]
odbc.default_db = Not yet implemented
odbc.default_user = Not yet implemented
odbc.default _pw = Not yet implemented
I know that's not correct and I'm in the learning stages of mysql, so I'm at a loss of what to do here.
I also made sure all the security settings were in place for all the folders talked about and they were all done.
Thanking you guys in advance
saki:
1) Read the install guide in my signature
2) You don't need to mess with the [SQL] or [ODBC] sections
3) You haven't enabled the php_mysql.dll plugin in php.ini
1) Read the install guide in my signature
2) You don't need to mess with the [SQL] or [ODBC] sections
3) You haven't enabled the php_mysql.dll plugin in php.ini
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Saki,
You are also missing the php_snmp.dll and php_sockets.dll extensions.
TheWitness
You are also missing the php_snmp.dll and php_sockets.dll extensions.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Ok followed your guide step by step and am now getting this.
Fatal error: Call to undefined function read_config_option() in c:\Cacti\auth_login.php on line 139
C:/net-snmp/etc/snmp/snmp.conf: line 2: Warning: Unknown
token: persistenDir. C:/net-snmp/etc/snmp/snmp.conf; line 3:
Warning: Unknown token: tempFilePattern.
Fatal error: Call to undefined function read_config_option() in c:\Cacti\auth_login.php on line 139
C:/net-snmp/etc/snmp/snmp.conf: line 2: Warning: Unknown
token: persistenDir. C:/net-snmp/etc/snmp/snmp.conf; line 3:
Warning: Unknown token: tempFilePattern.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
You are almost there. What version of PHP are you running?
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 3 guests