I'm facing some weird problems when trying to view my Wordpress website via Plesk site preview.
The preview url looks as follows:
http://xxx.xxx.xxx.xxx/plesk-site-preview/example.com/xxx.xxx.xxx.xxx/
I already changed the base url of Wordpress (Settings -> General) to the url above.
Now, when accessing the url I can see the home page. But when I try to access any subsite, it results in an redirect loop:
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error.
When I try to access http://xxx.xxx.xxx.xxx/plesk-site-preview/example.com/xxx.xxx.xxx.xxx/wp-admin/, I get an 502 Bad Gateway error.
The only way I was able to get it working properly was to set the servers ip in my /etc/hosts file to example.com. But thats not an option because I have to send the preview url to my client and it should work out of the box.
Unfortunately I don't have access to the Website Preview Settings mentioned in Oleg's answer.
But I found a workaround using xip.io.
Simply create a domain alias called
example.com.xxx.xxx.xxx.xxx.xip.io
within Plesk and you're able to access the website without setting up any DNS records. I don't know why, but without the domain alias it hasn't worked.
Set preview mode to "Quick Preview on a domain name in Plesk" with some domain which can be resolved
https://:8443/admin/server/preview-domain-settings
You will get url like:
http://example.tld.10-52-80-183.a10-52-80-183.qa.plesk.ru/
Set this url in WordPress settings.
I'm using a shared hosting service for my sites and there is a strange situation.
When any php page is accessed from a link (like Google search results page, etc), the page will not open.
The following error is shown:
"Forbidden you don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."
If the same url is input directly into the browser, the page displays fine.
The situation is not the same for html extension pages, which open properly from links too.
I am not using any .htaccess file.
Permission for files is 644 (I've never changed anything).
This situation is something new, there was not such a problem in the past.
Any advice is welcome.
I am new to wordpress website development technology. I have created my website http://www.jhamobi.com. For this website I am using pagelines theme (http://wordpress.org/themes/pagelines). So far so good. But when I am opening https://www.jhamobi.com (secure website) , I am getting display error. Though, http://www.jhamobi.com is displaying properly. I am getting this error on chrome and firefox. It is coming properly on safari. Let me guide where I am going wrong. I have cleared cache on chrome. Do I need to change theme? Do I need any wordpress plugin.
The issue is occurring because you are including non-secure files on a secure page. Looking at Firefox's Error Console, you can see a list of the files that are being blocked.
Timestamp: 9/13/2013 6:01:10 PM
Error: Blocked loading mixed active content "http://www.jhamobi.com/wp-content/uploads/pagelines/compiled-css-1379114912.css"
Source File: https://www.jhamobi.com/
Line: 0
It looks like compiled-css-1379114912.css is the file associate with the layout styles and that's why the site is showing up all over the place. To fix this issue just remove all protocol/domain information and leave only the absolute path:
Example:
Instead of
'http://www.jhamobi.com/wp-content/uploads/pagelines/compiled-css-1379114912.css'
Use
'/wp-content/uploads/pagelines/compiled-css-1379114912.css'
* This will be done in the templates header file (for css and some js) and the footer for the js. The file name will probably look something like /compiled-css-".time().".css
I have created a new Page in Wordpress. On this page, I have put the following HTML code:
Please click this link to view the details.
statistics.php has the code to query the backend MySQL database, fetch the details and display in a table format.
however, when I click the link on the Wordpress Page I get a 403 forbidden message.
Forbidden
You don't have permission to access /blog/wp-content/themes/twentytwelve/statistics.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I have tried setting the permissions of the PHP file to both, 644 and 755. Error still persists.
I have even tried putting a simple code like this in the PHP file:
<?php echo "welcome"?>
Even then, the same 403 forbidden error.
Now, I have another page on this Wordpress Site. In that page I have an HTML Form that sends a POST request to a PHP file called process.php which is present in the same directory as statistics.php. That page works properly.
So, I tried replacing the URL in my new page from statistics.php to the process.php. That does not give a 403 forbidden error.
Why is it that I am unable to access one PHP file from my wordpress page? Am I allowed to link only to one external PHP file from wordpress page?
both statistics.php and process.php have the same permissions. However, while one page is able to easily access process.php, the other page gives an error for statistics.php.
Help would be much appreciated.
Thanks.
The directory you have your script under is not readable and neither should it be. It is used by wordpress to store the themes, and this directory can only be read by wordpress in order to output the theme to the front end.
Try placing your scripts in a directory which is not controlled/needed by WordPress. i.e., on your public root, create a new readable directory and place under that directory whichever scripts you need.
I have one form in a PHP (5.2.9-1) application that causes IIS (Microsoft-IIS/6.0) to throw the following error when POSTed:
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
It's an HTTP 405 status code. All other forms in the application work, so I believe that the IIS 'verbs' setting for PHP pages is correct.
This is a customer's server, which I have no access to for verifying settings or testing code. All I can do is send the customer replacement files. Other customers on IIS servers have no such issue.
The form is perfectly straightforward:
<form method="post" action="index.php">
... fields ...
</form>
What can cause IIS to throw that error on one form only, but work fine on others?
I managed to get FTP access to the customer's server and so was able to track down the problem.
After the form is POSTed, I authenticate the user and then redirect to the main part of the app.
Util::redirect('/apps/content');
The error was occurring not on the posting of the form, but on the redirect immediately following it. For some reason, IIS was continuing to presume the POST method for the redirect, and then objecting to the POST to /apps/content as it's a directory.
The error message never indicated that it was the following page that was generating the error - thanks Microsoft!
The solution was to add a trailing slash:
Util::redirect('/apps/content/');
IIS could then resolve the redirect to a default document as is no longer attempting to POST to a directory.
I am deploying VB6 IIS Applications to my remote dedicated server with 75 folders. The reason I was getting this error is the Default Document was not set on one of the folders, an oversight, so the URL hitting that folder did not know which page to server up, and thus threw the error mentioned in this thread.
The acceptable verbs are controlled in web.config (found in the root of the website) in <system.web><httpHandlers> and possibly <webServices><protocols>. Web.config will be accessible to you if it exists. There is also a global server.config which probably won't. If you can get a look at either of these you may get a clue.
The acceptable verbs can differ with the content types - have you set Content-type headers in your page at all ? (i.e. if your Content-type was application/json then different verbs would be allowed)
By any chance have you tried POST vs post? This support article suggests it can cause problems with IIS: http://support.microsoft.com/?id=828726
I don't know why but its happened when you submit a form inside a page to itself by the POST method.
So change the method="post" to method="get" or remove action="anyThings.any" from your <form> tag.
It sounds like the server is having trouble handling POST requests (get and post are verbs). I don't know, how or why someone would configure a server to ignore post requests, but the only solution would be to fix the server, or change your app to use get requests.
We just ran into this same issue. Our Cpanel has expanded from PHP only to PHP and .NET and defaulted to .NET.
Log in to you Cpanel and make sure you don’t have the same issue.
I had this issue with a facebook application that I was developing for a fan page tab. If anyone faces this issue with a facebook application then
1-goto https://developers.facebook.com
2-select the application that you are developing
3-make sure that all the link to your application has tailing slash /
my issue was in the https://developers.facebook.com->Apps->MYAPPNAME->settings->Page Tab->Secure Page Tab URL, Page Tab Edit URL, Page Tab URL
hope this will help
As drewm himself said this is due to the subsequent redirect after the POST to the script has in fact succeeded. (I might have added this as a comment to his answer but you need 50 reputation to comment and I'm new round here - daft rule IMHO)
BUT it also applies if you're trying to redirect to a page, not just a directory - at least it did for me. I was trying to redirect to /thankyou.html. What fixes this is using an absolute URL, i.e. http://example.com/thankyou.html
i had to change my form's POST to a GET. i was just doing a demo post to an html page, on a test azure site. read this for info: http://support.microsoft.com/kb/942051
An additional possible cause.
My HTML page had these starting tags:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
This was on a page that using the slick jquery slideshow.
I removed the tags and replaced with:
<html>
And everything is working again.