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

Live Notifications using JQuery and CodeIgniter
Is web calendar publishing (.ical or ics) pushed by publisher or pulled by subscriber?
Why doesn't file_get_contents() appear to have the same access as curl_exec()?
How to create dynamic tables in MySQL
Changing PHP Session Variable with POST
insert two times with redirect using slim framework
How to make json objects within array in php [duplicate]
Can search engines crawl all the information on pages using endless scrolling with jquery/ajax
Why does this requests work in apikitchen but not in my php script?
convert webservice from rpc to document literal
How to get values from another table in codeigniter using the Active Record?
How to hide a class in a condition
Use form post (php) to upload a file to Azure storage, and return the link
WooCommerce - display related products by tags
what the difference in var_dump and print_r
Get a value of an class in an array

Categories

HOME
memory
key
loopbackjs
ews
braintree
histogram
dependencies
turbojpeg
clone
stored-procedures
ag-grid
firebase-database
tfs2010
match
watch-os-3
multi-step
sslhandshakeexception
freertos
google-awareness
google-sites
exec-maven-plugin
cloudsim
psql
amazon-mws
jitsi
multi-upload
beego
annotation-processing
php-5.3
premake
john-the-ripper
cucumber-junit
kendo-listview
xmlunit
spring-rabbitmq
autoencoder
dreamfactory
runtimeexception
jade4j
fastlane
android-alarms
cloudera-quickstart-vm
telephonymanager
assemblies
task-parallel-library
netapp
uipickerview
system-on-chip
oracle-bmcs
zend-form
viewmodel
rm
deployd
head.js
openstack-glance
android-mediarecorder
google-shopping-api
email-injection
nitrousio
pbx
nsrunloop
carmen
oci
bbc-micro
ajaxmin
android-syncadapter
maximize
gravatar
cryptojs
html.actionlink
extend
gluon-desktop
componentart
web-api
sql-processor
operands
encryption-symmetric
window-resize
inequality
webmethod
csslint
reference-counting
ctp
colon
frontbase
non-ascii-characters
unrealscript
google-code-prettify
bcdedit
dynamic-rdlc-generation
chefspec
jquery-dialog
clearinterval
voice-recording
java.lang.class
uipangesturerecognizer
quartz-core
uipasteboard
kohana-auth
tablet-pc
bll
libxslt
active-record-query
asdoc
resharper-5.0
powergui
synthesizer

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile