1
Asskicker
mainfile.php changes
  • 2005/1/2 7:57

  • Asskicker

  • Just popping in

  • Posts: 21

  • Since: 2004/12/22


i`ve done few changes in mainfile.php and something went wrong, cannot open any page and didn`t make back up of the file. Now domain shows following:

This page cannot be displayed.
Error [Xoops]: Unable to connect to database in file class/database/databasefactory.php line 34

How can i return original settings of mainfile.php or rebuild it?

2
hervet
Re: mainfile.php changes
  • 2005/1/2 8:11

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


you can use the mainfile.dist.php

3
wtravel
Re: mainfile.php changes

Make a copy of mainfile.dist.php, rename it to mainfile.php and redefine the mainfile values manually. Then upload it and chmod to 444.

Regards,

Martijn

4
Asskicker
Re: mainfile.php changes
  • 2005/1/2 8:28

  • Asskicker

  • Just popping in

  • Posts: 21

  • Since: 2004/12/22


unfortunately it didnt help ...anything else i can do?

i`ve checked line 34, it says:
trigger_error("Unable to connect to database", E_USER_ERROR);

5
hervet
Re: mainfile.php changes
  • 2005/1/2 8:33

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Your database server is off or you ISP is now using Php5.
Ask him

6
Asskicker
Re: mainfile.php changes
  • 2005/1/2 8:42

  • Asskicker

  • Just popping in

  • Posts: 21

  • Since: 2004/12/22


database is on. Server was working 15 mins ago. One big mistake i`ve made is:
when i`ve damaged mainfile.php i did manual update from 2.07.3 to 2.09.2 , as mainfile.php exist there also. So i`ve rewritten the mainfile.dist.php and mainfile.php with the rest of the files. I`ve hoped that it will solve the problem.
I cannot go through another reinstallation of xoops, is there something else i can do?

7
irmtfan
Re: mainfile.php changes
  • 2005/1/2 8:55

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


what is your "few changes in mainfile.php"?
do you write db_name db_user and db_pass correctly?

8
wtravel
Re: mainfile.php changes

If the database is on and the PHP configuration did not change, I would just download a new package of 2.0.9.2 and work on the mainfile.php file manually and upload it again.

It should work.

Martijn

9
danielh2o
Re: mainfile.php changes
  • 2005/1/2 10:23

  • danielh2o

  • Just popping in

  • Posts: 47

  • Since: 2004/10/19


I'd similar accident in mainfile.php when upgrade from 207 -> 2073...

You can solve it without complete reinstallation, just download the patch for 2073->2092 from XOOPS again, unzip, edit mainfile.php to
re-define all those valuable (e.g. XOOPS_ROOT_PATH etc), and then upload your corresponding/damaged file(s) to your server.

ps: if you dont know those values, you may refer to your current damaged mainfile.php for reference, of coz, not refer to your own damaged changes ;-P


Quote:

Asskicker wrote:
database is on. Server was working 15 mins ago. One big mistake i`ve made is:
when i`ve damaged mainfile.php i did manual update from 2.07.3 to 2.09.2 , as mainfile.php exist there also. So i`ve rewritten the mainfile.dist.php and mainfile.php with the rest of the files. I`ve hoped that it will solve the problem.
I cannot go through another reinstallation of xoops, is there something else i can do?

10
Asskicker
Re: mainfile.php changes
  • 2005/1/3 8:11

  • Asskicker

  • Just popping in

  • Posts: 21

  • Since: 2004/12/22


Solved. Thank you all so much!

Login

Who's Online

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


Members: 0


Guests: 250


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