CodeIgniter blank screen after migration

So, I have a website written using the CI framework. It worked great on the original host (Apache). It works fine locally (IIS 7 Express). We just bought a new VPS (Windows Server 2008 R2) and php was pre-installed (PHP Version 5.2.10), when I go to the site, I get a blank page.

After debugging, just printing “OK” so often, I defined CodeIgniter.php:

$CI = new $class(); 

Now, to try to solve the problem, I went to config.php and installed:

 $config['log_threshold'] = 4; 

However, I do not even get any log files. I noticed that permissions were not enabled for recording, so I switched to "c: \ inetput \ wwwroot" and set the maximum permissions for the user "IIS_IUSRS"

Unfortunately, a log file is not created. "index.php" is still empty, so I'm completely confused. This is my first experience with a CI application. Please, help!

Edit: Ensured that MySQL is installed and MySQL is enabled for PHP

Thank you, Chris

+4
source share
9 answers
Trevor is right. I had the same problem and it was resolved right after installing php-mysql. I run this on CentOS 6.2 and I did yum install php-mysql and it worked.
+6
source

There was the same problem. In my case, php-mysql was installed but did not appear in phpinfo (). I am using php-fpm (with nginx) and the reason is that php-fpm needs to be restarted

 sudo /etc/init.d/php5-fpm restart 
+2
source

Probably an error was generated, but not shown due to the installation of error reporting by default. I usually change the setting of error messages on my development machine (in CI index.php) as follows:

  if ($_SERVER['HTTP_HOST'] == "localhost") { error_reporting(7); } else { error_reporting(E_ERROR); } 
0
source

Change $ config ['uri_protocol'] to "REQUEST_URI".

0
source

SELF ANSWER: The reason was empty space (you had to reformat all the code by opening each file in the FTP editor and reloading it)

0
source

I had the same problem. This was due to database settings. Check your database settings.

My problem was that I am using the expression engine and the site will be blank on the same line as you mentioned. I use Vagrant, so I had to set the correct port in the database configuration settings for Expression Engine, and then it worked.

0
source

I had the same problem.

To enable error display, change the value of define('ENVIRONMENT', 'production');
to define('ENVIRONMENT', 'development');
in index.php.

It shows: Fatal error: Cannot redeclare class Xml in /www/.../application/libraries/Items/Xml.php on line 3

Adding if before class declaration:
if (!class_exists('Xml')) { class Xml extends XmlElement {...}
solve this problem

Also, work with if (true) { class Xml extends XmlElement {...}
Magic!:)

PS I am moving from php 5.4.36 to 5.6.6-2 I think the problem is growing from php version

0
source

I had the same problem as OP (execution stopped at "$ CI = new $ class ();" in CodeIgniter.php, which caused a blank page), but I found my answer here: http: //forum.codeigniter. com / thread-60436.html

Line 257 on system / kernel / Common.php was

 return $_config[0] =& $config; 

I changed it to

 $_config[0] =& $config; return $_config[0]; 

and the problem disappeared. This happened after moving from PHP 5.4 to 5.6 by running CodeIgniter 2.1.

0
source

I had the same problem, open config / database.php file and change 'mysql' to 'mysqli' in dbdriver.

 $db['default']['dbdriver'] = 'mysqli'; 
0
source

Source: https://habr.com/ru/post/1340891/


All Articles