Welcome Guest, Not a member yet? Register   Sign In
CI issues on a new system
#1

[eluser]Andres Gonzalez[/eluser]
I have an application developed using CI (v1.7.1) on a Ubuntu 8.04 system. Everything seems to be working fine--I really like CI. I am now in the process of moving this application to a new box running Ubuntu 9.04.

Most things work, however, I am seeing some strange behavior. For example in one of my models, I read in a file and later the data seems to disappears. If I try to write the data to a file, the file ends up with 0 length.

$handle = fopen($fname, "rb");
$size = filesize($fname);
$bk = fread($handle, $size);
fclose($handle);

at this point I can verify that the data was read in correctly. I can echo $bk and $size is correct. I can actually echo $bk and it is there--the data was read in OK. But then later on when I try to process the data, $bk is empty.

Immediately after the fclose() call
, I tried to dump the data to a file:

$ret = file_put_contents("/tmp/bla", $bk);

The file bla is created in /tmp and $ret has the correct length but the file is empty.

If I write similar code to write data to a tmp file it all works from a command line script--so the cli version is working fine on this new system.

The original Ubuntu 8.04 box was running PHP 5.2.4 and on the new Ubuntu 9.04 box it is PHP 5.2.6.

As I mentioned, this is all code that was working on the original box but not on the new system.

Any help would be greatly appreciated.

Thanks,

-Andres




Theme © iAndrew 2016 - Forum software by © MyBB