CodeIgniter Forums
Moving my site to a new server - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Moving my site to a new server (/thread-32645.html)



Moving my site to a new server - El Forum - 07-29-2010

[eluser]Miguel Diaz[/eluser]
I just upload a new site to a new server and the <base_url> and all type of variables like the ones I am using from my controller are not working can somebody help me please Urgent.

Here you will find the website test please i hope someone can help. Sad
http://www.premionacionaldelajuventud.com.mx/test/


Moving my site to a new server - El Forum - 07-29-2010

[eluser]WanWizard[/eluser]
I get a 500 Internal Server error. Which is usually an indication of a problem in the .htaccess rewrite rules.


Moving my site to a new server - El Forum - 07-29-2010

[eluser]Miguel Diaz[/eluser]
I was trying to check my server but i put again can you try again please.


Moving my site to a new server - El Forum - 07-29-2010

[eluser]WanWizard[/eluser]
The page load now, but I see plenty of issues.

For starters, I see a lot of PHP short tags in your output, indicating that the server doesn't support short tags. You can enable short tag rewriting in the CI config (check the user guide), so CI will convert them for you.


Moving my site to a new server - El Forum - 07-29-2010

[eluser]Jelmer[/eluser]
Your old server probably had short tags enabled and you new one doesn't as it doesn't interpret <?=$variable?> as PHP.

If your CodeIgniter version is up to date (at least 1.7.0 if I remember correctly) you can switch on 'rewrite_short_tags' at the bottom of you main config.php file. Or if your CI version is up to date but you didn't update your config.php just add:
Code:
$config['rewrite_short_tags'] = TRUE;

CI will translate "<?=$variable?>" to "<?php echo $variable; ?>" for you after that.


Moving my site to a new server - El Forum - 07-29-2010

[eluser]Miguel Diaz[/eluser]
The funny thing here is that in my localhost that is running with appserv works perfect all the short tags.


Moving my site to a new server - El Forum - 07-29-2010

[eluser]Miguel Diaz[/eluser]
Thank you very much. that was the problem I just change the rewrite short tags and works perfect. Thank you very much for the support you are the man.