Welcome Guest, Not a member yet? Register   Sign In
Trouble running CodeIgniter on a Windows server
#1

[eluser]Matt D[/eluser]
I'm having trouble with a site I developed using CodeIgniter getting to work on a Windows IIS 7 server. At first, only the main page would show up with the links to the other pages not working. I fixed that by creating a web.config file. It worked for about an hour until the main page, along with the rest of the pages are showing up blank but with no 404 errors. The CodeIgniter site is in a subdirectory of my main site (www.sitename.com/codeigniter). I've tried changing the uri_protocol settings in the config file with no success. My site is hosted with GoDaddy if that helps. Anyone have any ideas?
#2

[eluser]Aken[/eluser]
Could be so many things, it's really hard to say for sure.

First, Windows servers suck for PHP, so don't use it if you don't have to.

Second, you should start by getting CI working without trying to remove the index.php if that's what you've attempted to do already. Make that the last thing you do if you're having problems.

Third, blank pages are typically (at least on other servers) pages with PHP errors, but error displaying has been turned off. Check your php.ini settings to make sure that displaying errors is enabled. You might find the problem then.
#3

[eluser]Matt D[/eluser]
Thanks for your reply. I picked a Windows server in case in the future I wanted to get into .NET development.

I turned on error reporting and it seems I found the problem. On the main page I got this "Fatal error: Call to a member function num_rows() on a non-object in D:\Hosting\9434915\html\ticketingdemo\system\libraries\Session.php on line 216"

I checked database.php in my config folder and it has the right settings. What else could cause this problem?
#4

[eluser]Matt D[/eluser]
I just figured out what was wrong. In the config.php file, under 'sess_table_name' I put the name of the database instead of the name of the sessions table.
#5

[eluser]Aken[/eluser]
Unless it's not possible to change that in the future, I would stick with an Apache or similar server when using PHP & CI. If you want a .NET environment in the future, then set one up separately. Just my recommendation - it would likely save you a lot of hassle.




Theme © iAndrew 2016 - Forum software by © MyBB