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

snapdeal send curl request to header in PHP
WAMP: Forbidden access to phpmyadmin through IP
display image but shows an array
Laravel-Core: Why does Laravel store Aliases multiple times?
How to show the image in push notification (Gcm) php
How to Insert Record in multiple rows PHP MYSQL
PHP internals - getting a boolean argument
md5 login won't work
Get URL from background-image property by regular expression
query to Ignore the repeated column in leaderboard
PHP: How to set multiple data mapper classes properties from join query statement
Create JSON with same elements in PHP
Calculate leaves from table for more than 1 leave entry
The page isn't redirecting properly in laravel 5
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead [duplicate]
On Home page only Logo displaying in Magento

Categories

HOME
amazon-web-services
python-2.7
openshift
ionic2
webview
apple-push-notifications
focus
livecode
plaid
ews
position
phpseclib
sharepoint-online
log4j2
nsstring
mailgun
pygobject
scala-ide
checkout
raml
python-appium
beego
background-color
sap-lumira
python-imageio
sendmessage
bonita
materialize
region
substance
monitor
locks
progid
fotorama
directfb
bean-validation
nppexec
keyboard-layout
cordys-opentext
best-buy-api
spring-restcontroller
stat
windows-store
suds
secure-coding
type-inference
nuclio
jenkins-slave
liteide
sony-future-lab-n
knockout-2.0
amazon-elastic-beanstalk
gnome-terminal
deedle
ptvs
kendo-treeview
instafeedjs
email-injection
wininet
declarative
perforce-integrate
right-to-left
processor
jeasyui
xcopy
textblock
ui4j
phpquery
self
screen-orientation
canopy
apple
embeddedwebserver
relational-model
scala-macros
nssortdescriptor
nsmutabledata
nhibernate-criteria
rebar
iodocs
siena
communicate
two.js
.htpasswd
hyperloglog
spring-social-linkedin
iosched
assetic
smips
grails-2.3
mousemotionlistener
codahale-metrics
spiral
ckeditor.net
tridion-2011
msinfo32
nsfont
dropshadow
filelock
space-partitioning
azure-acs
bll
anonymous-types
jdownloader
tessellation
activestate
self-tracking-entities
aspbutton
zend-test
index.dat
activex-exe
regioninfo
html-generation

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile