My php page is blank when I upload it to my server and navigate to it in a browser.
<form action="welcome.php" method="get">
<input type="text" name="name" placeholder="enter first and last name" >
<br />
<input type="image" value="Submit" id="submit"/>
</form>
On the welcome.php page:
$fullName = $_GET['name'];
$firstName = explode(' ',trim($fullName));
<h2>Welcome <?php echo $firstName[0] ?>!</h2>
SOLVED. Permissions issue. php file needed to be 644
, not 666
.
The Problem: <!– SHTML Wrapper – 500 Server Error –>
This is a silly bluehost error. Typically related to file permissions. See here: http://www.bluehostforum.com/showthread.php?11101-SHTML-Wrapper-500-Server-Error-moving-to-a-new-box-helps
Just make sure that your file does not have "world write" permission.
Try checking your server's apache log file. This should give you some indication to the server error if any.
If you do not have access to the error log add this to the top of your php file, it will show any errors on the page you are viewing.
error_reporting(E_ALL);
ini_set('display_errors', 1);
viewing the source code, you have an internal server error (500). Googling the error, you have wordpress(?) or this affects it.
<!– SHTML Wrapper – 500 Server Error –>
According to this guide, it's a problem with PHP CGI and you need to fix it in your host' panel, or manually via the terminal.
One of the easiest solutions is enabling FastCGI from cpanel PHPConfig. Just enable it and everything will work.