View Full Version : Could not connect to database 4.7 Beta
icarrion
10-19-2004, 03:57 PM
I remember having the problem "Could not connect to database" before but I can't remember how we fixed this. Happens when in WYSIWYG when I click on link, image buttons.
Can someone help me out plz.
Cameron Allen
10-19-2004, 03:59 PM
Check your httpd.conf or srm.conf and make sure that there is not a www in your domain name. Also make sure your permissions are 777.
icarrion
10-19-2004, 05:25 PM
Check your httpd.conf or srm.conf and make sure that there is not a www in your domain name. Also make sure your permissions are 777.
Well, I've discussed this with you before, but basically, I run under an Ensim environment where all users are chrooted to their own directory using suexec which does not allow any file or directory to be 777. Instead, the apache user runs as the ACTUAL user and all the files and directories are OWNED by the USER. So 755 is fine.
I remember you told me to modify the link, images file so that the database connection string in those php files are hard coded. Do you remember what you told me to do?
Thanks!
icarrion
10-19-2004, 05:38 PM
More information.
Modifying sohoadmin/program/modules/page_editor/includes/db_connect.php and hardcoding:
$db_server
$db_name
$db_un
$db_pw
fixes the problem.
Why isn't this working normally?
Any suggestions appreciated.
Thanks!
Cameron Allen
10-19-2004, 05:49 PM
Thinking over this, was this problem on 4.7 beta or a Release Candidate? Also could you send me the db_connect.php that you are using?
icarrion
10-19-2004, 05:54 PM
Thinking over this, was this problem on 4.7 beta or a Release Candidate? Also could you send me the db_connect.php that you are using?
I first installed the stable version. Then I upgraded to 4.7 beta. Both versions have the same problem. I think I remember it being something with the database using cookies to connect.
Would it not be easier to do an:
include("/blah/blah/blah/config.php")
and do this on all db_connect.php files. That way it always gets those vars I mentioned earlier.
Do you still need the db_connect.php file? All I did was hardcode those 4 vars.
Many Thanks!
Cameron Allen
10-19-2004, 06:44 PM
Would it not be easier to do an:
include("/blah/blah/blah/config.php")
Try including that config file, if it works we will add it to the product build. I would try to do this here, but I have no way to replicate the problem you are having.
icarrion
10-20-2004, 09:17 AM
Try including that config file, if it works we will add it to the product build. I would try to do this here, but I have no way to replicate the problem you are having.
Well I suspect the problem is related to Apache's SUEXEC requirements. http://httpd.apache.org/docs/suexec.html.
Do you know of any of your customers using Ensim Control panel?
The way I fixed it was to add " include_once("../blah/blah/isp.conf.php"); " to all db_connect.php.
Cameron Allen
10-20-2004, 12:48 PM
We do have quite a few customers running Ensim.
icarrion
10-20-2004, 01:28 PM
We do have quite a few customers running Ensim.
Interesting. Then I guess they are running their sites under low security mode which bypasses SuExec. I'm not sure what can be the problem but I remember (previous forum) that I wasn't the only one with this problem. I continue to isolate the problem and get back to you with my results.
Thanks!
Cameron Allen
10-20-2004, 01:33 PM
Thanks for keeping the rest of us posted on this matter.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.