News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

HTTP 500 Internal Server Error on search...

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

Previous topic - Next topic

head123

Hi,
M getting HTTP 500 Internal Server Error on searching massage.
I tried to find ERROR LOG for this, No error log was thr.
m not getting reason for this. plz provide ur help.

i m a admin user.


vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

MrPhil

Could be a lot of reasons to get this error. Start by reading my sig > FAQs > 500 (Internal Server) Errors and see if you can rule out some of the reasons.

head123

 vbgamer45 : getting error on msg search. On Simple search and advance search.

head123

Also i set file permission to 777 to all directories of smf. Location of smf directory is = /usr/local/apache/htdocs/smf . and root user is owner

Storman™

Have you ruled out what MrPhil suggested ?

QuoteCould be a lot of reasons to get this error. Start by reading my sig > FAQs > 500 (Internal Server) Errors and see if you can rule out some of the reasons.

head123

yes, i read that. and now with the help of that, i set the permission to 755 and restarted apache2 service. but :( m getting following error on each page/ any click/ any navigation/ even m not able to log out.

ERROR :attempt to write a readonly database

File: /usr/local/apache/htdocs/smf_setup/Sources/Subs.php
Line: 2624

kat

Quote from: head123 on July 10, 2013, 06:48:05 AMERROR :attempt to write a readonly database

I'd suggest that you want to have a word with your host, about that.

A "Read-only" database isn't much use, for a forum. Ask them to ensure that you have full CHOWN ownership of the files on your site, too.

head123

I debugged this, as per my study : file/directory owner is wrong... need to set CHOWN to same user as "webserver user". I think webserver will not be able to write into files.

Current status : File permissions : 644
                          Folder permissions : 755
All file/folder 's owner is root user.

tell me, Is this wrong setting.
How i set owner user same as "webserver user" ?

kat

Are you self-hosted? (Might've helped, if you'd told us, if you are)

If not, you'll need to contact your host.

Unless you're self-hosted, you can't change CHOWN settings.

head123

Quote from: K@ on July 10, 2013, 06:59:41 AM
Quote from: head123 on July 10, 2013, 06:48:05 AMERROR :attempt to write a readonly database

I'd suggest that you want to have a word with your host, about that.

A "Read-only" database isn't much use, for a forum. Ask them to ensure that you have full CHOWN ownership of the files on your site, too.


It is working before permission / owner change........


head123


head123

:)  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'.

now what to do???

kat

Quote from: head123 on July 10, 2013, 07:48:19 AMNo, but i m able to change owner.

You SEEM to be able to change owner. But, in all likelihood, you can't. It'll look like you have, though.

I still think you want to have a chat with your host, myself.

I could be wrong, of course. ;)

MrPhil

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.

Kindred

Сл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™


Kindred

yup...   when he kept referncing unwritabel database with regards to file permissions, it almost has to be.

If so -- my best suggestion is to convert to mySQL instead.
Сл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."

MrPhil

Does SQLite require 664/775 permissions? I hope it doesn't require 666/777. If it does, the rest of SMF can be left at 644/755 or 664/775 -- there's no reason they have to be all the same. It all depends on what PHP is running as (owner, in your group, or as a random "other" user), and likewise for the database system. For SMF, if 666/777 is required for PHP to write, leave only the avatars and attachments directories at that permission, and set everything else to 644/755 until you need to install a mod or do other work, and then temporarily change to 666/777.

Advertisement: