500 Internal Service Error when trying to install package

Started by jtemple042996, April 20, 2013, 10:35:56 AM

Previous topic - Next topic

jtemple042996

I've reinstalled my forum in case there was any corrupted files or similar areas. I already checked the CHMOD Permissions and put them to what they are supposed to be set at(755 for Folders, 644 for Files). I've contacted Customer Support and they said i should contact the Software Developers. The error only occurs when i try to install packages. I've tried the suggestions on several topics on this forum, they didn't help.

Chalky


Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

jtemple042996

@ChalkCat: I didnt see that one, Thanks, I'll try it!

@Colin: No server errors

MrPhil

So, everything's running fine, but when you try to install a mod you get a 500 error? See my sig > FAQs > 500 (Internal Server) Errors for a list of things that can cause this, in case you've overlooked something.

755 and 644 might not be usable for you. Depending on how your server is configured, for PHP (SMF) to write to directories or files might require 775/664 or even 777/666. Usually though, you'll get an error message that SMF can't write to _____ rather than a 500 error. Another common problem is not having a "temp" directory under Packages, although that usually doesn't give a 500 error. You say you've checked ownership -- are all files, including those just uploaded, owned by you? It's possible to run a forum with the wrong ownership of directories and files, until someone tries to upload an avatar or attachment, or you try to install a mod (when SMF tries to write/edit files). Have you tried uploading an attachment and/or an avatar, just to rule out ownership issues?

Can you tell where in the process you're getting the 500 error? Is it while trying to upload the package, or unpack it? Is it during editing of existing files? How far are you getting? Is the error while actually trying to edit (modify) the files? Is it possible that a piece of PHP code that isn't used during normal execution, such as the Package Manager, has a blank line at beginning or end? If this is happening with a fresh install that no hacker has touched (have you rechecked the last modified times?), it's unlikely to be that.

jtemple042996

Quote from: MrPhil on April 20, 2013, 12:29:59 PM
So, everything's running fine, but when you try to install a mod you get a 500 error? See my sig > FAQs > 500 (Internal Server) Errors for a list of things that can cause this, in case you've overlooked something.

755 and 644 might not be usable for you. Depending on how your server is configured, for PHP (SMF) to write to directories or files might require 775/664 or even 777/666. Usually though, you'll get an error message that SMF can't write to _____ rather than a 500 error. Another common problem is not having a "temp" directory under Packages, although that usually doesn't give a 500 error. You say you've checked ownership -- are all files, including those just uploaded, owned by you? It's possible to run a forum with the wrong ownership of directories and files, until someone tries to upload an avatar or attachment, or you try to install a mod (when SMF tries to write/edit files). Have you tried uploading an attachment and/or an avatar, just to rule out ownership issues?

Can you tell where in the process you're getting the 500 error? Is it while trying to upload the package, or unpack it? Is it during editing of existing files? How far are you getting? Is the error while actually trying to edit (modify) the files? Is it possible that a piece of PHP code that isn't used during normal execution, such as the Package Manager, has a blank line at beginning or end? If this is happening with a fresh install that no hacker has touched (have you rechecked the last modified times?), it's unlikely to be that.
I can upload the package just fine, it when i actually try to unpack/install the the error occurs. I've read your FAQ, although it was helpful it didnt fix the issue. I verified ownership of all files, and can upload avatars.

MrPhil

Any mods already installed? I'm wondering if one of them broke the Package Manager with a misedit. Or is this the first mod you've tried installing? Is mod_security turned OFF? It's a long shot, but can cause weird problems.

jtemple042996

Quote from: MrPhil on April 20, 2013, 01:13:58 PM
Any mods already installed? I'm wondering if one of them broke the Package Manager with a misedit. Or is this the first mod you've tried installing? Is mod_security turned OFF? It's a long shot, but can cause weird problems.
This is the first modification, how would i turn off mod_security?

MrPhil

You will have to ask your host how to do it, as it varies from host to host. Sometimes they have to do it; other times, you can add a few lines in your /.htaccess file. If they're uncooperative about helping you, google around this and other places for "mod_security" and try the various .htaccess entries until you find one that works. You should have mod security OFF anyway, as it tends to interfere with SMF's function more than it helps anything, but it may have no effect on this particular problem. If it doesn't help, we'll have to dive deeper into this problem.

I would check the "last modified" dates on all your files to see if someone is hacking you, and to investigate "too recently" changed files or files that you can't account for as part of a normal SMF installation. Did you completely clean out your site when you reinstalled, or did you just overwrite the SMF files? Make sure you're regularly scanning your PC for spyware, and have a firewall, so a hacker can't easily grab passwords. It's a fair amount of work, but you might have to check your SMF .php files for blank/empty lines before the first <?php or after the last ?>.

Other than that, if you've gone through everything on the page I gave the link to, I'm drawing a blank.

jtemple042996

Quote from: MrPhil on April 20, 2013, 02:14:31 PM
You will have to ask your host how to do it, as it varies from host to host. Sometimes they have to do it; other times, you can add a few lines in your /.htaccess file. If they're uncooperative about helping you, google around this and other places for "mod_security" and try the various .htaccess entries until you find one that works. You should have mod security OFF anyway, as it tends to interfere with SMF's function more than it helps anything, but it may have no effect on this particular problem. If it doesn't help, we'll have to dive deeper into this problem.

I would check the "last modified" dates on all your files to see if someone is hacking you, and to investigate "too recently" changed files or files that you can't account for as part of a normal SMF installation. Did you completely clean out your site when you reinstalled, or did you just overwrite the SMF files? Make sure you're regularly scanning your PC for spyware, and have a firewall, so a hacker can't easily grab passwords. It's a fair amount of work, but you might have to check your SMF .php files for blank/empty lines before the first <?php or after the last ?>.

Other than that, if you've gone through everything on the page I gave the link to, I'm drawing a blank.
I'll try to contact the Hosting Support about turning off mod_security. As for how i installed the forum, i completely removed all files in the field and uploaded a fresh copy from SMF Downloads. The "last modified" dates all seem normal. If turning off mod_security does not work i will check the .php files. Thanks for your help!

Storman™

Instead of making an assumption that  mod_security is enabled you could actually check first before asking your host.

If you create a phpinfo.php file then you can check it yourself:

What is phpinfo.php ?

It's a five minute job to check so worth a look.

If it is enabled then bare in mind that if you are on shared hosting then I suspect they would be loath to turn it off. Rightly or wrongly as a host they will have chosen to enable it. If it is enabled they may well want to migrate you to a different node where it is off.


jtemple042996

Mod_security was enabled and has been disabled. Still having the issue though.

MrPhil

No mods installed, fresh unhacked copy of files -- I would say then it's got to be something with permissions or ownership, but you say you've confirmed that you're listed as owner of all directories and files, and permissions are 755/644. At worst, with those permissions, you should get a "can't write to ___" error, not a 500. If you were constantly getting the 500 error, my next step would be to look at the content of the .htaccess and php.ini files for invalid entries, but you say that this is only happening part way through a mod install.

Can you give any more details about exactly when in the "unpack/install" operations this is happening? Can you capture the output (all the messages) and post it here? That might give a clue. Did you create a "temp" directory under Packages (I don't know why it often doesn't seem to be created with the install) and give it the same permissions as Packages (NOT 777)?

Arantor

Quote(I don't know why it often doesn't seem to be created with the install)

It's never created with the install. It's created only at the point of unpacking and is removed again thereafter. Why? I have no idea. I presume it's a form of clean-up with respect to the way the unpacker works (dumps everything out of the archive to the temp folder, before running stuff or actually moving it to the right folders)

MrPhil

