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

Symfony 2 Getting form errors with AJAX
JSON encoding in php [closed]
PHP multidimensional array not working for api
onclick button save data in db php [closed]
How do i put php variables in emails?
Submit master form
PHP+Mysql Order By Date For Multiple Table ( Via Left Join )
how do I call multiple CSS stylesheets from a directory in php
Paypal Recurring Subscription cart auto cancellation happening always
Why wordpress .htaccess automatically update by new code?
PHP error. result not showing as required
Create table if not exists is costy?
PDO executing query inserts more rows in my database then it should
Is it possible to make an identical an equivalent line in bash of this php line?
Deploy Yii2 advance template to a subdirectory
Accessing and filtering an array much more efficiently in php [closed]

Categories

HOME
xpath
knockout.js
yii
paypal-ipn
systemd
cypher
dependencies
scheduler
mailing-list
hspi
log4j2
yahoo
lc3
xades4j
getopenfilename
game-maker
feature-extraction
sql-injection
sonicwall
bnf
exe
coroutine
spyder
libgit2
azure-machine-learning
spring-ldap
qa
acl
raima
plyr
echosign
xenapp
autodesk-model-derivative
netbios
commonsware-cwac
snap-framework
cmis
grails-2.5
redgate
mv
telephonymanager
cheat-engine
suds
fiware-wirecloud
oracle-bmcs
moinmoin
vesta
deployd
icecast
sony-future-lab-n
non-linear-regression
head.js
phppgadmin
extjs4.1
winmerge
pen
.when
degrees
allegro
qtextedit
portal
multi-touch
jsonix
bilinear-interpolation
android-syncadapter
gravatar
i2b2
gdl
variable-length-array
srv-record
dbmigrate
physicsjs
web-api
dnsjava
wicket-1.5
image-rotation
igor
visual-c++-2012
full-text-indexing
jini
wso2bam
xmi
accountmanager
saga
vlab
progress-db
grails-2.3
node.js-stream
ldif
insertion
delphi-xe4
ofstream
itunes-sdk
red-system
xcode4.5
live-wallpaper
cakeyframeanimation
zotonic
groovy-console
radscheduler
vows
startupscript
grails-validation
aggregator
raw-data
self-tracking-entities
.net-client-profile
ntruencrypt
activex-exe
chronic
word-automation
error-detection

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App