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

file_get_contents() returns unknown string [duplicate]
PHP OOP classes of store pattern
PHP MySQL - foreach loop with if to display subset list within key list
Yii: Multiple events best practices
MySQL: count rows versus save number of rows in a table
Rebuilding the script from cURL to multi cURL
How to convert PHP script to PDO properly?
php-how to echo 'get" with the formatting?
nginx unknown directive when running in my VPS
Continue CSS animation on page load?
PHP if with an array SQL
PHP Not Reading Session Data (Solved) [closed]
is it possible to check weather the given email id has access to google drive or not for php web application
Mockery forgetting byDefault setup when using shouldReceive for the same method but different arguments
Replacing .php ext with .html through .htaccess for root files only not subdirectoy files
How To Put HTML Code In Laravel Function?

Categories

HOME
webview
events
magento2
svn
matrix
lambda
freeradius
vagrant
seedstack
activex
mousemove
tabs
tcp
mathematical-optimization
apache-kafka-connect
static-analysis
mailing-list
driver
twitter-oauth
scrape
circleci
mailmerge
multi-step
mahout-recommender
temperature
google-tasks-api
vertica
varnish-vcl
significance
adminlte
amazon-sns
uri
hdmi
android-service
annotation-processing
php-5.3
miniprofiler
fatfs
splunk-query
argv
quick-nimble
series
xcrun
assert
sbjson
praat
coverage.py
virtual-memory
asihttprequest
aws-kinesis-firehose
beeline
gestures
entropy
node-apn
simple-schema
htmlspecialchars
nslayoutconstraint
sesame
google-shopping-api
email-injection
bpms
allegro
libharu
ndk-build
codecharge
strpos
simian
jeasyui
trust
teensy
dnx50
calcite
auto-generate
netdatacontractserializer
css-paged-media
blockquote
mobilefirst-server
flow-js
mathematical-expressions
mxe
comctl32
string.format
datagridcomboboxcolumn
coding-efficiency
redpitaya
pageviews
webaii
gpu-programming
django-settings
significant-digits
instance-variables
netstream
memory-pool
printqueue
bass
outlook-2007-addin
3-tier
icicles
raw-data
oracle-pro-c
firephp
bucket
rtti
suggestbox
rendering-engine

Resources

Encrypt Message