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
Related
I am working on a React web app with npm for the first time. I'm done with the development and now putting the built package on the web server (bluehost).
All is working well on my Mac: the web app allows getting data from mySQL via php, and posting back to the database.
But when I try the same app (on the same URL, same server, script, same everything...) on my Windows machine, I get an error on the first http request used for authentication.
OPTION http://example.com/script.php net::ERR_CONNECTION_REFUSED
First I thought this was a browser issue.
But I don't get the error on Chrome on my mac but do on Chrome on my Windows, as well as FireFox.
Again, I do not get this error when I test the app on my mac.
Could anybody please give me some direction to solve this?
Thank you!
I have deployed my website from Live server to local machine with the purpose of making some changes in local server before go to live.
I have done all the activities related to deployment like get all the files and folders through ftp and import live database into the local phpmyadmin, even i did database configuration also.
After doing all these steps My website is running properly on local server, But i got some Notice error in all the pages regarding undefined variable.
What type of activities i have to do for removing all Notices.
Even i don't know this website in which framework or on which CMS or in core php.
Could you please tell me this website (www.engageguru.com) on which php framework and what type of activities i have to do for removing all Notices Undefined variable.
Thanks
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.
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.
I have written some custom webservices to communicate with Infusionsoft. I want to fetch the Custom Field from Infusionsoft on the basis of EmailId.
I have used following SDK to fulfill my requirements: https://github.com/infusionsoft/PHP-iSDK
The issue is that when I test my code in my local machine it runs fine. My local machine contains Windows 7 and wamp server.
But when I deploy it on my cloud server that is based on Ubuntu. it doesnt work. I have already installed apache server on ubuntu..
I have put some debug points in isdk.php file within some functions.. These are the logs from them on each machine:
Local Machine - Windows 7:
In Find By Email Method
***In method caller***
Response From Call: Array
Custom field from Infusionsoft: 20130803T07:46:03
Cloud Server - Ubuntu:
In Find By Email Method
***In method caller***
Response From Call: 0
It seems it gets connected successfully to Infusionsoft but it doesnt return output properly. I have used same request parameters on both.
What I am missing here?? Is it something to do with xmlrpc?? I have placed the xmlrpc directory on ubuntu as well.. but it didnt worked out...
Any quick response would be appreciated.
Thanks
Zunair
Since you did not provide your version of PHP I can only tell you to check your PHP versions and make sure the ubuntu server is at least 5.3.
Print out your response you get from infusionsoft, it should be in the form of an array object and you might have a different message. Perhaps a throttling issue. It looks like the response you are printing out is just some variables you are echoing.
The last thing I can think of to check is the location of the ubuntu machine. If I recall correctly infusionsoft has some groups of IPs blocked from accessing the API. I doubt this is your issue but it is a possibility.
Thanks guys for your response.. I got it working..
The first issue was that infusionsofts logs were not working for me... I did fixed them first and they showed me what was the actual reason..
They were using curl for sending the requests.. In my local machine curl was installed and in ubuntu I didnt have it with me... So, I installed it there.. and then it came back to life.. :)