Jump to content

PHP page blank, HTTP 500 Internal Server error


mcerveni

Recommended Posts

Try changing the

<? } ?>

at the end to

<?php }
end;
?>

*edit

I can't quite remember, it might be $end; instead...

No!

 

Its not because mcerveni left of the 'end' keyword - there is no such thing in PHP.

 

It is because mcerveni's code uses short tags. mcerveni open your php.ini and enabled a setting called short_open_tag. By default PHP does not recognise tags such as <? ?> or <?= ?>.

 

Undo what lupld told your to do.

Link to comment
Share on other sites

oh ok, well everythign works now..for now lol.

i guess php just got a little tighter with it's code.

 

i turned off display errors and everything is working.

 

thanks for everything.. i added u to msn , so if i need anything, i'll let you know ! i should be fine for awhile though.

 

have a good one.

 

 

Link to comment
Share on other sites

oh ok, well everythign works now..for now lol.

i guess php just got a little tighter with it's code.

 

i turned off display errors and everything is working.

 

thanks for everything.. i added u to msn , so if i need anything, i'll let you know ! i should be fine for awhile though.

 

have a good one.

 

 

What! Just because your disabled display_errors and now no errors are being display means everything is working. Did you read my post?

Link to comment
Share on other sites

I was thinking of die; , and I didn't realize that there was a setting for using <? } ?> in the php.ini, The only time I used them was a code with my site hosted by ace-host. I mostly use apache at home for a file server and don't really need short tags.

 

*edit

also, wildteen, you can come off as a jerk. I said I wasn't sure what the code was I was looking for and that he could try end; in the meantime. I assumed it was end; cause he had an "unexpected $end" at the end of the file and the } was present.

Link to comment
Share on other sites

Its the tags that is causing the problem not the code within the tags. There is no end keyword! So I don't know why you keep suggesting it. The following error:

Parse error: syntax error, unexpected $end in C:\Apache\htdocs\watchclockshop\include\menu.inc.php on line 38

 

Is caused by mismatching braces { } or ( ) within the code. Because mcerveni has short_open_tag disabled in the php.ini PHP is unable to see the closing brace in the following code:

<?
}
?>

Earlier you told mcerveni to change

<? } ?>

to

<?php
}
end;
?>

Which did fix the problem mcerveni was having. However it wasn't because you added end; after the closing brace. It's because you used the full PHP tags (<?php ?>).

Link to comment
Share on other sites

I hate to open a dead topic, but my post

oh, and wildteen, I had him change it from <? } ?> (all one line) to

 

<?
}
end; //which appears to not cause any problems
?>

 

and wouldn't that change it from a to a short tag to a regular script?

was me agreeing with you and you had to act like an ass again. I was thinking of die; which stops the script from running from that point regardless if it's the end of the document or not. Just cause I haven't used php in a while doesn't mean I don't know what's wrong, I said I was uncertain about the end; thing.

Link to comment
Share on other sites

I hate to open a dead topic, but my post

oh, and wildteen, I had him change it from <? } ?> (all one line) to

 

<?
}
end; //which appears to not cause any problems
?>

 

and wouldn't that change it from a to a short tag to a regular script?

was me agreeing with you and you had to act like an ass again. I was thinking of die; which stops the script from running from that point regardless if it's the end of the document or not. Just cause I haven't used php in a while doesn't mean I don't know what's wrong, I said I was uncertain about the end; thing.

In what way was I "acting like an ass"?

 

end; or die; has nothing to do with the error mcerveni was receiving. The error was caused due to the short_open_tag setting being disabled. Not all PHP installations are configured to read code within short tags (<? ?> or <?= ?>).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.