Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 1.7.2 not working under PHP 5.3.5
#1

[eluser]Iván Argulo[/eluser]
Hi everyone! After 3 years developing successfully with CodeIgniter, today we bought a new server to develope and test our applications.

We have about 70 projects that are working in our old server. Today, we tested one app in the new server before migrating all websites:

Debian 6.0.1
XAMP 1.7.4
Apache 2.2.17
PHP 5.3.5
MySQL 5.5.8

But, sadly, it doesn't work. No error message, no warning, just a white screen. Nor source code. I reviewed the logs and only reports the following:

Deprecated: Assigning the return value of new by reference is deprecated in /opt/lampp/htdocs/cdzamarat.es/sistema/codeigniter/Common.php on line 130
Message: Function set_magic_quotes_runtime() is deprecated - Filename: codeigniter/CodeIgniter.php - Line Number: 60

Our new applications are developed with CodeIgniter 2.0, but we need to use CI 1.7.2 in some of the old apps (so upgrade the CI version is not an option). The MySQL is installed and running, the database is created with all needed permissions assigned.

I think that the problem is the PHP version (5.3.5). I've read some forums but the information is not enough to test in our server. Help appreciated!
#2

[eluser]Iván Argulo[/eluser]
Forgot to say that is the 64-bit version.
#3

[eluser]Unknown[/eluser]
Hi!

By the time I write this reply, you have surely solved your problem one way or another but still, I think that this could benefit others like me who were searching for this answer.

The solution I used to solve the problem was to change the value of short_open_tag = Off to short_open_tag = On in the php.ini and then restarting or reloading Apache. At least, it solved the problem in our case...

Hope this helps someone someday!
#4

[eluser]Iván Argulo[/eluser]
I found the problem. The core of CI 1.7.2 passes some variables by reference. The function is declared like this, and this is OK:

Code:
function foo(&$param){}

But when using the function is called that way:

Code:
$this->foo(&$my_param);

That triggers a fatal error, leaving a White Screen of the Death. I updated all the websites to CodeIgniter 1.7.3, and changed all functions used, so no calling is done using the syntax &myparam; (by reference params are only allowed on function declaration).

So, the GOOD code is this:

Code:
$this->foo($my_param);

We were using several times this way of passing params by reference, but it seems in newer versions of PHP that's not allowed.

I hope it helps, that worked for us Smile




Theme © iAndrew 2016 - Forum software by © MyBB