• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help, Problem start codeigniter

#1
[eluser]dimza[/eluser]
i have problem from beginning to start codeigniter,

i copy folder codeigniter 2.1.2 to my apachetriad 1.5.4

this error in below :

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: count

Filename: core/Common.php

Line Number: 531





A PHP Error was encountered

Severity: Notice

Message: Undefined variable: count

Filename: core/Common.php

Line Number: 533

A PHP Error was encountered





Severity: Notice

Message: Undefined variable: count

Filename: core/Common.php

Line Number: 531

A PHP Error was encountered






Severity: Notice

Message: Undefined variable: count

Filename: core/Common.php

Line Number: 533



please help!

#2
[eluser]dimza[/eluser]
this error log.

DEBUG - 2012-09-11 23:35:09 --> Config Class Initialized
DEBUG - 2012-09-11 23:35:09 --> Hooks Class Initialized
DEBUG - 2012-09-11 23:35:09 --> Utf8 Class Initialized
DEBUG - 2012-09-11 23:35:09 --> UTF-8 Support Enabled
DEBUG - 2012-09-11 23:35:09 --> URI Class Initialized
DEBUG - 2012-09-11 23:35:09 --> Router Class Initialized
ERROR - 2012-09-11 23:35:09 --> Severity: Notice --> Undefined variable: count C:\apache2triad\htdocs\CodeIgniter_2.1.2\system\core\Common.php 531
ERROR - 2012-09-11 23:35:09 --> Severity: Notice --> Undefined variable: count C:\apache2triad\htdocs\CodeIgniter_2.1.2\system\core\Common.php 533
DEBUG - 2012-09-11 23:35:09 --> No URI present. Default controller set.
DEBUG - 2012-09-11 23:35:09 --> Output Class Initialized
DEBUG - 2012-09-11 23:35:09 --> Security Class Initialized
DEBUG - 2012-09-11 23:35:09 --> Input Class Initialized
ERROR - 2012-09-11 23:35:09 --> Severity: Notice --> Undefined variable: count C:\apache2triad\htdocs\CodeIgniter_2.1.2\system\core\Common.php 531
ERROR - 2012-09-11 23:35:09 --> Severity: Notice --> Undefined variable: count C:\apache2triad\htdocs\CodeIgniter_2.1.2\system\core\Common.php 533
DEBUG - 2012-09-11 23:35:09 --> Global POST and COOKIE data sanitized
DEBUG - 2012-09-11 23:35:09 --> Language Class Initialized
DEBUG - 2012-09-11 23:35:09 --> Loader Class Initialized
DEBUG - 2012-09-11 23:35:09 --> Controller Class Initialized
DEBUG - 2012-09-11 23:35:09 --> File loaded: application/views/welcome_message.php
DEBUG - 2012-09-11 23:35:10 --> Final output sent to browser
DEBUG - 2012-09-11 23:35:10 --> Total execution time: 0.1789

#3
[eluser]deqer[/eluser]
I do not understand the reason for this: "copy folder codeigniter 2.1.2 to my apachetriad 1.5.4"

There are no errors in CI. Perhaps you extracted it incorrectly.

If you are testing locally, you can setup a virtualhost in your apache httpd.conf file, point it to a new folder with codeigniter.

When you extract codeigniter to the folder, make sure you extract with paths.

#4
[eluser]deqer[/eluser]
Okay, I see now.

You found an official bug.

Not sure if the bug is actually causing any problems though, but it's still a bug or an error in code.

Code:
do {
    $str = preg_replace($non_displayables, '', $str, -1, $count);
}
while ($count);

It's a little strange that $count is being used for both the replacement count and the loop count, hehe. Also, $count is not defined previous to this code.

You shouldn't need to run a preg_replace() through a loop. Regular Expressions have the power to do that already.

You can change that entire block of code to:
Code:
$str = preg_replace($non_displayables, '', $str, -1);

and the Notice errors will go away.

#5
[eluser]dimza[/eluser]
in wheres file i can change $str = preg_replace($non_displayables, '', $str, -1); code?

#6
[eluser]dimza[/eluser]
OK thanks i got it. hehehe


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.