phpMyAdmin on macOS: where does it save config.inc.php? - php

Downloaded the latest phpMyAdmin to be used on macOS 10.15 Catalina (local webserver), extracted the phpMyAdmin files to my web root.
During the setup I chose config authentication and now when I visit the setup page I'm getting some mysqli error.
I deleted the entire phpMyAdmin/ dir and wanted to start all over again. However to my surprise, the previously entered (incorrect) server details are still there.
I would assume the any config.inc.php would be saved within phpMyAdmin's own dir, but apparently it's saving this data somewhere else.
How/where can I find it, so I can delete it and truly start a complete new phpMyAdmin setup from scratch?
P.S. I already tried:
/etc/phpmyadmin/
/usr/local/phpmyadmin/
/usr/local/etc/phpmyadmin/
/usr/local/opt/phpmyadmin/
But neither of these dirs exist.

If you've simply downloaded the phpMyAdmin file yourself and uncompressed it to your web root, then the config.inc.php file goes in that phpMyAdmin folder. If you've used brew or some other package manager, they each have their own location for configuration files, but that doesn't seem to be the case here.
It's not clear why the old server details have been retained, maybe your browser has cached the old page or something, but the only place that phpMyAdmin looks for the configuration is in the main folder. Is there a chance you're seeing the defaults, rather than some custom setting? (The defaults would be to use auth_type cookie connecting to host 'localhost').
What is the specific mysqli error message you're seeing?

Related

Error establishing a database connection on localhost xampp os x

i am very beginner in wordpress and want to learn it and the first step was fail :(
i tried to install it on localhost (xampp) and this error "Error establishing a database connection" kept shows
i did every step in this video https://www.youtube.com/watch?v=A3fXcvnzlkw
install xampp-osx-5.6.30.
turn on mysql database and apache server.
go to phpmyadmin and add new database name it "wp".
download wordpress 4.7.2
copy the wordpress folder to htdocs then rename it to wp.
go to wp-sample-config rename it to wp-config change the database name to wp, database username to root and database password empty ''.
in the browser localhost/wp/wp-admin/install.php
then the error shows
i tried to add new user in the phpmyadmin and change the wp-config
i tried to change the database host from localhost to 127.0.0.1 in wp-config
i tried to unistall xampp twice
i tried different program mamp
nothing helped
my os x version is os x yosemite 10.10.5
should i change any sittings in my computer?
is there any programs that i may install it causes the problem?
what can i do?
here some photo
wp-config /
Steps 6 and 7 aren't needed. WordPress creates the wp-config.php file when it discovers that there isn't one there. It prompts you for the database username, password, server (default localhost) and table prefix that you want.
Then it will ask you for some information about the site. Normally that's all you need to do, it will set up wordpress for you from this information. It might not like an empty password for the database user though. If you haven't changed the password you could try root as I think that is the default - root/root
You need to check first that xampp is working correctly though e.g. by outputting a simple html file.

Magento DEV. clone are redirectingg to the main URL [duplicate]

We have moved out magento site to another host. But it is redirecting to the old site
We did following changes before moving the site
1. DB backup
2. files are zipped and copied to another host.
after moving the site to another host
1. changed the /web/secure and /web/unsecure values in the DB.
2. In magento files /app/etc/local.xml changed the database name.
3. cleared the var/cache
4. cleared the var/tmp
5. cleared the var/session.
but still the magento site is redirected to old site.
Can any one help me with this.
Thanks
Several steps involved in cloning or moving a website.
NOTE: It's common practice to empty the var/cache, var/session directories before copying to new location. Clearing cache is mentioned below as it's necessary to clear the cached config after you've run through the list and properly set database access, BaseURL, etc.
Copy application files to new location and import database into MySQL. (best to do this with a tarball and database dump sql file, ftp has issues with things like getting .htaccess files to transfer, case to matter, etc.) Note: more sophisticated Magento admins use rsync, it's far easier.
(important!!) Make sure file/folder permissions and owner/group are correct so that var/ folder system is writable. Otherwise the Magento cache gets written in system /tmp instead of Magento var/ and only a server reboot or manual deletion will clear Magento cache out of /tmp . Also, not having var/ writable means that any drastic errors that write a file to var/report/ will fail to write any stack traces, compounding your installation heartburn.
Make sure app/etc/local.xml points to the proper database and make sure if you back up the original local.xml that it doesn't end in .xml -> needs to be something like local.xml.sv1
Change your database entries Unsecure BaseUrl for and Secure BaseURL to point to your new location (http://www.example.com and if ssl cert installed https://www.example.com respectively). Use phpmyadmin to look for the paths web/unsecure/base_url and web/secure/base_url in the core_config_data table. (Note: entries will exist for each scope set, minimum is Global)
Manually clear your cache by deleting all the mage--? subfolders in var/cache
If you were using the compiler on the previous site, disable compiler with SSH command line php shell/compiler.php disable from the Magento root.
Attempt to load your admin backend, you should be on the new server URL now.
Following these steps should clear all the hiccups that cause Magento to adamantly redirect back to the old server. And believe me, I've had them all happen.

The file 'wp-config.php' already exists?

I have made a copy of and edited the wp-config-sample.php file with all of the database details that should be in it (obtained from my host, and also created in mamp pro data user).
I have also replaced the unique phrases and corrected all $ with S as suggested by WordPress forum, forums here and tutorials.
I also then saved it as wp-config.php as suggested. When I then go to Wordpress and say submit it says that the file already exists.
In my Wordpress folder there is both the original sample file and the edited one I was asked to either create or edit. If I delete the sample page and submit it says I am missing a wp-config.php and need to create it. I put it back and it says the file already exists. I then edited the wp-config-sample.php file and just corrected the name as wp-config.php and still nothing I try or change works.
(I solved this problem as my root password in mamp pro was not the same as in the wp.config file, as soon as I had that corrected it all fell into place and worked :-))
sorry, i am not allowed to comment, but are you developing on a local machine or through a web hosting? I believe your in Mac. The safe bet here would be, for you, to delete the wordpress folder in the htdocs directory, untar it again there, and from the browser go to localhost/wordpress-folder-name and follow the wizard. (open up localhost/phpmyadmin to setup MySQL database)
If you want to put the wordpress in a live web host, then use ftp to upload the wordpress directory (you will have to change the settings). So, actually, unzipping a fresh copy of wordpress directly, and following the wordpress setup wizard online would be easy. For the MySQL database, use the settings provided by the host.
In these steps, you never have to touch the wp-config-sample.php nor wp-config.php file.

How to repair wamp server without re-installing?

After making changes in php.ini by uncommenting
extension=php_openssl.dll
My Windows-8 system got shutdown due to power failure and later i use to get this error when i try to start wamp server
Later visiting some link i added the below code to wampmanager.ini file as it was empty
Now the first error got fixed and now throwing this error mentioned below:
Later i also installed visual c++ 2008 to fix this error but unsuccessful. I have many important databases which i have not taken back up also. I am trying to repair this wamp server without re-installing. Can anybody please assist me with this.
Thanks in Advance
go to the wamp/scripts folder
open console
run:
php refresh.php
this should recreate wampmanager.ini
(requires wampmanager.tpl file in wamp folder.
taken from http://sourceforge.net/p/wampserver/feature-requests/10/#750b)
This document may help you How to uninstall WAMPServer without actually uninstalling it
The idea is that you uninstall your current version without actually running the unninstall and without actually deleting any files from your existing install.
You then rename the current wamp folder and then install the same version of wamp, make sure it works, and then copy all your sites and databases to the new installed wamp. If you install exactly the version of WAMP you have currently then you can copy the whole of the .../mysqlx.y.z/data folder and all you databases and users should be there on the new install.
This gets over whatever damage was done to your existing install. You may need to edit the php.ini and httpd.conf to match your existing configuration. I suggest you do not do a straight copy of either of these files as that may just get you to where you are now.
Fixed by installing wamp again into the same directory by renaming the older wamp. I just replaced wampmanager.ini file of new to the old one. Earlier it was just a little piece of code i pasted in wampmanager.ini file. But now it is a big one which fixed this issue. Thanks a lot for you guys, your suggestions saved my time. I did not change anything with php.ini also.
Backup all YOUR databases in SQL format and store the backups somewhere safe.
Stop All Services.
Remove the Apache Service.
Remove the MySQL Service.
Exit WAMPServer.
Rename your current \wamp folder to \wamp_old (This is your backup. DONT FORGET THIS STEP)
To all intents and purpose, you have uninstalled WAMPServer now.
7. Download and Install the new WAMPServer version
(32bit is recommended, 64bit is only for geeks and 64bit PHP is not yet fully converted to 64bit)
Change NOTHING! Check it works in its out of the box state.
Clear your browser cache ( CTRL+F5 ) to avoid any funnies with cached content.
Run localhost
Run phpMyAdmin (If asked for a Username and password; username = root / password = (nothing, leave this blank)
Run \wamp\www\testmysql.php. you will need to edit the file and change the "mysql_connect('127.0.0.1', 'root', '')"
If you want to bring some/all of your old versions of Apache/PHP/MySQL into the new WAMPServer
(Remember, one of the big advantages in WAMPServer is the ability to switch between versions of Apache/PHP and MySQL)
Apache: copy \wamp_old\bin\apache\apachex.y.z folder to \wamp\bin\apache\apachex.y.z
PHP: copy \wamp_old\bin\php\phpx.y.z folder to \wamp\bin\php\phpx.y.z
MYSQL: copy \wamp_old\bin\mysql\mysqlx.y.z folder to \wamp\bin\mysql\mysqlx.y.z
To tell WAMPServer about the old version of Apache/PHP/MySQL you just copied across run a "refresh",
right click the wampmanager icon -> Refresh
Give it a few seconds to go find all the new versions.
Compare your old configs with the new configs, move over any of your local change/requirements.
Remember, config parameters change between versions of Apache/PHP/MySQL !
Make sure your old changes are still required, valid, legal. ( Check the upgrade notes provided by all 3 software providers )
If it all goes horribly wrong. Check the bottom of this Doc to see how to unwind all these changes easily if you get problems.
help you
I have had the same issue. I am working with WAMP 2.5 version. The content of "wampmanager.ini" is OK but it's possible that the php path is wrong. Check folders of section [StartupAction], in my case my php version is "php5.5.12". Surely the error message "The directory name is invalid" was for this.
In win10 you can just right click on the wampmanager.ini file in the root and select Restore Previous Version, then just choose one from a few days ago when it worked.
i have similair issue in the morning and searched SO and other forums but none of the solution worked for me.
It was
syntax error on line number 561 (due to MariaDB)
After checking all wamp installation for MariaDB, i find out that file at root: wampmanager.conf contain lines about MariaDB. I removed all of those and then restarted wamp. It worked like charm!
Rename the wamp folder, you can just add a 1 or 0 to somehing like wamp641 then
re-install wamp server
3.copy paste the mysql and project folders from Bin and WWW respectively from the renamed wamp folder to the newly created folder after installation so that you dont loose any database and project files from your previous projects.
4 start your wamp and it should work well.

Configure PHP to work with MySQL and phpMyAdmin

My purpose is to setup a forum in php just locally on my Windows 7 machine to test how it works.
I have installed Apache HTTP Server and PHP v5 successfully. Then I downloaded and extracted the phpbb-forum software and put it in my root folder. Then I realized that I needed some kind of database so I downloaded and installed MySQL. To configure my database I also downloaded and extracted phpMyAdmin but I can't get it to work. When I open my browser and navigate to my phpMyAdmin-folder I simply get this:
Screenshot: http://img836.imageshack.us/img836/5139/captureqb.png
I use my Apache server to preview my website where I'm using some php include functions so I know that I've a "working" PHP installation. The MySQL service is also running on my computer.
However, do you need to configure PHP and/or Apache in order to get phpMyAdmin to work properly? I'm a complete noob on this so I suppose it may be multiple shortcomings.
Thank you.. //Realiserad
The simpler way is to install WAMP server : it bundle Apache, PHP, MySQL and PHPMyAdmin preconficurated for work together.
You need to enable the MySQL extension to use MySQL from PHP.
The MySQL extension may or may not be bundled with your PHP distribution. (look for php_mysql.dll in the ext folder)
Assuming it's installed you can enable it by adding or uncommenting this line in your php.ini:
extension=php_mysql.dll
As other people have said it may be simpler to install WAMP Server
Have a look at: http://www.ricocheting.com/how-to-install-on-windows/mysql - Specifically, the 3rd step. It involves downloading the mySQL PHP Extention (which is a dll), and un-commenting a line of php.ini so that PHP Load's the extension.
While is may be simpler to install XAMPP or WAMP, I think that it's good to know how to fix your own problems - Scientia potentia est :D
not very familiar with windows, but it seems like you miss the php-mysql extension, which you can download from here (i think):
http://mysql2.mirrors-r-us.net/downloads/connector/php/index.html
would be alot easier for you to use a preconfigured wamp install like this one (available for win/mac/etc). google "xampp", i'm not allowed to post more than one link due to stackoverflows spam protection.
Configure PHP to Access MySQL
Open the c:\php\php.ini file with your favorite text editor.
Uncomment the following lines by removing the semicolon:
extension=php_mysqli.dll
extension=php_mbstring.dll
extension=php_mcrypt.dll
save and exit editor
After extracting the archive into phpmyadmin folder, you will have to configure phpmyadmin before you can connect to sql server.
you should create a configuration file. This file can be created manually (simply use a text editor),
During your first session you will see an error message.
To solve this problem you should create folder (C:\project\wwwroot\phpmyadmin\config). After that give full rights for IIS_IUSRS group and IUSR user.granting permission/image
Return to the config window. Visit localhost/phpmyadmin/setup/
To configure the connection settings click on the “New Server” button.
Enter the verbose name of the SQL server, and then the server hostname. If necessary, you can specify other settings.[setting up/image][2]
Save the settings and then the server will redirect us to the previous page. Choose:
the default language – English
the default server – 127.0.0.1
end of the line – Windows (\ r \ n)
Click Save, and then download. The received file (config.inc.php) you should save to the root directory (C:\project\wwwroot\phpmyadmin).
Open the authorization window (//localhost/phpmyadmin/) and login under root account. If you see a starting phpMyAdmin window, you can delete config folder.
For the correct work phpMyAdmin requires a database with the information. The script for creating database is already installed.

Categories