![]() |
Site not working problem on server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Site not working problem on server (/showthread.php?tid=21596) |
Site not working problem on server - El Forum - 08-14-2009 [eluser]HooJee[/eluser] Hi Guys I have completed my website on my local server and have uploaded it to the remote server. Whenever I request the index page of my controller I get a blank page. Whereas if I request another method of the controller it loads perfectly fine. Does anyone know whats going wrong ? I have changed the base_url() and all the DB configurations. Site not working problem on server - El Forum - 08-14-2009 [eluser]tomcode[/eluser] Do You use mod rewrite ? If so, try without, else post Your controller code. Site not working problem on server - El Forum - 08-14-2009 [eluser]HooJee[/eluser] Well, my local server uses mod rewrite. Enabled or disabled, the site loads fine. The shared server doesn't load the page at all. Im really lost here. Code below: Code: class Home extends Controller { The index function doesn't load whereas the profile function loads the relevant data. Site not working problem on server - El Forum - 08-14-2009 [eluser]HooJee[/eluser] Ok, the problem has been discovered. Its the following line of code on the html: <?xml version="1.0" encoding="utf-8"?> I am guessing the <? ?> brackets are causing some sort of error since the file is labelled with a .php extension. Anyone know how I can fix this? Site not working problem on server - El Forum - 08-15-2009 [eluser]tomcode[/eluser] Your hoster could disable it for You, it's the PHP config variable short_open_tag. Site not working problem on server - El Forum - 08-15-2009 [eluser]JoostV[/eluser] Echo it in a php statement between single quotes and you'll be fine. That way it will not be interpreted as PHP code. Code: echo '<?xml version="1.0" encoding="utf-8"?>'; Site not working problem on server - El Forum - 09-09-2009 [eluser]Unknown[/eluser] Where exactly can I find the file with the xml-line? Thx, Spot Site not working problem on server - El Forum - 09-09-2009 [eluser]BrianDHall[/eluser] For slightly confusing fix ![]() Code: <?='<?xml version="1.0" encoding="utf-8"?>'?> I ran into the same sort of problem when I tried to load a view that was XML with PHP mix-ins for use in a custom payment module. Site not working problem on server - El Forum - 09-10-2009 [eluser]Aken[/eluser] Just a note, PHP short tags like Brian posted will be deprecated, and are not recommended for use. The standard <?php echo 'something'; ?> should be used if you're concerned about longevity. |