Skip to content
Advertisement

PHP page is working locally, but not on the server

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. The PHP file needed to be 644, not 666.

Advertisement

Answer

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 the “world write” permission.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement