• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving from 'Local' to 'Server'

#1
[eluser]Mr Lazy[/eluser]
Hi,

I have developed an application locally and it is now time to move it to the server.... and the site doesn't work : ( I get the CI "404 Page Not Found" page, so I guess CI is running but it can't find a page. I am guessing the controller defined in routes.php.

OK, as I have read it is good practice, I have the following in my config.php to make everything more portable:
Code:
$config['base_url'] = "http://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);

and I have done this as recommended in the troubleshooting in the user guide (again in the config.php):

Code:
$config['index_page'] = "index.php?";


and I have tried changing the URI protocol in config.php. All of these things have no effect.

What could be wrong here? Being new to CI I don't know how to proceed and problem solve.

Thanks in advance,
L.

#2
[eluser]Mr Lazy[/eluser]
I have now removed my application from the server and replaced it with the CI download (the "Welcome to CodeIgniter!" application) and it works fine. So, it is something I have done. I will I guess have to piece by piece port it over to give me a working server version....

L.

#3
[eluser]textnotspeech[/eluser]
Sounds like a .htaccess problem. Search the forums for .htaccess and you'll find a bunch of info on what might be wrong there.

#4
[eluser]Mr Lazy[/eluser]
Hi,

I think the issue might be my OS.... I am developing on Windows XP using WAMP, and deploying onto a Linux server with lots of PHP applications running happily. I think this issue is going to push me towards Linux faster than I am going already.

Is my presumption correct?

Thanks,
L

#5
[eluser]Rick Jolly[/eluser]
Does your controller class name start with an uppercase letter?

#6
[eluser]Mr Lazy[/eluser]
Yes they sure do... after reconstructing my application piece by piece, I hit the error of a blank screen and no output when I changed the settings in the database.php file.... and it turns out that I was trying to use the MySQLi extension, which works fine on my local machine. But the server (unfamiliar to me) does not have the MySQLi extension installed, but I wasn't getting any error message, just a blank screen.

Oh well, a lesson learnt....

Thanks, for the suggestions.

L.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.