Any idea why this piece of PHP code is making my script hang? -



Any idea why this piece of PHP code is making my script hang? -

thanks time in reading this. not programmer limited skills have been able determine function called @ origin of every page making our store pos script fail. when goto our url php application blank page. when phone call function commented out, pages load fine.

the interesting thing note no changes have been made our code , has been in utilize on 3 years. stopped working couple days ago , our webhost useless. haven't been able tell me if there changes made our server environment don't know start looking information. colleague suspects may have changed version of php in use, though don't know version might have preceded 1 listed here.

server info -apache version 2.2.29

-php version 5.4.33

-mysql version 5.5.37-cll

-architecture x86_64

-operating scheme linux

// new version seo htaccess short url's function makesecure(){ if($_server['https'] != "on"){ $uri = $_server['request_uri']; $strsitelocation = "https://" . str_replace("/","",domain) . $uri; header("location: " . $strsitelocation ); } }

unless you've set domain constant somewhere else, it's not going redirect anywhere. since said @ top of code, suspect case.

to confirm this, replace final header() phone call call echo() (output browser) or error_log() (output web server log file) instead. show it's trying redirect you; think won't valid url.

php

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -