• Resolved raul_coca

    (@raul_coca)


    <Files *.ini>
    Order deny,allow
    Deny from All
    </Files>
    SetEnv PHPRC /home/website/
    <Files *.ini>
    Order deny,allow
    Deny from All
    </Files>
    SetEnv PHPRC /home/website/
    # 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

Viewing 15 replies - 1 through 15 (of 39 total)
  • Moderator James Huff

    (@macmanx)

    I don’t know, there are many valid things you could put in a .htaccess file.

    What problem are you having?

    Thread Starter raul_coca

    (@raul_coca)

    I have a 500 error, my virtual memory usage in cPanel is all over the place at 100%, and I don’t know what is the problem. In the error message that appears when entering the website there are specified 3 main reasons why this happens: htaccess wrong syntax, wrong files and folders permissions and server timeout set to a small amount of time. I didn’t make any modifications to any of these, I deactivated all plugins, but the error still exists, not on a permanent base, only once in a while, but I can’t afford to have a website running like this. The link is https://www.ziarulargesenilor.ro. I will give you the error in the error logs:

    Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/public_html/xmlrpc.php

    This one repeats on and on. I created a cron job for better optimization, but still can’t see the real problem here.

    Moderator James Huff

    (@macmanx)

    I have a 500 error

    Internal server errors (error 500) are often caused by plugin or theme function conflicts. I see you tried resetting your plugins, so try switching to the Twenty Fourteen theme to rule-out a theme-specific issue. If you don’t have access to your admin panel, access your server via FTP or SFTP, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue.

    If that does not resolve the issue, it’s possible that a .htaccess rule could be the source of the problem. To check for this, access your server via FTP or SFTP and rename the .htaccess file. If you can’t find a .htaccess file, make sure that you have set your FTP or SFTP client to view invisible files.

    If you weren’t able to resolve the issue by either resetting your plugins and theme or renaming your .htaccess file, we may be able to help, but we’ll need a more detailed error message. Internal server errors are usually described in more detail in the server error log. If you have access to your server error log, generate the error again, note the date and time, then immediately check your server error log for any errors that occurred during that time period. If you don’t have access to your server error log, ask your hosting provider to look for you.

    my virtual memory usage in cPanel is all over the place at 100%

    Could be related, or a separate issue, but definitely not a .htaccess problem.

    Cannot allocate memory

    What’s your server’s memory limit (assuming you’re on a VPS or dedicated server)?

    Pioneer Web Design

    (@swansonphotos)

    A 500 error is not your .htaccess file. It is an incorrect server env. setup.

    10.5.1 500 Internal Server Error

    The server encountered an unexpected condition which prevented it from fulfilling the request.

    https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

    Moderator James Huff

    (@macmanx)

    I have seen .htaccess configurations cause 500 errors countless times. It’s not a common cause, and usually indicative of a deeper problem elsewhere, but it’s still worth it to rule out the .htaccess file along with everything else.

    Rajesh Soni

    (@rajeshsoni)

    I would remove “blocks” / sections of lines in the .htaccess file one-by-one to find any incompatible code and see if that fixed the 500 error.

    Thread Starter raul_coca

    (@raul_coca)

    Now all runs just smooth, as it should, so the problem is hard to pinpoint.

    Thread Starter raul_coca

    (@raul_coca)

    I can try to enable gzip, maybe this would help.

    Moderator James Huff

    (@macmanx)

    Probabaly not, that’s more of a benefit for the viewer.

    On the viewer’s end, the page will be smaller, and thus will be received and loader quicker.

    On your end, the server works a tiny bit harder to compress the page before sending it.

    Hopefully everything stays stable for the rest of the day and it was just a tiny random glitch we’ll never be able to find. ??

    Thread Starter raul_coca

    (@raul_coca)

    Of course, the problem appeared again…I think I’m going mad.

    3pepe3

    (@3pepe3)

    1.- check the permission of files and folders
    2.- delete your .htaccess

    and also you must check the logs. what are the last 20 lines of your log file (you can paste the log in here : https://pastebin.com/)?

    Thread Starter raul_coca

    (@raul_coca)

    Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/site/public_html/xmlrpc.php

    This is the only error that repeats itself on and on.
    The only different line is this:

    <?xmlversion=”1.0″?><methodCall><methodName>pingback.ping</methodName><params><[Thu Nov 06 11:28:10 2014] [error] [client 80.82.78.166] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/site/public_html/xmlrpc.php

    The permissions of files and folders are as it should be, 755 for folders and 644 for files.

    You say I should delete the .htaccess from the server? I have a copy anyway. Let’s see what happens.

    Thread Starter raul_coca

    (@raul_coca)

    I deleted .htaccess and the website works again. What would be the problem then? Isn’t the .htaccess a must in order for the website to work? I know it is generated automatically if you delete it, but for now it isn’t showing up on the server.

    Thread Starter raul_coca

    (@raul_coca)

    My hosting provider has set the Virtual Memory Usage at 768 MB, he moved it up to 1024 MB for now. My website is a news website, I didn’t get that much traffic, only around 400 a day, but the website is complex, although I have bought a responsive and well built theme, which is called Newspaper from themeforest. My website is https://www.ziarulargesenilor.ro in case you missed it.

    Thread Starter raul_coca

    (@raul_coca)

    I deleted the .htaccess, but when I access an article it says

    404 Not Found

    The server can not find the requested page:
    (port 80)
    Please forward this error screen to WebMaster.

    So I put the .htaccess file back. It’s really annoying…

Viewing 15 replies - 1 through 15 (of 39 total)
  • The topic ‘My .htaccess. Is it set right?’ is closed to new replies.