XAMPP and disabled advanced features - php

Absolutely cannot get rid of these errors in phpmyadmin Version information: 4.2.11
$cfg['Servers'][$i]['users'] ... not OK [ Documentation ]
$cfg['Servers'][$i]['usergroups'] ... not OK [ Documentation ]
Configurable menus: Disabled
$cfg['Servers'][$i]['navigationhiding'] ... not OK [ Documentation ]
Hide/show navigation items: Disabled
$cfg['Servers'][$i]['savedsearches'] ... not OK [ Documentation ]
Saving Query-By-Example searches: Disabled
I have tried the following:
ran SQL
CREATE TABLE IF NOT EXISTS `pma_users` (
`username` varchar(64) NOT NULL,
`usergroup` varchar(64) NOT NULL,
PRIMARY KEY (`username`,`usergroup`)
)
COMMENT='Users and their assignments to user groups'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
CREATE TABLE IF NOT EXISTS `pma_usergroups` (
`usergroup` varchar(64) NOT NULL,
`tab` varchar(64) NOT NULL,
`allowed` enum('Y','N') NOT NULL DEFAULT 'N',
PRIMARY KEY (`usergroup`,`tab`,`allowed`)
)
COMMENT='User groups with configured menu items'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
CREATE TABLE IF NOT EXISTS `pma_navigationhiding` (
`username` varchar(64) NOT NULL,
`item_name` varchar(64) NOT NULL,
`item_type` varchar(64) NOT NULL,
`db_name` varchar(64) NOT NULL,
`table_name` varchar(64) NOT NULL,
PRIMARY KEY (`username`,`item_name`,`item_type`,`db_name`,`table_name`)
)
COMMENT='Hidden items of navigation tree'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
Then updated my config.inc.php with
$cfg['Servers'][$i]['users'] = 'pma_users';
$cfg['Servers'][$i]['usergroups'] = 'pma_usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma_navigationhiding';
Then flushed table caches and restarted phpMyAdmin. The tables for pma_users and uaergroups have been created, but I still get the errors.
PLEASE HELP! This is causing serious issues with my drupal functionality.
Note, I have not yet set root or pma_user passwords.

Ultimately my solution to this problem was to move away from XAMPP local hosting. I moved my site files to remote server, and installed my database and imported my database to their phpyadmin without any issue. Site is now connecting and working beautifully. Spending countless hours following every post I could find and referring to the phpmyadmin documentation were to no avail as opposed to just abandoning ship and going with potentially a more novice user like myself. This worked for me because the remote hosting option was a viable. Unfortunately this answer is not helpful to those whom still need local hosting environment and are using XAMPP. I have the Aquia Dev Desktop that included XAMPP with great success in the past and maybe good option some.

Related

MySQL: #1293 - Incorrect table definition

Designed Database and Table in Local Server Using MySQL 5.6.17 and Export into *.sql file.
When try to Import *.sql file into Live Server(MySQL 5.1.36) got below Error:
#1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
Understood the issue through this link
Is there any way to import Local Server's *.sql file to Live Server without Updating MySQL Version?
TABLE:
CREATE TABLE 'currency' (
'id' int(11) NOT NULL AUTO_INCREMENT,
'currency_name' varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT
NULL,
'country' varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
'currency' varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
'created_by' int(11) NOT NULL,
'created_on' timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
'status' int(1) NOT NULL DEFAULT '1',
'modified_by' int(11) DEFAULT NULL,
'modified_on' timestamp NOT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY ('id')) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
NOTE:- Windows Server Running WAMP(Local Server) and QNAP(Live Server).
There is not a direct way to do it, since this is not a valid table definition for any version prior to MySQL Server 5.6.5.
You could edit the dump file by hand or with a tool like sed or perl to modify the offending lines, or you could change the table definition on the source server... but then your application, which presumably expects this behavior, isn't going to work properly.
You could also modify the table definition to make it valid for 5.1, with only one automatic timestamp, and use triggers to get the rest of the desired behavior.
The best course, of course, is one of these:
update the 5.1 server to 5.5 and then to 5.6, or
when developing for a 5.1 server, always use 5.1 in the development environment, so you don't get into conditions like this, relying on newer features that aren't compatible with older deployments... remembering, though, that there are some pretty significant improvements that happened in version 5.6.

Where can I find create_tables.sql for phpMyAdmin?

When logging into phpMyAdmin I receive the following warning:
The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated.
I am attempting phpMyAdmin's suggested remedy here: http://docs.phpmyadmin.net/en/latest/setup.html#manual-configuration
I tried finding create_tables.sql, like this...
find / -name 'create_tables.sql'
I even tried finding all .sql files, like this...
find / -iname '*.sql'
...but it wasn't one of the files found.
Is there somewhere I can download this file?
The links at the top of the documentation page were useless.
Go to http://www.phpmyadmin.net/home_page/downloads.php
Download one of the packages, and in the root you will find the ./sql/create_tables.sql file that the documentation was referencing.
It also turns out the create_tables.sql file that is downloadable from the link above is missing one of the tables pma__designer_coords
To add the missing table, run the following query:
CREATE TABLE IF NOT EXISTS `pma__designer_coords` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`x` int(11) DEFAULT NULL,
`y` int(11) DEFAULT NULL,
`v` tinyint(4) DEFAULT NULL,
`h` tinyint(4) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Get it together phpMyAdmin.

MySql Query Running in localhost but not in the Web Server

I have a database table something like this...
CREATE TABLE IF NOT EXISTS `example` (
`id` varchar(78) COLLATE latin1_general_ci NOT NULL,
`username` varchar(78) COLLATE latin1_general_ci NOT NULL,
`password` varchar(78) COLLATE latin1_general_ci NOT NULL,
`reg_date` date NOT NULL,
`reg_time` time NOT NULL,
`permission` varchar(78) COLLATE latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
Now I am performing a query from PHP is ...
INSERT INTO `example` (`id`, `username`, `password`, `reg_date`, `reg_time`, `permission`) VALUES ('j652hsL', 'example_user', 'secret', '', '', '');
This query is running Perfectly in my localhost with a warning of course but not problem in data insertion... Yes the reg_date, reg_time & permissions fields are holding 0000-00-00, 00:00:00& *Blank* respectively...But there is no problem with Insertion... Now this same Insertion Query is not running on a certain Web Server...
I have a web server and I tested it there it was running with no Error but When I shifted to different Web Server it wasn't running there... I think its a some kind of Server settings issue... But What possibly could stop it from inserting the Data?
Thanks all in advance.
Check if your local server and the web server uses different SQL MODE. Depending on how strict the mode is it handles zero-dates, default values and other things differently.
To get the current setting run show variables like 'sql_mode' on both servers.

Getting extra column 'require_validation' when asking for table columns

When using the query
select distinct(column_name) as column_name, data_type from information_schema.columns
where table_name='reg_add_ons' order by ordinal_position
I get an extra column on my dev server. On my local server everything works fine. This is the only table this happens on. I have tried dropping the table and adding it again with this statement
delimiter $$
CREATE TABLE `reg_add_ons` (
`add_on_id` int(10) NOT NULL AUTO_INCREMENT,
`eventcode` varchar(20) DEFAULT NULL,
`add_on_desc` varchar(250) DEFAULT NULL,
`add_on_price` decimal(10,2) DEFAULT NULL,
`add_on_detail` text,
`add_on_label` varchar(100) DEFAULT NULL,
`add_on_choices` varchar(200) DEFAULT NULL,
`image_name` varchar(100) DEFAULT NULL,
`internal_only` varchar(2) DEFAULT NULL,
`assign_code` text,
`reg_status` varchar(50) DEFAULT 'Active',
PRIMARY KEY (`add_on_id`)
) ENGINE=MyISAM AUTO_INCREMENT=89 DEFAULT CHARSET=latin1$$
I have a bit of the flu so this is not making sense to me right now.
Dev box is a Windows 7 machine running MySQL 5.6.10
Localhost is Windows 7 running MySQL 5.5.24
Production server is Linux MySQL 5.0.45
It is only this one table on this one machine (Dev) having problems. what is the field require_validation? Where does it come from?
Any insight is appreciated

MySQL Query Works on My Laptop, but Not on Server

I worked on a site locally through my Laptop. I have a table named blog and it has the fields post_id, title, markdown, author, added, and modified.
The fields Added and Modified are both DATETIME's.
When a user makes a blog post, PHP runs this query successfully: INSERT INTO blog (title, author, markdown, added) VALUES ('BLA', 'BLA', 'BLA', NOW())
I've gone into phpMyAdmin and ran the exact same query with working results.
Now, I exported my exact database into the server today and I noticed that no posts were being stored in the DB, so I tried running it through phpMyAdmin's SQL and it gave me the error Field 'modified' doesn't have a default value.
Why would this be happening? In my database, the default for both is None so I'm quite confused on what could be causing this.
My Laptop has PHP 5.3.1 and MySQL 5.1.41 (I installed XAMPP.)
The Server has PHP 5.3.5 and MySQL 5.5.8 (Out of desperation I installed the newest versions. The server was originally running MySQL 5.1 and a lower version of PHP.)
This has been killing me, hopefully someone knows what's wrong with this or how to fix it.
Edit: Here are the SHOW CREATE TABLE blog results.
Laptop:
| blog | CREATE TABLE `blog` (
`post_id` mediumint(9) NOT NULL AUTO_INCREMENT,
`title` varchar(160) NOT NULL,
`author` varchar(100) NOT NULL,
`markdown` longtext NOT NULL,
`added` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`post_id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 |
Server:
| blog | CREATE TABLE `blog` (
`post_id` mediumint(9) NOT NULL AUTO_INCREMENT,
`title` varchar(160) NOT NULL,
`author` varchar(100) NOT NULL,
`markdown` longtext NOT NULL,
`added` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`post_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 |
Auto Increments are different because of my tests.
ALTER TABLE blog CHANGE modified modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
Or, more rarely, you might have a buggy version of MySQL on your server.
*I might have the syntax imperfect, I referred to the last comment on ALTER TABLE at the bottom of the manual page.
First: are you sure the data on your laptop exactly the same as the data on the server? Maybe you're not getting this error on your laptop because the default values are set on your laptop table somehow and not the server -- possibly an issue with how you exported the data.
When you say, the default is "None" do you mean NULL or do you mean literally the word "None"?
If both fields are datetime fields, then set the default to NOW() or, if you prefer to not have an actual date and time by default, use a string like "0000-00-00 00:00:00", or the JDBC friendly "0001-01-01 00:00:00".
Compare the structure of each table with the following command in a mysqlclient:
SHOW CREATE TABLE blog;
Dump the DDL from both versions using
$ mysqldump --no-data dabasename
and compare them (and check the man page for mysqldump(1) as I'm flying by memory here.)
Make sure you're using the same exact table description and that both versions are using the same engine.

Categories