After Install Problems

Tagged:  

After the installation is done I get this message

Warning: ini_set() has been disabled for security reasons in /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/environment/environment.php on line 19

Warning: ini_set() has been disabled for security reasons in /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/environment/environment.php on line 20

Warning: ini_set() has been disabled for security reasons in /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/environment/environment.php on line 32

Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/environment/environment.php on line 36

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/environment/environment.php:19) in /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/environment/environment.php on line 37
Error
We are sorry, but ProjectPier failed to connect to the database. Error report has been sent to the administrator so problem should be resolved soon.

Fix

Edit /project/environment/environment.php

Put // before the lines that have ini_set in them (line 19, 20 and 32). This makes them comment lines.

Retry the installation after that.

Note: Thanks for reporting. I will put fixes in for this situation.

Thank you for the advice. I'll will let know if it worked.

I did what you told me to do and I'm still getting the error after the installation that it can't connect to the database. Whats funny is that all the table get created, just cant log-in. Here is what I found in the error log:
Session "default" started at 2011-11-19T06:00:34+0000
#1 ERROR: Error: mysql_pconnect() has been disabled for security reasons in '/www/zxq.net/c/o/n/control-wilkspace/htdocs/project/environment/library/database/adapters/MysqlDBAdapter.class.php' on line 28 (error code: 2)
#2 FATAL: exception 'DBConnectError' with message 'Failed to connect to database' in /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/environment/library/database/adapters/MysqlDBAdapter.class.php:32
Stack trace:
#0 /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/environment/library/database/adapters/AbstractDBAdapter.class.php(40): MysqlDBAdapter->connect(Array)
#1 /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/environment/library/database/DB.class.php(95): AbstractDBAdapter->__construct(Array)
#2 /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/environment/library/database/DB.class.php(66): DB::connectAdapter('mysql', Array)
#3 /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/init.php(98): DB::connect('mysql', Array)
#4 /www/zxq.net/c/o/n/control-wilkspace/htdocs/project/index.php(8): require('/www/zxq.net/c/...')
#5 {main}
Time since start: 0.025463819503784 seconds
Any ideas? Thank you for your help.

Check config/config.php. It should contain a line like this.
define('DB_PERSIST', 'false');
My guess the value after DB_PERSIST is 'true'. If yes, change it.
Persistent connections are not allowed in your setup:
Error: mysql_pconnect() has been disabled for security reasons

I check the the config.php and changed that setting to false it didnt work. But just on a hunch I checked the init.php file and found this
register_shutdown_function('__shutdown');
trace(__FILE__,'connect to database');
// Connect to database...
try {
DB::connect(DB_ADAPTER, array(
'host' => DB_HOST,
'user' => DB_USER,
'pass' => DB_PASS,
'name' => DB_NAME,
'persist' => DB_PERSIST
)); // connect
I changed the 'persist => DB_PERSIST to //'persist => DB_PERSIST
when I changed that I was able to log in.
Thank you for all your help.

Good job and your action lead to me the real solution. There should be no quotes around false in the config file. I fixed the installation code for this. Thanks!

If you would change config/config.php to look like this

define('DB_PERSIST', false);

then the fix in init.php should not be needed anymore :-)

Please try.

Did the change and it worked.