0

I have deployed my PHP application built on Codeigniter. When I call the root URL, browser is successfully redirected to login view but not HTML is rendered.

What can be the issue?

2
  • What do you mean by "HTML is not rendered?" Do you mean that RAW HTML is being shown in the browser? Commented Dec 31, 2009 at 2:03
  • By "HTML is not rendered", I mean that nothing is shown in browser. Commented Dec 31, 2009 at 3:18

4 Answers 4

1

Did you deploy it to a different computer than your development machine. Maybe you are using "nice urls" and the target server does not allow url rewriting with htaccess?

Sign up to request clarification or add additional context in comments.

Comments

1

It could be related to the way you load views.

  • Loading a view this way sends it straight to a browser:

    $this->load->view('foo_view.php', $data);
    
  • But if you have an optional, third, parameter set to TRUE, it will return data as a string so you have to echo it:

    echo $this->load->view('foo_view.php', $data, TRUE);
    

More info at the bottom of this CI User Guide page.

Comments

0

If nothing is being shown in the browser it is worth checking the following:

  1. system/cache is writeable
  2. system/logs is writeable
  3. GZIP compression is disabled in application/config/config.php
  4. telnet port 80 and see what you get back, any headers?
  5. tail the logs to watch for errors

Comments

0

There should be proper deployment otherwise you are bound to see issues. This may prove helpful to you.

Deploying CodeIgniter (or any PHP projects) to the live site?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.