News:

Wondering if this will always be free?  See why free is better.

Main Menu

HTTP 500 Internal Server Error on search...

Started by head123, July 09, 2013, 10:49:19 AM

Previous topic - Next topic

Kindred

then I fail to see how changing the file permisssions woudl generate a DATABASE permission error.  That makes no sense at all, unless your host has a VERY screwy set up.

(or maybe you set the actual database files to a bad permission deep in the root of your hosting service?   Although, why you would do that, I have no idea...)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

head123

Quote from: MrPhil on July 10, 2013, 09:04:08 AM
Quote from: head123 on July 10, 2013, 07:59:40 AM
:)  resolved : ERROR attempt to write a readonly database. :) By changing the file permission to 777  with owner to daemon user (webserver user)

But, msg search in thronging 500 Internal server error. Rest all the things / search is going well.

File permission 777 is wrong thing, i wanna change it but if decrease permission i faced 'ERROR attempt to write a readonly database'.

First of all, never go blindly changing permissions to 777. They're rarely necessary, and can be a major security problem. Many servers are configured to throw 500 errors when they encounter a "world writable" file or directory (such as 777 permissions). Files should always start out 644 and directories 755. Add "write" to the group (664/775) if SMF complains it can't write to something. Go to 666/777 ONLY if it still can't write, and change it back to 644/755 as soon as you can when you're done with the mod install or whatever you're doing.

What kind of database are you using? Normally you would have no access to the database's files (.myi etc. files), so I don't know what you're doing that gives you "readonly database" errors. We need more information here about your system configuration. When you "decrease permissions", what are you changing file and directory permissions to? 644 and 755? You can try 664 and 775, but that shouldn't have any effect on a database in a normal server configuration.

I changed permission as per ur suggestions to 644-file and 755-directory Also 664-filr and 775-directory but got error:  "Database Error. Please try again. If you come back to this error screen, report the error to an administrator"
I am using mySQL.
One question: Does SMF works without any db?  .... Because i was a smf_cd5ccb554f.db file in /usr/local/apache/htdocs/smf/  ..... i couldn't find any db for SMF in mySQL

Kindred

1- you should never, ever, ever touch the database FILES unless you know EXACTLY what you are doing.
2- the database files would not be in the smf directory... they would be int he directory of your root system configured to hold the mySQL database files.
3- No.. SMF *REQUIRES* a database. mySQL is the preferred, but it supports SQLite and PostGRE
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Storman™

I would suggest you nuke the whole instance, get your host to reinstall, and then start again.

It should basically work out the box without any of the errors.

MrPhil

If this is really MySQL, you should have no way to get anywhere near the actual files in the database. They should be well protected from you, and the only way to do anything is through the server interface. Anyway, your error message "Database Error. Please try again. If you come back to this error screen, report the error to an administrator" I think is generated by SMF when it can't connect to the database for some reason. I can't look at my code until tonight to be sure. In the mean time, double check your database connection information in the Settings.php file (DB name, location, user name, user password), and make sure that file is readable (at least 444 permissions).

Oldiesmann

It sounds like you are/were using SQLite, not MySQL. SQLite uses .db files, and would give you the "read-only database" error. MySQL stores data in numerous files (usually one file per database, with additional files handling the indexes, table structure, etc.), and would say something like "Permission denied for user <user>@localhost (using password: YES)" instead.
Michael Eshom
Christian Metal Fans

head123

Now, I am doing setup from first step, before that i clear browser IE history + restarted apache2 and mysql services + deleted old installation directory + copied new one

On the 3rd step of SMF Installer : Database Setting, m getting following error 

==============================================================
Critical Error!
Cannot connect to the database server with the supplied data.
If you are not sure about what to type in, please contact your host.
unable to open database: /usr/local/apache/htdocs/forum/smf_1/smf_1c3d709289.db
==============================================================


On 2nd step : Writable check -
I only provide following details :
host:- localhost, user :-root, password:-(password of root user which is used to access this machine. i.e. login password) , installation path : /usr/local/apache/htdocs/forum/smf_1

Kindred

1- why would you ever use your root account to access the database?
2- from that installation message, it would appear that you are indeed trying to use SQLite.   Why?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

head123

1. only for full access.
2. SQLite / mySQL both are ok for me. no database specification, just wanna up the forum with its msg searching feature...

Storman™

Quoteonly for full access.

Not quite sure what you mean by that?

If you are using your root account in Settings.php to access the databse then potentially that puts the whole instance at risk should it get compromised.

QuoteSQLite / mySQL both are ok for me

Then use mySQL as SQLite is obviously giving you issues  ;)


head123

Can not select Database (MySQL).........

Hi, i am doing fresh smf installation, i found that installation not asking me for selection of database. Here are the screen shot. please check it.
And on the 3rd step i got Critical Error : unable to open database /usr/local/apache/htdocs/smf/smf_6be6604b0d.db


Before installation-- i removed old smf setup directory + deleted browser hostory   

Illori

please keep to one topic, your other thread has been locked.

if you are using a .db file you are using sqlite and it is recommended you look into using mysql instead.

Kindred

yep...   see that line that says "database filename"?
That is for SQLite.

mySQL doe snot have you define a database filename....
it asks for database name, database host, database username and password
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

head123

ok. I provided user and password of FTP. For SQLite what should i suppose to provided / or what should i suppose to do ?

head123

Do i need to install SQLite on this machine??    (MySQL is already installed.)


Kindred

the username and password for FTP is **DIFFERENT** from the database user and database password.

I don't know what choices you have made to get to that point, but you have obviously told it to use SQLite, for some reason and in some way.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

head123

So, in this case its good to proceed with SQLite. m i Right ?
If Yes, what should be next step?

Illori

no it is not good to proceed with sqlite, it has issues and restrictions. mysql is a much better option.

head123


Advertisement: