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

Php PDO search string as Google or order by best match
Submitting the same value many times when the value needs to be unique
'Order by' specified order in Woocommerce shortcode
woocommerce hooks warning “function not found”
How to acces value from route in symfony2
Get Value Of Table Field
redirecting a long URL to https
How to embed this php code in html?
Uncaught Error: Call to undefined function curl_init()
Multi level login by address
SELECT * FROM table WHERE `id` in … and where sum() less
Laravel: Undefined method fake on Laravel storage facades for file upload testing
Very Complex SQL Data Result Merge via PHP (Multi Dimentional Arrays)
codeigniter Insert_batch not working
How do I fix this invalid JSON that wasn't escaped? (in PHP)
PHP: how to adding date with number of month from database? [duplicate]

Categories

HOME
magento2
firebase
typelite
adfs3.0
barcode-scanner
add-on
subdomain
slider
portable-class-library
fogbugz
amp
tweepy
telegraf
circleci
jodatime
dma
twisted
coroutine
gitkraken
dashdb
conda
exchange-server-2010
sipp
pdf.js
software-packaging
web-push
fusetools
tortoisemerge
crud
list-comprehension
history.js
oracleforms
annotation-processing
miniprofiler
boolean-logic
microprocessors
splunk-query
guice
xenapp
publishing
xcrun
creation
rails-postgresql
pdfnet
djcelery
unification
system-on-chip
hypothesis-test
docker-ucp
common-table-expression
axis
icecast
ol3-google-maps
knockout-2.0
phppgadmin
karabiner
node-apn
front-camera
tablespace
system.net.mail
nsdata
declarative
maven-release-plugin
adp
node-glob
simian
persistent-object-store
myfaces
msgpack
fanotify
extend
supersocket.net
fantom
textscan
kefir.js
juttle
thoughtworks-go
hp-idol-ondemand
encryption-symmetric
wicket-1.5
smacss
xhprof
git-reset
code-complexity
boinc
stty
bcdedit
web-frameworks
semicolon
chronometer
pcspim
liveconnect
exponent
n-queens
differentiation
office-automation
suphp
explicit
iphone-sdk-4.3
tso
iphone-sdk-3.1.3
jboss-mdb
code-camp
bindable-linq

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App