1 jack376 Aug 31, 2008 15:29
3 jack376 Aug 31, 2008 16:10
I was in the middle of a post. As soon as I hit "save" my site went down giving me the standard website cannot be found page. But it wasn't until later that when I went to my url, it was just a blank white screen, not even the page cannot be found page. It's very strange. I have not done anything to the code for the past few weeks (and even that was so minor, just adding a gif image to the sidebar) and has worked flawlessly until Friday evening.
Any thoughts? Thanks again in advance.
4 yabba Aug 31, 2008 16:12
ok, try this, crack open /conf/_config.php and add this line just below the opening <?php
ini_set('display_errors', 'on' );
Then revisit your page and see if you get any error messages
¥
5 jack376 Aug 31, 2008 16:43
Just did it, it shows this now:
Warning: require_once(/home/jack376/public_html/conf/_basic_config.php) [function.require-once]: failed to open stream: Permission denied in /home/jack376/public_html/conf/_config.php on line 21
Fatal error: require_once() [function.require]: Failed opening required '/home/jack376/public_html/conf/_basic_config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/jack376/public_html/conf/_config.php on line 21
Thanks Yabba.
6 yabba Aug 31, 2008 16:55
Check the permissions on that file ( conf/_basic_config.php ), and possibly the ownership ..... and I'd also be taking a look at the contents of that file as well to make sure they haven't been changed ;)
¥
7 jack376 Aug 31, 2008 23:30
Hi there,
I'm not sure what even to look at. The username, password and mysql database names are are consistent. plus, no one would have changed it other than me and i didn't.
I also tried to update the entire /conf directory with a backup that I did a while ago, still nothing coming up.
I replaced the _config.php file w/ the extra line code you suggested for now. Do you or any other person have any other suggestions? Should I just consider re-installing b2?
8 jack376 Sep 01, 2008 00:29
Also, I just re uploaded the main directory files (index.php, etc) as well as the files in the /conf directory from a back up I did a couple of weeks ago. Nothing happens as well. I'm beginning to think this is not b2 related. Could there be a server setting that may affect this? Keep in mind that 2 other sites are working on this same server, one of which is a WP install.
Thanks in advance for the suggestions.
9 ianlewis Sep 01, 2008 03:08
It looks like the _basic_config.php file is not readable by your webserver. You should probably set the file to be owned by your user and have permissions like 644 (Owner: read/write, Group: read, Other: read). After you change the permissions, the unix permissions string should look something like like -rw-r--r--
I have noticed on my provider that sometimes the user that the apache webserver runs php as sometimes changes to something like nobody:nobody rather than my user (very annoying). Something like that may have changed on your site.
10 jack376 Sep 01, 2008 04:02
Ian! Thank you very much! That was exactly it! I changed the permissions and all went back to normal. It's very weird as well because I never touched the permissions in the first place. Is this something that the server does by itself sometimes or maybe the hosting company was messing with it?
Thanks also to Yabba for helping me out at the beginning. I appreciate it!
11 jack376 Sep 01, 2008 17:14
Just as I thought all was well, I am having trouble uploading images from the "files" button to my server.
It gives this message:
Warning: move_uploaded_file(/home/jack376/public_html/media/blogs/a/cycling/uschamp.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/jack376/public_html/inc/files/upload.ctrl.php on line 334
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpDVhIJx' to '/home/jack376/public_html/media/blogs/a/cycling/uschamp.jpg' in /home/jack376/public_html/inc/files/upload.ctrl.php on line 334
Warning: Cannot modify header information - headers already sent by (output started at /home/jack376/public_html/inc/files/upload.ctrl.php:334) in /home/jack376/public_html/inc/_core/_template.funcs.php on line 133
Warning: Cannot modify header information - headers already sent by (output started at /home/jack376/public_html/inc/files/upload.ctrl.php:334) in /home/jack376/public_html/inc/_core/_template.funcs.php on line 136
Is this a permissions problem as well? If so, which directory and/or file do I change?
The upload.ctrl.php and the _template.funcs.php have 644 on it. Should this be different?
I can see the existing images in the folder but just can't upload.
Thanks in advance for any help.
12 waltercruz Sep 01, 2008 17:53
you should have a write permission on the media folder.
13 jack376 Sep 01, 2008 18:00
The folder is 777 and the sub directory of the blog is 775 so I believe it is writable. Should this be something else?
Thanks in advance.
14 yabba Sep 01, 2008 21:15
If safe mode is enabled then yer screwed, if modsuphp is enabled then you can't use 777 .... ish.
¥
15 jack376 Sep 01, 2008 21:30
I checked my php configurations through cpanel and it says safe mode is off. I'm assuming this is where you check it? Forgive, still a rookie with this.
What is modsuphp?
Thank you.
16 yabba Sep 02, 2008 10:52
That's certainly one place you can check. Modsuphp is a server mod that allows php to run as your user instead of nobody|apache and means that you can lower permissions on files and folders, typically to 0755 ( although a lot of mine are 0700 ).
If you were able to upload images before then I'd be asking your hosts what configuration changes they've made recently ;)
¥
17 jack376 Sep 03, 2008 23:45
I just finally got word from my host about what happened. Apparently, there was an attack and they had to change a bunch of configurations, one of which is the disabling of the php mail function. They tell me I should use SMTP, will look at swift smtp.
In regards to modsuphp, it's disabled. What does that mean in terms of what I need to set my permissions to?
Thanks again.
18 yabba Sep 04, 2008 17:16
If modsuphp was enabled then they wouldn't have gotten bitch slapped by a hacker and all your files could be reduced to minimal permissions.
Personally I wouldn't even consider a server that wasn't running it.
Without suphp you either need to open yourself to the world by changing your perms to 0777 or, if apache owns the file/folder then you can drop your perms to 0755, but it's a pretty pointless exercise.
¥
19 jack376 Sep 05, 2008 05:06
I asked my they disabled modsuphp, they said they were having issues with the server so they disabled it. They are aware of the security risks but have alternative options. Should I be worried?
20 afwas Sep 05, 2008 05:17
No need to worry, most shared hosts have modsuphp disabled.
Good luck
What did you do just before it stopped working?
¥