1
jenrose
Installation Error - Unable to connect to database
  • 2005/6/1 8:28

  • jenrose

  • Just popping in

  • Posts: 17

  • Since: 2005/3/10


I have successfully installed XOOPS on to 4 sites now, but with a now hosting company I am having a major problem.

System runs with
RedHat Enterprise Linux
Apache version 1.3.33 (Unix)
CPanel control panel
PHP version 4.3.11
MySQL version 4.0.24-standard

I have changes the folder permissions to
1. The cache folder: chmod 777
2. The uploads folder: chmod 777
3. The template_c folder: chmod 777
4. mainfile.php: chmod 777

Now when I go to the site the message I get is

"This page cannot be displayed due to an internal error.

If you are the administrator of this site, please visit the XOOPS Troubleshooting Page for assistance.

Error [Xoops]: Unable to connect to database in file class/database/databasefactory.php line 34"

The installation itself went until trying to access
the database.

Any suggestions would be very much appreciated.

Jen

2
Catzwolf
Re: Installation Error - Unable to connect to database
  • 2005/6/1 8:32

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


In most case its a config error when trying to connect to the database, i have come across a few servers that don't confirm to the norm with usernames and passwords. Have you tried asking your hosting if the information you have is correct?

ATB

Catz

3
jenrose
Re: Installation Error - Unable to connect to database
  • 2005/6/1 8:43

  • jenrose

  • Just popping in

  • Posts: 17

  • Since: 2005/3/10


Thank you for your suggestion.
I will quiz server in the morning.

I also feel that I may have had some problem actually creating the database in the first place through CPanel as in the past my other servers have created MySQL databases for me. Can anyone run me through creating a database in CPanel.

Main problem is though the error message replaces the index page and I cannot login through the browser.

Do I have to delete all of XOOPS and reinstall?
Did that once already and did not work.

Please help if you can.

Cheers Jen

4
Catzwolf
Re: Installation Error - Unable to connect to database
  • 2005/6/1 8:46

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

jenrose wrote:
Thank you for your suggestion.
I will quiz server in the morning.

I also feel that I may have had some problem actually creating the database in the first place through CPanel as in the past my other servers have created MySQL databases for me. Can anyone run me through creating a database in CPanel.

Main problem is though the error message replaces the index page and I cannot login through the browser.

Do I have to delete all of XOOPS and reinstall?
Did that once already and did not work.

Please help if you can.

Cheers Jen


PM me and I will try and help you.

ATB

Catz

5
Catzwolf
Re: Installation Error - Unable to connect to database
  • 2005/6/1 9:43

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


At jenroses's request, here is my PM to her regarding adding databases and users to CPanel. I hope this helps a few others out there.

Quote:

When you enter Cpanel X, look for the MySQL Databases icon.

First you will have to create a database before you can add a user to this. Look for a textbox with DB: and a button that has ‘add db’.

Enter the name of the database you wish to use.

Next you have to create a user for this or add a new user to it.

If you are attaching a user to a database then this is very easy. Look for two pull down menus side by side like:

User: [accountname_username] DB: [accountname_database]

Select the user for the database you just created and select all ‘Privileges:’ checkbox and then click on the ‘add user to DB’ button.

That’s the database ready to go if you do it that way.

Now if you want to create a user then follow these steps:

Look for ‘Users: ‘ and it should have two text input boxes.

UserName: [ textbox ]
Password [ textbox ]

Enter the username and password for the new user.

Note: when you add a new user Cpanel actually adds your account name to the start of this. So if your actual account name with your hosting were jenrose, then Cpanel would create a new user called jenrose_username. You will notice that when you create your user (Should display it over those textboxes I mentioned previous.

Again, to add this user name to the database you created just follow the previous step.

So remember, if you create a database called ‘mydatabase’, Cpanel will have it as jenrose_mydata (or something like this) and the same with the username.

You most likely have entered the details like you did without adding your hosting account name on it first.

Hope this helps a little J

ATB

Catz

6
jenrose
Re: Installation Error - Unable to connect to database
  • 2005/6/1 11:31

  • jenrose

  • Just popping in

  • Posts: 17

  • Since: 2005/3/10


Still no joy after uninstalling and reinstalling XOOPS by using suggested protocol above.

Half way through installation I get the following error message

"SAVING CONFIGURATION DATA..
File ../mainfile.php overwritten by ../mainfile.dist.php.
Constant XOOPS_ROOT_PATH written to /home2/communi/public_html.
Constant XOOPS_URL written tohttp://www.mysite.com.
Constant XOOPS_DB_TYPE written to mysql.
Constant XOOPS_DB_PREFIX written to xoops.
Constant XOOPS_DB_HOST written to localhost.
Constant XOOPS_DB_USER written to communi_cssdaata.
Constant XOOPS_DB_PASS written to communi_css156.
Constant XOOPS_DB_NAME written to communi_comcss.
Failed writing constant 0.
Constant XOOPS_GROUP_ADMIN written to 1.
Constant XOOPS_GROUP_USERS written to 2.
Constant XOOPS_GROUP_ANONYMOUS written to 3.
Failed writing constant 1.

Configuration data has been saved successfully to mainfile.php."

then the next message is

"CHECK DATABASE

Could not connect to the database server.

Please check the database server and its configuration."

Any further ideas would be very welcome.

Thanks Jen

7
jenrose
Re: Installation Error - Unable to connect to database
  • 2005/6/1 20:16

  • jenrose

  • Just popping in

  • Posts: 17

  • Since: 2005/3/10


Still cannot install.

Can anyone please tell me what "Failed writing constant" means?

Jen

8
jenrose
Re: Installation Error - Unable to connect to database
  • 2005/6/2 0:03

  • jenrose

  • Just popping in

  • Posts: 17

  • Since: 2005/3/10


Gave up and uninstalled XOOPS 2.1.1 and installed XOOPS 2.0.10. Worked like a good dream. Installation successful.

9
m0nty
Re: Installation Error - Unable to connect to database
  • 2005/6/2 0:25

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


that must have been 1 of the 1st nightly releases of 2.1.1 you installed.. the current nightly has been fixed for those failed constants..

2.1.1 is only an alpha version and has many bugs yet and is not completely finished, so in essence you are better off with 2.0.10 anyway.. the estimated final version of 2.1 is for the end of this month and will be released as 2.2 once it's stable..

Login

Who's Online

146 user(s) are online (79 user(s) are browsing Support Forums)


Members: 0


Guests: 146


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits