php


PHP global variable seems to cause HTTP 500 error on dev server but not live server


I am in the process of migrating a website that was developed in India, and moving it to another webhost. Not being an expert at PHP has my head hurting from tracing the code. I think I narrowed down the problem to this bit here...
<?php include("../config.php"); ?>
<?php include("../header.php");
if(!empty($_REQUEST)){
$newsid = $_REQUEST['name'];
?>
<script>
$(document).ready(function() {
$('.story_container').each(function(index) {
if ($(this).attr("id") == '<?php print $newsid; ?>' ) {
$(this).show();
}
else {
$(this).hide();
}
});
});
</script>
<?
}
?>
Specifically, if I delete the third and fourth lines, the 500 error goes away and the page loads, although not correctly, with a $newsid item loaded in the main part of the webpage.
If I'm not mistaken, there is a formatting error and looks like it is missing a terminating curly brace? The purpose of the opening and closing php tag at the end just to include a curly brace has me perplexed. If I close the if statement, the 500 error goes away, but again, the page doesn't load with a $newsid item in the main part of the webpage.
I am at a loss and hoping someone can help me troubleshoot this. Thanks!
Almost forgot. I mentioned the site was developed in India because this page in particular I had converted from ANSI format to UTF-8, in case that gives any more clues.
Thank you Rasclatt, the issue was that short codes were not enabled.

Related Links

The old message is shown only when I send new message or refresh the page in my chatting application
php ë is being displayed as u00eb
Making Custom Url in Yii 1.1.17
OData query $filter with multiple conditions
Using <pre> Tag in FPDF
I have upload application and database on server I face the error
Parse XSD Multiple Schema Locations Using PHP
Change the order of characters in a word
How to pass data to view returned by the route redirected to (Laravel)
Receive response messages to a particular number - Twilio
Route [user.profile] not defined. Laravel 5.3
Laravel belongsToMany not returning the related data
Encoding php form into JSON object
php logical operator 'or' between different data types
Detect whether a subclass has called a parent class
TCPDF inline vs save-to-file image quality

Categories

HOME
spring-data
macos-sierra
automapper
antd
mongoid
twitter-fabric
fogbugz
azure-mobile-services
clone
selection
roku
mutation-testing
msmq
sslhandshakeexception
dhcp
android-contacts
jqxgrid
azure-machine-learning
coreldraw
morris.js
xdebug
boolean-logic
unmarshalling
monitor
quick-nimble
riotjs
caesar-cipher
sca
gsp
quickcheck
char-pointer
db2-luw
selenide
task-parallel-library
suds
uipickerview
resampling
optionaldataexception
spooler
julius-speech
transparency
absolute
spongycastle
autorelease
section508
network-protocols
case-when
email-injection
nunit-console
tsqlt
unsigned
polymerfire
as3-api
astropy
ambiguity
apple
ngcordova
explain
signed
pass-by-value
jolie
flurry-analytics
zend-mail
relationships
jomsocial
ctp
django-facebook
.net-remoting
blobstorage
unicoins
delphi-xe4
semicolon
sfinae
viewpagerindicator
cakeyframeanimation
multidrop-bus
zend-server-ce
firefly-mv
cewolf
asp.net-mvc-views
ognl
nsconnection
oracle-pro-c
projectpier
rootkit

Resources

Encrypt Message