A
Anonymous
Guest
Today is my second day that I'm setting up LAMP on my office laptop.
On first day I installed Ubuntu and tried to install LAMP but failed since I got some problem with mySQL and PhpMyAdmin. And to addition Ubuntu was lagging to much <_< old laptop.
On second day, thats toady, I switched to OpenSUSE. Since I spent some time trying to set up LAMP on Ubuntu, now it was much easier.
But I still encountered such problems as multiple virtual hosts, mod rewrite, .htaccess allowance.
Anyways I solved all those problems and my sites are looking just fine (Thanks for reading untill here) Except for one.
That one site is using uppercase table names in mySQL queries.
When I was on Windows, in PHP code I wrote table names in uppercase (since using lower or upper cases for table names in code was of no difference).
eg.:
Everything was fine, no errors viewing pages. But now, on Linux, it's different.
Problem:
On Linux I imported my databases via PhpMyAdmin, everything looked same as before.
Everything was good, until I checked that page. That page throws errors that tables (in uppercase) don't exist. Yeah.. they don't, but exist in lowercase, with was still fine on Windows.
To fix that I opened /etc/my.cfg file and at the end of file inserted line:
which should convert table names to lower cases on lookup, restarted mySQL service and nothing, still same errors.
Later on I noticed that changing /etc/my.cfg file doesn't do anything, even when it's content is empty or just random letters.
So my options are that /etc/my.cfg isn't right file for entering that line OR
This options don't convert table names in queries.
Neither I want to rewrite table names to lowercase in my code, nor to covert them on queries (I'm using database class)
On first day I installed Ubuntu and tried to install LAMP but failed since I got some problem with mySQL and PhpMyAdmin. And to addition Ubuntu was lagging to much <_< old laptop.
On second day, thats toady, I switched to OpenSUSE. Since I spent some time trying to set up LAMP on Ubuntu, now it was much easier.
But I still encountered such problems as multiple virtual hosts, mod rewrite, .htaccess allowance.
Anyways I solved all those problems and my sites are looking just fine (Thanks for reading untill here) Except for one.
That one site is using uppercase table names in mySQL queries.
When I was on Windows, in PHP code I wrote table names in uppercase (since using lower or upper cases for table names in code was of no difference).
eg.:
Code:
SELECT * FROM TABLE_NAME
Problem:
On Linux I imported my databases via PhpMyAdmin, everything looked same as before.
Everything was good, until I checked that page. That page throws errors that tables (in uppercase) don't exist. Yeah.. they don't, but exist in lowercase, with was still fine on Windows.
To fix that I opened /etc/my.cfg file and at the end of file inserted line:
Code:
lower_case_table_names=2
Later on I noticed that changing /etc/my.cfg file doesn't do anything, even when it's content is empty or just random letters.
So my options are that /etc/my.cfg isn't right file for entering that line OR
This options don't convert table names in queries.
Neither I want to rewrite table names to lowercase in my code, nor to covert them on queries (I'm using database class)