I have my site up and running, and I need to change now database to outside host I just purchased, but it keeps showing error...
I use CakePHP, I configure database.php file
Funny part is that layout works, it shows as it's new database selected, but view inside isn't working, it keeps telling me that there is no that file found...
I don't know what is relation between database.php and files, but it simply won't work...
If I'm move to new database host, what should I change beside database.php?
Is CakePHP caching data somewhere or something that I should change/delete/update?
Or is there another file that should be changed?
Please help!
I need this, users are on site and keeps seeing errors!
Possibilities: If you moved from a windows test server to a Linux production server, you could have case differences in your names.
Another thought is that you did not actually upload all the code files to the server.
Related
I've got a live site, which I downloaded in order to be able to customize it more precisely by editing the code. I followed the steps of this tutorial.
What I've done so far:
Downloaded the files of my site.
Downloaded its database.
Created a new database (with the same name that is included in wp-config file).
Imported the downloaded database into the newly created one.
Edited the two entries according to step 5 in the tutorial and of course, added a new user with global privileges.
Edited the hosts file to have a custom domain.
Restarted Apache & MySQL (I use XAMPP).
Now it is still displaying the same error message, that a database connection could not be established.
There is "localhost" set up, but I am not able to use it, I can only connect to my offline sites by using 127.0.0.1.
I'd really appreciate your help.
This issue happened when the site transfered from a plesk server to a cpanel.
All the site was filled with \r\n\r\n\ .I deleted all of them inside in the site but DB is filled with them. The issue is that when you make and new order in the NAME LAST NAME fields they appear in front of them \r\n\.
[EDIT] Transfer was made manually (downloaded in my pc and then uploaded via ftp) Database imported via ssh
I am not sure for this but i think that the DB was like this before transfer but this doesn't made any problem in the site.
Can someone help me how to remove them?
I literally had the same thing today setting up a local version. I thought it was an environment issue, until I compared the content in a DB entry to my remote.
I had done a quick dump from PHPMyAdmin, as soon as I connected via Sequel Pro and got a dump that way, all was fine. This would mirror what #ceejayoz is recommending, just different way.
Seen some other questions regarding this but not sure what I am doing wrong. Here is what I've done:
downloaded and unzipped a fresh install of wordpress to /Sites/wordpress
Started MAMP and set document root to above
Opened up phpmyadmin and created a new database named the same as the database I want to import. (I figured I did not need to change the url's in the older database because they will be the same on my computer? 'localhost/mysite')
Imported localhost1 database to newly created database
I know that user and password created are root, but I created an additional user and password to mimic what was in the wp-config of the original site (localhost1). I also changed localhost2's wp-config DB name, user, password to match that of localhost1 so that they are the same.
From this point I try and go to http://localhost:8888 or localhost/mysite but I basically get a 'This webpage is not available' screen as if I'm not online.
Any ideas?
This might have to do with variants serialized in the database even if the URL paths stay the same. Try taking the localhost1 database and migrating to localhost2 after using a serialization tool like this.
I realize you are not changing URL paths, however I've read that tables are all serialized so it's worth a try.
The problem in my opinion is not in the database, because WP will tell you if it is.
Problem must be in your local server configuration. In Windows I made different folder for different projects and access them like localhost/project1, localhost/project2 etc.
I don't know how are things in Mac, but must be the same. So try to start a fresh copy of WP in your new localhost, and then import database from first project.
When WP first starts creates .htaccess file with modrewrite, so you can also check current .htaccess file and rules there.
I inherited an old (version 1.4) Mediawiki installation. I'd like to update it, but have had a lot of trouble doing so.
I downloaded Mediawiki 1.19 and put it in a new directory. I put the old LocalSettings.php file in this new directory, altering only the $wgScriptPath variable to reflect the new directory name. I didn't alter the database name, user, or password.
When I try to run the update.php script, I get this:
DB connection error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (localhost).
I've googled this pretty extensively. It's a common enough error, but most of the solutions involve cases where MySQL wasn't running in the first place or where something about the socket needs to be changed at a global level (i.e., for the whole site). Neither of these cases can apply, since there is a lot of other MySQL stuff going on with the site that is working fine.
On the off chance that something was wrong with the user credentials, I tried creating a completely new user and adding that user to LocalSettings.php, but I still get the same error.
Any tips would be greatly appreciated.
It seems that my initial download of Mediawiki 1.19 was somehow corrupt or incomplete. I re-downloaded the software and everything worked fine.
I have written a module that is refusing point blank to create the tables within my mysql4-install-1.0.0.php file....but only on the live server.
The funny thing is that on my local machine (which is a mirror of the live server (i.e. identical file structure etc)) the install runs correctly and the table is created.
So based on the fact that the files are the same can I assume that it is a server configuration and or permissions problem? I have looked everywhere and I can find no problems in any of the log files (PHP, MySQL, Apache, Magento).
I can create tables ok in test scripts (using core_read/write).
Anyone see this before?
Thanks
** EDIT ** One main difference between the 2 environments is that on the live server the MySQL is remote (not localhost). The dev server is localhost. Could that cause issues?
Is the module which your install script is a part of installed on the live server? (XML file in app/etc/modules/, Module List Module for debugging.)
Is there already a record in the core_resource table for your module? If so, remove it to set your script to re-run.
If you file named correctly? The _modifyResourceDb method in app/code/core/Mage/Core/Model/Resource/Setup.php is where this file is include/run from. Read more here
Probably a permissions issue - a MySQL account used by public-facing code should have as few permissions as possible that still let it get the job done, which generally does NOT allow for creating/altering/dropping tables.
Take whatever username you're connecting to mysql with, and do:
SELECT User, Host
FROM mysql.user
WHERE User='your username here';
This will show you the user#host combos available for that particular username, then you can get actual permissions with
show grants for username#host;
Do this for the two accounts on the live and devlopment server, which will show you what permissions are missing from the live system.
In the Admin->System->Advanced section is your module present and enabled?
Did you actually unpack your module to the right space, e.g. app/code/local/yourcompany/yourmodule ?
Do you have app/etc/modules/yourmodule.xml - I believe that this could be the overlooked file giving rise to your problem.
the cache could be the culprit, if you manually deleted the core_resource row for your module in order to make the setup sql run again, you have to also flush the cache
probably a difference between dev and production servers is cache settings, that would explain why you only see this in production
For me, the issue appeared using Windows for development. Linux system is case sensitive. In my config.xml the setup section was named camelCase while the folder was named all-lowercase. Making them the same made the script run.