Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29396

AWS EC2 Amazon Linux unable to run php files

$
0
0

I have a login/sign up page which uses a php file called registration.php to save the email/password to a RDS MySQL database. It all works on my localhost, but when I pushed the code to an Amazon Linux 2 instance, with an appspec file that has a "BeforeInstall" hook of a install_dependencies.sh file, which has the commands from this tutorial which installed apache and php.

The login/sign up file looks like this...

login.php

<? php include(registration.php) ?> 
// HTML 
// 
<form method="post" action="registration.php"> // the form 
// 
<button name="register_user">Sign Up</button> (the form and button have the same layout for both the login and sign up pages) 
// rest of HTML"

"regsitration.php" works for localhost, and for the AWS instances, I've done both "/registration.php" and the full link "https://www.website.com/registration.com". None of these three ways work for the AWS instances.

If I could pointers for how to fix this that would be much appreciated.


Viewing all articles
Browse latest Browse all 29396

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>