Welcome Guest, Not a member yet? Register   Sign In
Problem to run the app on the server
#1

[eluser]Unknown[/eluser]
Hello all,

I have a very strange problem. I have just installed Ci framework and tried on my local some basics. I created basic controler, some page and amend the routes.php and tried it - it was according to the tutorial.

http://ellislab.com/codeigniter/user-gui...pages.html

Everything was OK and page was displayed. I am using XAMPP for appache server.

Than I upload al lproject to the server (I am using wedos web hosting where I already have som web which is working correctly) but this is not working for the application which I copied it here. When I type the URL I got 404 error.

Everything is the same as on my local but something is wrong but I am crazy from it now. Is it possible to somehow check where is the problem? How can I check what the framework doing step by step after i type the url ?
#2

[eluser]Tpojka[/eluser]
Check these three things:

1.) value of $config['base_url'] in application/config/config.php,
2.) routing setup in application/config/route.php,
3.) .htaccess code
#3

[eluser]Unknown[/eluser]
Ok... on my webhosting service I have www folder where i put my index.html file. Than when i type www.mydomain.eu I get this index.html file. Than I have subfolder www/folder/index.html Than when i type www.mydomain.eu/folder i get this page so it is ok.

Than i have www/folder2/<here i unzip CodeIgniter framework> and when i type www.mydomain.eu/folder2, 404 Page Not Found appears. The error is not general error from browser but generated from the CI framework.

I have created my own controler in application/controllers/mycontroller.php

&lt;?php

class Mycontroller extends CI_Controller {

public function view($page = 'enter_form')
{

$data['title'] = ucfirst($page); // Capitalize the first letter

$this->load->view('templates/header', $data);
$this->load->view('pages/'.$page, $data);
$this->load->view('templates/footer', $data);
}
}

And I have following structure of views:

views/pages/enter_form.php
views/templates/header.php and footer.php


1) $config['base_url'] = ''; but I have tried 'http://mydomain.eu/' and 'http://mydomain.eu/www/' or 'http://mydomain.eu/www/folder2/'
2) $route['default_controller'] = 'mycontroller/view';
$route['(:any)'] = 'mycontroller/view/$1';
3) I found only .htaccess file in application folder. This file contain only this string - Deny from all


Still I am not possible to run it as on localhost... Thank you for any help




Theme © iAndrew 2016 - Forum software by © MyBB