![]() |
Apache2 + CI - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Apache2 + CI (/showthread.php?tid=37487) Pages:
1
2
|
Apache2 + CI - El Forum - 01-11-2011 [eluser]gh05t[/eluser] Hi everybody, I started developing a web application with CI about a week ago on localhost (XAMPP on Windows 7) everything was going great until I needed to use some UNIX commands so I migrated to VPS. I'm running on Ubuntu 10.04, Apache2. I've successfully installed Postfix and MySQL. It all has been tested and working. The problem is when I try to visit my site the screen just goes blank. There's no error message neither from Apache nor from CI. It's just white. When I create a sample file with <?php echo 'ohai';?> it works fine, phpinfo() also works. Just can get CI working. I've changed base url in config, triple-checked .htaccess and I ran out of ideas. Any help will be greatly appreciated. Apache2 + CI - El Forum - 01-11-2011 [eluser]pickupman[/eluser] Welcome to the forums! If you are trying to use a .htaccess file make sure you have a ? in your rule. Code: RewriteEngine On In your application/config/config.php bump your $config['log_threshold'] to 4, and reload the page. Then check in /system/logs for a file created on todays date. Also check in the index.php in your root for your error_reporting level Code: error_reporting(E_ALL); //This should display errors Typically the blank screen is caused by a php error with error_reporting() turned off. Apache2 + CI - El Forum - 01-11-2011 [eluser]gh05t[/eluser] Thank you for such a hasty response. I did all of the above, restarted apache - page is still blank. I'm seriously considering deploying a fresh copy of CI on the server and copying my code. Apache2 + CI - El Forum - 01-11-2011 [eluser]pickupman[/eluser] You can try reuploading the system folder again. Have you check error reporting level in you php.ini file. Depending on server configuration, this may have to be edited in /etc/php5/apache2/php.ini. What about file permissions as well. If you have downloaded in your home folder and extracted, then copied over to /var/www. Make sure that the files in /var/www have the correct permissions and ownership. Apache2 + CI - El Forum - 01-11-2011 [eluser]gh05t[/eluser] I did the following thing: compressed the application to a single *.zip file on my machine (I don't fully trust FTP), uploaded it on the server, unzipped. Instead of putting it in root dir, I created a subdirectory. It works only in a subdirectory, I get 404 if I put it in root. Now the strange part: only the default controller works but nothing else, whenever I try to access any other controller I get 404. It's not a permission issue, I went chmod -R 777 on the entire folder. Error reporting is enabled. Apache2 + CI - El Forum - 01-11-2011 [eluser]pickupman[/eluser] chmod only makes is writable, but owned by you not apache (www-data). Try Code: cd /var/www This will change file ownership to apache's group. It may not be a bad idea to add your username to the www-data group. Apache2 + CI - El Forum - 01-11-2011 [eluser]gh05t[/eluser] Still 404. *sigh* Apache2 + CI - El Forum - 01-11-2011 [eluser]pickupman[/eluser] Is it an apache 404 or a CI 404? CI 404 has the red letters with the grey border. Apache2 + CI - El Forum - 01-11-2011 [eluser]gh05t[/eluser] It's an Apache 404. I'm going through apache2 configuration and logs, hoping I'll find something. Apache2 + CI - El Forum - 01-11-2011 [eluser]pickupman[/eluser] I logged into my Ubuntu box and here is my /etc/apache2/sites-available/default Code: DocumentRoot /var/www Restart apache2 service. |