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

adding fields in php wordpress
PHP Exception within a try catch block not being caught unless the print function is called?
file_get_contents() “failed to open stream: Network is unreachable” error on valid link
Gas orm 2 relationships : empty IN SQL clause
Laravel - Looping through a nested collection
Wordpress - Specific category post loop
Facebook redirect URI login product
Magento 2 programmatically update product save empty value to product attribute
Laravel Passport Multiauth
How to upload multiple image in laravel
mysqli returns error but the query works properly in phpmyadmin
DS_Store file is created on ZipArchive::extractTo
Column count doesn't match value count at row 1, and i don't find the mistake
Wordpress “Show Comments” button not working
ñ to Ñ string php
keys and values of dynamically generated array

Categories

HOME
firebase
apache-nifi
class
windows-10
antd
plaid
visual-studio-2010
slider
cryptography
google-webmaster-tools
tfs2015
hyperledger
openfoam
log4j2
lc3
match
parsley.js
circleci
angular4
feature-extraction
tfsbuild
cmake-gui
node-webkit
tableview
sqlplus
stackexchange.redis
batch-rename
qa
rxjs5
jstree
introspection
openbravo
substance
reporting
amazon-kms
nppexec
hidden-markov-models
get-event-store
daz3d
wysihtml5
rightnow-crm
viewmodel
image-registration
jgrapht
spring.net
nivo-slider
connect-direct
msxml
bigdecimal
java-2d
declarative
codecharge
highlighting
exists
fdt
univocity
flask-security
boost-proto
ibm-was
largenumber
place
artisan
r.java-file
ssmtp
pass-by-value
rebar
utf8-decode
device-admin
windows-rt
angular-ui-select
osascript
siena
treeline
redpitaya
fileshare
sql-function
autonumber
compiler-flags
ember-table
chartfx
examine
ntlmv2
stretch
server-name
wcf-callbacks
kolite
jdownloader
tabbarcontroller
spring-modules
subtext

Resources

Encrypt Message