Internal Server Error only on One Page?
-
From time to time I get an Internal Server Error when trying publish a page. This morning I am getting it on this page: http://www.silverphotography.co.uk/wordpress/coverage-only-print-order-form/.
I’ve tried deactivating ALL plugins – made no difference.
I tried publishing blog posts and other pages and they were fine.
This page has a form in it so I tried my contact page, which also has a form (same plugin) and it was fine.
My host (Dataflame) says it worked fine on his computer and that the problem is at my end.
Can anyone tell me why I might get an error like this on just one page?
-
You are getting a 500 error, correct? Those can be tough. A bad rule in an .htaccess file is my preferred way of producing them 🙂 but I’ve seen poorly encoded URLs trigger them. And I am sure there are many other reasons.
I tried to submit your form but I got an uninteresting “failed to send” message. I did not get a server error. Does you host have server logs you can look at?
Thanks for the reply. The forms worked fine yesterday on http://www.silverphotography.co.uk/wordpress/contact/ and the oage above – that is a new issue!
My log is pretty extensive – it appears that there is a bit of an issue! Here are the last few entries:
[Tue Jun 26 14:33:51 2012] [error] [client 81.107.152.189] File does not exist: /home/silvffjw/public_html/index.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/post.php?post=493&action=edit
[Tue Jun 26 14:33:51 2012] [error] [client 81.107.152.189] File does not exist: /home/silvffjw/public_html/index.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/post.php?post=493&action=edit
[Tue Jun 26 14:33:51 2012] [error] [client 81.107.152.189] File does not exist: /home/silvffjw/public_html/index.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/post.php?post=493&action=edit
[Tue Jun 26 14:33:51 2012] [error] [client 81.107.152.189] File does not exist: /home/silvffjw/public_html/index.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/post.php?post=493&action=edit
[Tue Jun 26 14:33:51 2012] [error] [client 81.107.152.189] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/silvffjw/public_html/wordpress/wp-admin/post.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/post.php?post=493&action=edit
[Tue Jun 26 14:33:51 2012] [error] [client 81.107.152.189] File does not exist: /home/silvffjw/public_html/index.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/post.php?post=493&action=edit
[Tue Jun 26 14:33:51 2012] [error] [client 81.107.152.189] File does not exist: /home/silvffjw/public_html/index.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/post.php?post=493&action=edit
[Tue Jun 26 14:33:51 2012] [error] [client 81.107.152.189] File does not exist: /home/silvffjw/public_html/index.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/post.php?post=493&action=edit
[Tue Jun 26 14:31:58 2012] [error] [client 81.107.152.189] File does not exist: /home/silvffjw/public_html/index.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/post.php?post=18&action=edit
[Tue Jun 26 14:31:58 2012] [error] [client 81.107.152.189] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/silvffjw/public_html/wordpress/wp-admin/load-scripts.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/post.php?post=18&action=edit
[Tue Jun 26 14:30:36 2012] [error] [client 81.107.152.189] File does not exist: /home/silvffjw/public_html/index.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/
[Tue Jun 26 14:30:36 2012] [error] [client 81.107.152.189] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/silvffjw/public_html/wordpress/wp-admin/load-scripts.php, referer: http://www.silverphotography.co.uk/wordpress/wp-admin/
[Tue Jun 26 14:19:16 2012] [error] [client 82.132.219.174] File does not exist: /home/silvffjw/public_html/fionawilson/404.shtml, referer: http://www.fionawilson.net/portfolio/gallery_portrait/index.htm
[Tue Jun 26 14:19:16 2012] [error] [client 82.132.219.174] File does not exist: /home/silvffjw/public_html/fionawilson/portfolio/transparent.gif, referer: http://www.fionawilson.net/portfolio/gallery_portrait/index.htm
[Tue Jun 26 14:19:07 2012] [error] [client 82.132.219.174] File does not exist: /home/silvffjw/public_html/fionawilson/404.shtml
[Tue Jun 26 14:19:07 2012] [error] [client 82.132.219.174] File does not exist: /home/silvffjw/public_html/fionawilson/favicon.ico
[Tue Jun 26 14:19:07 2012] [error] [client 82.132.219.174] File does not exist: /home/silvffjw/public_html/fionawilson/404.shtml, referer: http://www.fionawilson.net/
[Tue Jun 26 14:19:07 2012] [error] [client 82.132.219.174] File does not exist: /home/silvffjw/public_html/fionawilson/transparent.gif, referer: http://www.fionawilson.net/Just a quick update – I have managed to fix the forms by applying this fix: http://core.trac.wordpress.org/attachment/ticket/20970/20970.patch
I still have the Server error though! Any help would be appreciated!
You’ve got at least two problems that I can see.
One is that you are getting frequent “file not founds” for your site’s “index.php” and you shouldn’t be. In fact, there is an error page there: http://www.silverphotography.co.uk/index.php Have you added anything to your .htaccess file or tried to implement custom 404 pages some other way? “http://www.silverphotography.co.uk/” and “http://www.silverphotography.co.uk/index.php” should be equivalent, but they are not.
The other problem is that you are running out of memory for some operations. There are numerous posts on the forums about this. See if any of those threads helps you.
Thanks very much for getting back to me with this.
I haven’t personally added anything to my .htaccess file but the writer of my theme (Photocrati) did have access to my server to try and solve another issue – maybe he did? Anyway, here is the contents fo the htaccess file:
AuthType Basic
AuthName “Restricted Area”
AuthUserFile “/home/silvffjw/.htpasswds/public_html/passwd”# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
RewriteCond %{HTTP_HOST} ^silverphotography\.co\.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.silverphotography\.co\.uk$
RewriteRule ^/?$ “http\:\/\/silverphotography\.co\.uk\/wordpress” [R=301,L]RewriteCond %{HTTP_HOST} ^silverphotography\.co\.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.silverphotography\.co\.uk$
RewriteRule ^enquiry\.htm$ “http\:\/\/www\.silverphotography\.co\.uk\/wordpress\/enquiry\/” [R=301,L]RewriteCond %{HTTP_HOST} ^silverphotography\.co\.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.silverphotography\.co\.uk$
RewriteRule ^enquiry2013\.htm$ “http\:\/\/www\.silverphotography\.co\.uk\/wordpress\/enquiry\-2013\/” [R=301,L]This really doesn’t mean much to me I’m afraid! Maybe you can see something wrong?
As for the memory issue, I’ll take a look at that.
With regards to the missing index.php page should I do this?
“Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address). The .htaccess file is invisible, so you may have to set your FTP client to show hidden files. If you are not using pretty permalinks, then you may not have a .htaccess file. If you are running WordPress on a Windows (IIS) server and are using pretty permalinks, you’ll have a web.config rather than a .htaccess file in your WordPress directory. As stated above, copy (don’t move) the index.php file to your root directory, but MOVE (DON’T COPY) the web.config file to your root directory.
Open your root directory’s index.php file in a text editor
Change the following and save the file. Change the line that says:
require(‘./wp-blog-header.php’);
to the following, using your directory name for the WordPress core files:
require(‘./wordpress/wp-blog-header.php’); “My wordpress is installed in a separate directory -silverphotography/wordpress
OK. Here is the problem.
You have WordPress installed here: “http://www.silverphotography.co.uk/wordpress/ “. Whoever installed it, or maybe attempted to fix it, is using .htaccess rules to redirect traffic from the domain root here, “http://www.silverphotography.co.uk/”, to your WordPress installation here, “http://www.silverphotography.co.uk/wordpress/” But direct calls to “index.php”– like so, “http://www.silverphotography.co.uk/index.php”– are not being redirected. Those just fail.
Honestly, I am usually pretty sure about what to do. In this case I am not. Mostly that is because I usually get .htaccess rules wrong several times before I get one that works and I don’t want to crash your site. 🙂
First, do you have FTP access to the site? Do not use the editor built into WordPress. If something goes bad, you will not be able to get back into that built in editor to fix it, but over FTP fixing a mistake should be simple.
Second, I am not convinced that .htaccess is the best way to do this. Read over this page: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory [EDIT: Good for you! You already found it]
With regards to the missing index.php page should I do this?
Yes, I think maybe so. You will need to follow all of the instructions, not just that part though. My hesitation is that I have never installed WordPress in a subdirectory like that. I am not 100% sure if you will end up “http://www.silverphotography.co.uk/wordpress/” or “http://www.silverphotography.co.uk/”
Hoping someone else will chime in… 🙂
OK, thanks. So, do you think I should wait a bit to see if someone else can help too?
I’m starting to lose track a little bit of what I should and shouldn’t do!
Do you have FTP access to the site, or some other file access besides the code editor built into WordPress? Do you know how to use it? That is going to be critical for whatever you do.
Yes, I have no problem accessing all the files via FTP.
I believe that this is what you need to preserve your “http://www.silverphotography.co.uk/wordpress/” structure.
So…
1) Back up your database and files. Always good.
2) Rename the existing .htaccess file to something else– backup.htaccess or something
3) Create a new .htaccess as per the instructions in that link above
4) A couple of your rules concerning “enquiry” pages may need to be recreated.Good luck.
If it doesn’t work, just put back the .htaccess file that you renamed and all should be back to how it is now.
Ok, brilliant, thanks. I’ll give that a bash.
As for the index.php file that is missing, shall I go ahead and add that too as per the instructions on the same page (http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Pointing_your_home_site.27s_URL_to_a_subdirectory)
As for the index.php file that is missing…
No. I don’t think you need it. That is part of a set of instructions for doing something different.
I applied the fix you detailed above this morning and the problem seems to have gone!
Thanks very much for your help – without you I would have had absolutely no idea where to start. I really appreciate your time!
- The topic ‘Internal Server Error only on One Page?’ is closed to new replies.