Got a question about admin-ajax.php. I have a wordpress site that we got developed and a form that uses this php file. this form uses AJAX and PHP to submit to the API that we use. a applyform-page-form.php file contains the Jquery and AJAX calls. These calls utilize a custom plugin to facilitate the XML process. All of the standard WordPress add_action(); calls are processed in this plugin. The site was developed on a Linux hosting panel (hostgator) and was working great. Due to PCI compliancy issues we needed to migrate the site to a Windows IIS host. Once we moved to this host, we get an error 500 with admin-ajax.php. I am stumped on what is causing this error. I checked permissions on the folder and they are fine. The server setup seems ok, we are using the same version of PHP on the windows server, Curl is installed, Not getting any errors in the iis server logs, php server logs are pretty much useless as well.
Question is does anyone know if there are any issues with admin-ajax.php on an IIS server? I have googled for a couple days and nothing about IIS, just mainly Apache and all the answers were basically "get a new host".
Well the thing is that Wordpress use a file call .HTACCESS where it maps the routes for events and request, so, what is hapend here is that you call admin-ajax.php from somewhere that has no "ROUTE", and that is why you have an error 500, but is just because the wordpress is trying to find something that it cand reach.
Try to use the full path to this file.
Related
I have created a Cloud9 Environment on my Amazon Linux 2 EC2 Server used for a PHP development website, which also has Apache (httpd) installed for the live version of the website both currently use the exact same files and code.
On my Cloud9 Environment I am receiving an undefined index error when trying to access POST data from a form however on the live website the form works as expected with no errors and I can access the POST data from the form.
I'm unsure of what could be causing the issue, as far as I'm aware these environments will the same /etc/php.ini file configuration.
These are the versions installed on my EC2 server.
PHP 5.4.16
Apache 2.4.46
On the Cloud9 environment - I can see that the POST request was successful and that the POST variables have been returned in developer tools under the network tab, but I still receive the error on the page and cannot access the variables.
POST SUCCESSFUL
Is there any reason why the Cloud9 php web server environment would not allow these $_POST variables to be accessed?
Any help or suggestions are massively appreciated, I have been scratching my head at this for hours on end.
Also let me know if you would like me to post the code of the form, however it is just a basic form with one input field which obviously works on the live environment without any issues.
Cheers,
Joab
The issue was resolved by uninstalling PHP 5.4.16 and installing PHP 7.4
guys i have a PHP Script and i install it on Direct admin and i got this error
i have try change php version but its dont work
but i install this script on other host but in cPanel and its work fine
This page isn’t working avesk.net is currently unable to handle this request. HTTP ERROR 500
I'm not a professional. Explain a little simple what to do
why ? anyone can help me?
In DirectAdmin
There are several possible causes for receiving 500 error.
If you migrated your account from cPanel to DirectAdmin, check in public_html your .htacces file and remove everything that was created by cPanel, there is usually a comment before and after the code stating that this part was created by cPanel.
PHP version. Try to use in DirectAdmin the same version of PHP(cPanel) if possible.
Log in to DirectAdmin (at the user level)
If your server works with php-fpm, just below the domain name, there will be an option to change the PHP version of your account.
If your server work with CloudLinux, find the "Extra Features" menu and then "Select PHP Version". In this case you can change the version of PHP you want to use, and enable / disable PHP extensions (often a disabled extension can cause error 500).
If you have root access to the server, it is very likely that you will find some information in the log.
tail /var/log/httpd/domains/yourdomain.com.error.log
===
Regards
I’m currently running a wordpress IIS server for site hosting (lets call it Web01), then running a separate IIS server for web application hosting. (Apps01)
I’m trying to utilize virtual directories on Web01 to dish out the content provided by Apps01 on my website.
So Apps01 hosts an IIS application called FileRun in an IIS site simply called “FTP”. going to http://localhost shows the application launches properly and I can login and use it just fine.
On Web01, I created a virtual directory under my main web IIS site called “ftp” as well as provided it with proper "connect as" account permissions, performed test to verify successful connections and I can expand and see the virtual directory contents etc.... When I attempt to go to http://www.example.com/ftp from Web01. It loads a page stating “ION Loader is required” however, I already have this ION Loader, loaded on Apps01 and it is functional. (as it is part of the FileRun, install). So at this point I used PHP Manager to redirect Web01 on FTP Virtual Directory to point to PHP content on Apps01 since that is where the program is located. Now I'm receiving an internal 500 error when trying to load http://www.example.com/ftp from Web01.
I check the remote PHP servers logs (Apps01) and see the following errors:
[11-Jan-2018 11:46:58 America/New_York] PHP Warning: PHP Startup: Unable to load dynamic library '\apps01\PHP\v5.6\ext\php_sqlsrv.dll' - The specified module could not be found.
in Unknown on line 0
It appears to repeat this same error but with all php modules that are trying to be accessed from the remote Web01 server.
Any thoughts? Issues appear to be happening when running php based applications via virtual directories in IIS only. I tested by creating a test.php page with simple text. If I go to example.com/ftp/test.php, content loads fine. So it appears to be spefically an issue with PHP (either something about the UNC path in the VD settings or php.ini settings that need to be changed to allow this type of access etc...) I just can't find a clear answer for this issue with online searches.
P.S.
I searched on this site and found someone with a similar issue as me. However, their solution is not a real solution and will not work for me. He stated he simply copied the contents from the remote server onto the local Web server... I need the two servers separate so each can process its own roles independently (aka I need app server to process resources for app usage and web server to process web requests etc...)
How to enable the Virtual Directory Support php?
I'm currently writing a php API returning a JSON array. On my development environment everything seems to work fine.
So it was time for us to upload it on our dedicated server. But here is the deal. While our code is perfectly working on most environments, it is not on our server.
As I'm not an expert on multi-domain sites, we decided to try cPanel WHM, to easily configure our web server. Everything seems to work well, our API default page is running perfectly, showing the correct responses when a user is not permitted. As we are using custom urls, our .htaccess seems to work as well. But here is the rub! When I'm entering a $_GET variable to enter the API by using the correct keys, the server is automatically responding a 500 internal error.
I tried to look at the apache log file, it shows a
AH02812: attempt to invoke directory as script
I directly understood it was a httpd.conf problem. I replaced ScriptAlias by Alias, as most topics were saying. Now I don't have this error on my log, but its still showing the 500 internal server error.
We are currently running on Debian 7, with the latest stable version of cPanel. Our PHP version is 5.6.
I can retreive a simple web page but not php scripts. I get the following message when trying to run a php script.
"there was a problem retreiving the XML Data. Unauthorized (401). However, I have set all of the permissions in inetpub folder to allow access. It's IIS after installing Windows 10 without any mods.
Any ideas what the problem might be?
By trial and error, I found that I needed to go into IIS Default Web Page and click authorization. I then needed to enable Windows authorization.
I can now use localhost for testing web content.