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 Imagick - setTextEncoding() function doesn't work
Upload PHP Code not uploading image
Why create own request object? [closed]
array declration methods in php [closed]
File extension filter when choosing file to upload
Secure file storage in a server
MySQL: Avoid selecting columns with the same userid
Can't view local images with apache
Bug in Doctrine or am I doing something wrong?
Passing value along with MySQL retrieved value as hidden value in JavaScript to AJAX function
Dynamic forms and PHP
PHP MYSQL Register page Validation
How LOCK works for writing logs into flat file?
PHP mysql how to relationship three tables showing outputs from different tables
Paypal - CURL response is 0 in a new server (connection time out), it's ok in the old server
Using ajax how to get data from the database in PHP?

Categories

HOME
libgdx
android-studio
vagrant
dafny
whmcs
hyperledger
google-search-console
angular-meteor
minecraft
roku
gtk
cqrs
chromecast
cname
smooks
orc
angular4
temperature
google-sites
string-formatting
salt-cloud
cmake-gui
dashdb
uislider
quantitative-finance
backendless
openbravo
network-analysis
onchange
tortoisehg
acrobat
dotcms
payeezy
spring-rabbitmq
restful-architecture
grails-2.5
textmate2
telephonymanager
cheat-engine
linq.js
game-center
system-on-chip
head.js
gestures
datediff
maven-jaxb2-plugin
mura
clrs
dymola
dcount
svnserve
uibinder
distributed-cache
i2b2
openmrs
jsr363
cortana
miniconda
calcite
extend
gitlab-omnibus
com0com
subfolder
mathematical-expressions
baseadapter
jolie
cakephp-2.2
rebar
iodocs
utf8-decode
multivariate-testing
lumia-imaging-sdk
git-reset
nodeload
preorder
oxygene
lsa
spring-security-acl
xsd2code
sql-view
notifyjs
disjoint-union
days
spark-view-engine
wndproc
server-variables
botnet
startupscript
regression-testing
downgrade
aptitude
solandra
aggregator
fgetc
.net-client-profile
eai

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