-1

I've a class named SearchItem and another script called sample.php which includes SearchItem class. When I call the class, it gives error "SearchItem" class not found. But i know it was included before. PHP does not recognise capital letter i. Do you have any idea or suggestion? My system configuration is like below :

PHP 5.4.36, Centos 5.9, Apache Server version: Apache/2.2.3

  • 1
    Your question is lacking relevant code. It's not likely PHPs fault if the lookup fails. Use an autoloader which *properly* handles the mapping between identifiers and filenames, such as [phpab](https://github.com/theseer/Autoload). – mario Jan 24 '15 at 19:22
  • Sorry for unclear explanation. It works correctly on ubuntu at local. it gives error on centos at server. Files are not same like above which i was explained. There are more than two files and lots of code, if i extract a sample code, i will copy here. Thank you for your answer. – Mustafa Ergüven Jan 24 '15 at 19:52

1 Answers1

0

Finally i've resolved the issue. it was about locale.

In php code, LC_CTYPE must be enlish locale, other locale settings could be any language, no matter what they are

If you set LC_CTYPE up another language, php does not recognize some characters like local accent char 'I'.

setlocale('LC_ALL', 'tr_TR.utf-8');

setlocale('LC_CTYPE', 'en_US.utf-8');