I use many functions in my PHP codes like these; UID(), user_getProfileImage() ... etc. I write all my projects on Windows and work well. This is normal, but when I put my project on my server, it gave an error like this:
Fatal error: Call to undefined function UID() in /var/www/vhosts/...
What? Is it undefined ?!
I check all my project files and FTP uploads all the files to the server again, again ... And the same error.
But when I change the name UID()to UID()(both in lib.php and other places where it is used), it works well.
So what's the problem? What is wrong with this server?
Local PHP vers: 5.3.10
PHP server info: http: // ... deleted
Note. I encode all PHP files in "UTF-8 without specification" (as always) using Notepad ++, and it is interesting that another project works well, even uses the same functions and runs on the same server.
Thank.
/ ################################# /
UPDATE (and solution);
- Do not use the symbol βIβ (metropolitan βiβ) in any function name or
- Just use setlocale like this;
setlocale(LC_TIME, "tr_TR.UTF-8")// I only need to set the locale time and use this If you need LC_ALL, be sure to install back LC_CTYPEin en_US, i.e.:
setlocale(LC_ALL, "tr_TR.UTF-8"); setlocale(LC_CTYPE, "en_US");
K-gun source
share