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

jQuery Load List Issue
Using ip address in ftp_connect
populating value of textbox by adding dynamic texboxes
Remove filepaths from an assosiative array in php
How to install PHP SSH2 extension in a non-standard folder on linux without root access
MySQL simple query
How to add a class alias in Laravel
Select all rows from table in Yii
How to retrieve all table names from database?
PHP - How can i use str_replace in that situation?
get the value of a child
how to use my description(meta description) as a second title in joomla2.5
Can't retrieve data from MongoDb
Where is php.ini file of php_fpm?
laravel migration creates different schema
How to create facebook page with PHP or CURL?

Categories

HOME
mod-rewrite
ontouchlistener
foaf
plpgsql
typeerror
android-emulator
qooxdoo
elk-stack
scheduler
slide
colors
mailmerge
jquery-select2-4
powermock
orange-api
closures
bazaar
akka-persistence
activeadmin
bosun
device
channel
eclipse-emf
sipp
fusetools
sap-lumira
openbravo
tf-idf
sfml
ninject
guice
dotcms
location-services
steam-web-api
reporting
rspec-rails
xmlunit
image-optimization
ftp-server
android-n
linq.js
rdp
praat
get-event-store
vb.net-to-c#
notesview
nomad
wysihtml5
viewmodel
rm
django-static-precompiler
beeline
hibernate-ogm
comm
nslayoutconstraint
ptvs
nrf51
cefpython
wininet
raw-sockets
perforce-integrate
yii2-model
android-syncadapter
wicked-pdf
node-glob
adjacency-list
accessibilityservice
gridbaglayout
onepage-checkout
wif4.5
myfaces
odesk
self
blank-line
bjam
css-paged-media
postal-code
vdm-sl
relational-model
kefir.js
python-curses
sablecc
comctl32
adhoc-polymorphism
iplimage
zend-search-lucene
webaii
jack
lsa
unrealscript
hints
sunstudio
rikulo
notin
reentrancy
semantic-merge
struts2-json-plugin
story
trialware
mmc3
net-use
bll
turbine
mygeneration
self-tracking-entities
projectpier
wmd-editor

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