Well, something's wrong with that process, because people often have to be told to manually create the directory. I wouldn't be surprised if this is something left over from an ancient server, just like the Settings.php update (rewrite) that insists on emptying the file first, rather than simply overwriting it (which is a silly thing to do anyway, but that's another fight).

Arantor

Nah, it's primarily a permissions issue from what I've seen. There are ways to completely side step it but they have caveats of their own (e.g. no tar.gz support, time out issues if there's a lot of files)

* Arantor has spent great amounts of time researching alternatives ;)

winniethepooh

Quote from: Arantor on April 20, 2013, 09:34:55 PM
Nah, it's primarily a permissions issue from what I've seen. There are ways to completely side step it but they have caveats of their own (e.g. no tar.gz support, time out issues if there's a lot of files)

* Arantor has spent great amounts of time researching alternatives ;)
wow, thanks for this explanation Arantor. I've been having the cant write to___ error and the host placed a fixedfileownership file in my / directory after i brought it to their attention. i now have the issue like you mentioned where it times out ever 4 or 5 files for a few seconds. i can still upload tar.gz but not in filezilla for somereason. also chmodding never works in filezilla. host says its a server issue. i asked what that meant and the rep said it was a known problem on windows server installations. Do you think he's just feeding me a line? im fairly green with some of this stuff still(really green actually)
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Arantor

Windows servers don't support chmod because they don't use Unix style file permissions at all.

winniethepooh

Quote from: Arantor on April 20, 2013, 10:08:35 PM
Windows servers don't support chmod because they don't use Unix style file permissions at all.
I don't mean to thread jack, but is there anything i can do?
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Arantor

Not use Windows hosting?
Change the configuration in IIS if you have access to it? Failing that, get your host to make things writable?
Install mods manually?

Those are pretty much your options. FWIW, almost everyone runs SMF on Linux hosting on real servers, not Windows. It generally performs so much better.

winniethepooh

Quote from: Arantor on April 20, 2013, 10:16:56 PM
Not use Windows hosting?
Change the configuration in IIS if you have access to it? Failing that, get your host to make things writable?
Install mods manually?

Those are pretty much your options. FWIW, almost everyone runs SMF on Linux hosting on real servers, not Windows. It generally performs so much better.


with all due respect, its an 8core/32gb ram setup and  it purrs like a kitten and i pay nothing for the hosting. almost everynight it seems to go down for about 20-30 minutes roughly, around 3am.  i guess its a good time for me to start manually installing mods, expanding horizons i guess. And about your windows comment, yes i love and prefer Linux due to its high performance, security and compatability, but  all the freehosting services that operate on linux seem to have limited databases, connections per hour etcetera, where as this is a wideopen connection with a databse up to 100mb. no other free host offers that. the cpanel and ftp (as well as the chmodding you mentioned) limitations can be frustrating at times though. thanks for your input Arantor. Its always nice to have an expert opinion. you wouldn't happen to know how to setup a lamp install with webpuppy would you? i know very little about the terminal in linux. i
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Arantor

Quotewith all due respect,

With all due respect, what you have to say is actually irrelevant at this point in time.

Give the same hardware, a Linux server will run SMF better than a Windows server will.

Quotebut  all the freehosting services that operate on linux seem to have limited databases, connections per hour etcetera

That's because Linux allows them to properly lock such things down without too much hassle. You get exactly what you pay for.

I pay for my hosting and I'm *very* happy with it. Being on a VPS I have a lot of flexibility, including the ability to set whatever limits I want on such things.

If you don't know how to use a terminal in Linux, either learn or get a separate package like cPanel to do it for you.

winniethepooh

Quote from: Arantor on April 20, 2013, 10:52:58 PM
Quotewith all due respect,

With all due respect, what you have to say is actually irrelevant at this point in time.

Give the same hardware, a Linux server will run SMF better than a Windows server will.

Quotebut  all the freehosting services that operate on linux seem to have limited databases, connections per hour etcetera


Yes, but Linux will eat up the ram alot better per connection. The reason its faster is due to the multithreading support, or so i heard. And im glad to hear that your hosting is happy. right  now im just testing the waters and getting used to operating websites. should i ever need to upgrade, i might ask you for a recommendation on a host. i've heard in-motion was good.
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Arantor

QuoteYes, but Linux will eat up the ram alot better per connection. The reason its faster is due to the multithreading support, or so i heard. And im glad to hear that your hosting is happy. right  now im just testing the waters and getting used to operating websites. should i ever need to upgrade, i might ask you for a recommendation on a host. i've heard in-motion was good.

Says who? Depends on the application and how it's configured. Badly configured, sure, but that's only to be expected. But stick nginx and PHP-FPM on there and it'll fly well beyond IIS+PHP-SAPI's limits. Or even Apache/Windows+PHP-SAPI.

You realise that you can get multi-threaded support on Windows too, right? But it's nothing to do with that.

For given scenarios, yes, you're correct. For the broader generalities, you're clutching at straws and should probably go read up on this stuff.

winniethepooh

Quote from: Arantor on April 20, 2013, 11:38:15 PM
QuoteYes, but Linux will eat up the ram alot better per connection. The reason its faster is due to the multithreading support, or so i heard. And im glad to hear that your hosting is happy. right  now im just testing the waters and getting used to operating websites. should i ever need to upgrade, i might ask you for a recommendation on a host. i've heard in-motion was good.

Says who? Depends on the application and how it's configured. Badly configured, sure, but that's only to be expected. But stick nginx and PHP-FPM on there and it'll fly well beyond IIS+PHP-SAPI's limits. Or even Apache/Windows+PHP-SAPI.

You realise that you can get multi-threaded support on Windows too, right? But it's nothing to do with that.

For given scenarios, yes, you're correct. For the broader generalities, you're clutching at straws and should probably go read up on this stuff.
You don't have to be so condescending about it. I'm just repeating what i've gleaned from reading etcetera. I'm far from an expert, and i don't claim to be.
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Arantor

That's the thing, all the time you're parroting misinformation, I need to do something to make you wake up and realise that you're parroting misinformation. Gentle correction already has shown not to work

winniethepooh

Quote from: Arantor on April 20, 2013, 11:52:54 PM
That's the thing, all the time you're parroting misinformation, I need to do something to make you wake up and realise that you're parroting misinformation. Gentle correction already has shown not to work
i didn't parrot any misinformation. i offered my advice, what i thought to be right and i was proven wrong. there was no gentle correction on your part. you have a knack for being contrary. i don't mind you being blunt i just wish you wouldn't be so insulting about it, thats all. you were a n00b once too
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Arantor

I tried gentle correction in other topics, that didn't work.

Oh, yes, I was a noob once, but I was a noob who figured things out for myself and didn't go around forums repeating what I wasn't sure about...

MrPhil

Quote from: winniethepooh on April 21, 2013, 01:01:22 AM
i offered my advice, what i thought to be right and i was proven wrong. there was no gentle correction on your part. you have a knack for being contrary. i don't mind you being blunt i just wish you wouldn't be so insulting about it, thats all. you were a n00b once too

Heh, heh. Ran into the Arantor buzzsaw, did you? Welcome to the club!

Storman™

......and it's all gone very much off topic lol 

Back to the topic peeps otherwise it's not fair on the topic starter  ;)

winniethepooh

Quote from: Arantor on April 21, 2013, 11:10:56 AM
I tried gentle correction in other topics, that didn't work.

Oh, yes, I was a noob once, but I was a noob who figured things out for myself and didn't go around forums repeating what I wasn't sure about...

i figure things out for myself too. and yes, you did going around spoutin thiings, off and you had someone to correct you everytime im sure. youre no jesus so get off your crosss.
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Arantor

Quoteand yes, you did going around spoutin thiings, off and you had someone to correct you everytime im sure

You mean back in 2003 when I started learning PHP, I didn't have regular internet access... bit hard to post on forums without that.

Deaks

guys play nice now, this doesnt help the OP does it :P

However what its worth winnie, ive been around here for years and I have seldom seen Arantor post incorrect info.

But lets drop it, and help the OP yeh? good
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

winniethepooh

Quote from: Runic on April 21, 2013, 04:31:33 PM
guys play nice now, this doesnt help the OP does it :P

However what its worth winnie, ive been around here for years and I have seldom seen Arantor post incorrect info.

But lets drop it, and help the OP yeh? good

im having the same(or similar) issue as the OP. why im here in the first place
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Storman™

Quoteim having the same(or similar) issue as the OP. why im here in the first place

Golden rule is you start your OWN topic, the issue may be similar but cause may be different due to your own set-up.

Hijacking another person's topic is not on.

End of.

winniethepooh

Quote from: Storman™ on April 21, 2013, 05:59:30 PM
Quoteim having the same(or similar) issue as the OP. why im here in the first place

Golden rule is you start your OWN topic, the issue may be similar but cause may be different due to your own set-up.

Hijacking another person's topic is not on.

End of.
Ok
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Advertisement: