Welcome Guest, Not a member yet? Register   Sign In
Install to localhost
#1

Hi,

New to codeigniter.   I have a new website that is running codeigniter, developed by someone else.  I'm taking over the site, and would like to set it up locally, on a windows PC, for testing and further development.

I have set up an Apache24 server in my root on C drive.  It conflicted with my IIS server and wouldn't run so I have it listen on 127.0.0.1:122  and it now works (I found to do this on another forum).

I have downloaded the site, via FTP, to the htdocs directory.  All I get when attempting to display the site is a blank page.  I made some test pages in php and html and those will come up okay.

I've changed the base_url to a few things, like "$config['base_url']    = 'http://127.0.0.1:122/';" and other variations but all I continue to get is a blank page.  I've tried to turn logging on in php.ini but the only information that comes up in the error.log file is start up/shutdown server information.

Any ideas or thoughts on what I can do to get this running?

thanks!
Reply
#2

I think you should consider using XAMPP or WAMP if you are on windows. Apache is only one piece of the server software you will need to get the website going.

Your best option will be to run the website on a native Linux operating system that has the traditional LAMP stack. I say this because the majority of production web servers are Linux, and Linux has functionality (such as file permissions) that Windows doesn't have. Consider a virtual machine, or dual booting into Linux if you don't have a spare computer laying around.
Reply
#3

I agree, it would be easier if I used Linux etc., but I was hoping for some guidance using windows with the setup I was describing. Is it not possible?
Reply
#4

(This post was last modified: 01-26-2016, 10:43 PM by josepostiga.)

Have you confirmed that the CI is in the root of your apache web folder?

Also, check if the CI is configured to log any errors. Check the config.php, that's inside the application/config folder, search for error and set the report level to any errors and debug. Then check the application/logs folder to see if anything comes up.

Btw, a final check you can do is to see if the CI is leveraging Apache's mod_rewrite and that that module is activated on your Apache configuration.
Best regards,
José Postiga
Senior Backend Developer
Reply
#5

(01-26-2016, 09:04 AM)nairb Wrote: New to codeigniter.   I have a new website that is running codeigniter, developed by someone else.  I'm taking over the site, and would like to set it up locally, on a windows PC, for testing and further development.

I have set up an Apache24 server in my root on C drive.  It conflicted with my IIS server and wouldn't run so I have it listen on 127.0.0.1:122  and it now works (I found to do this on another forum).

I have downloaded the site, via FTP, to the htdocs directory.  All I get when attempting to display the site is a blank page.  I made some test pages in php and html and those will come up okay.

I've changed the base_url to a few things, like "$config['base_url']    = 'http://127.0.0.1:122/';" and other variations but all I continue to get is a blank page.  I've tried to turn logging on in php.ini but the only information that comes up in the error.log file is start up/shutdown server information.

Any ideas or thoughts on what I can do to get this running?

Sounds like error reporting isn't set to maximum in PHP. Do you have these lines in php.ini?
Quote:error_reporting = E_ALL
display_startup_errors = On
display_errors = On
log_errors = On

A blank page in PHP generally means some kind of syntax error that prevents PHP from even parsing the script. You can set error reporting in the code itself, but that won't prevent blank screens because the code with the error reporting never gets executed. The error aborts execution before it really starts.
Hey, don't work without a PHP debugger. Several free IDEs have this features built in. Two are NetBeans and CodeLobster. Without a debugger, it's like you're driving with a blindfold on -- you are going to crash!
Reply
#6

I suggest you try a fresh project on your localhost with codeigniter, that way you will first understand the working principles behind CI, then compare the configurations on the localhost CI installation to your original site. I assume there is no problem with your localhost server. By the way, there a well documentation on the codeigniter website to get you up and running in no time.
Reply
#7

(This post was last modified: 01-27-2016, 05:03 AM by InsiteFX.)

I' am running XAMPP on Windows 10 Pro with no problems at all my Web Server live uses Linux and all I do is FTP it up there.

If you change to using XAMPP then make sure you install it to your root C:\ drive.

You will also need to setup some Environment variables through the Control Panel

ENVIRONMENT VARIABLES SETUP:

!) Control Panel
2) Click on System
3) Click on System again
4) Click on left the Remote Settings
5) Click on the Advanced Tab on top
6) Click the Environment Variables button on the bottom
7) On the bottom System variables window find and highlight the path then click the Edit button
8) Add the following path variables below, make sure you end each one with a semi-colon

C:\xampp\php;
C:\xampp\htdocs;
C:\ProgramData\Composer\bin; ( for Composer )
C:\Program Files (x86)\Git\bin; ( for Git )

Windows 10 handles it a little different then this but still the same.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#8

WOW! Thanks everyone for all of the information and things to try. I really appreciate it! Lots of stuff for me to look into and try out now (good and bad for me!).

A couple of points with some initial things I looked further into:
- I turned on all of the logging as suggested but still nothing. But, I did write a bad php file and ran it and it registered errors. Makes me think I must not have codeigniter set up right??
- Which leads me to the suggestion of setting up my own CI just to make sure I can get it working okay, and understanding more.
- I've tried a few - lamp, wamp, or whatever their names were with no luck. I may try out Xammp too then. Right now running wampserver.
- When starting up the server I do get this error:
"PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files (x86)\\php\\ext\\php_mssql.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0" Not sure what that is about, and may be a big problem, or not, but it seems to reference mssql! Something else I need to look into...

So, I've got some work cut out for me to see if I can get things rolling. Thanks again for all of the suggestions.
Reply
#9

You should really deal with that php lib problem first and then try to run your app again.
Best regards,
José Postiga
Senior Backend Developer
Reply
#10

(01-27-2016, 08:55 AM)nairb Wrote: - I turned on all of the logging as suggested but still nothing.  But, I did write a bad php file and ran it and it registered errors.  Makes me think I must not have codeigniter set up right??

Did your bad php file have actual syntax errors or only logical errors? It's just that, while I'm no expert, I can't think of a situation where the output is a blank screen. Just making sure, but did you restart Apache after changing php.ini? When you get the blank screen, is there no HTML code behind it all?

Also, I forgot to ask, did you install CodeIgniter, and you got the welcome screen, and only when you copied the application into CodeIgniter did it start giving you blank screens? If CodeIgniter gave you the welcome screen, then the problem is contained somewhere in the application folder.
Hey, don't work without a PHP debugger. Several free IDEs have this features built in. Two are NetBeans and CodeLobster. Without a debugger, it's like you're driving with a blindfold on -- you are going to crash!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB