Cakephp loads old database config file - database

I developed a small cakephp website on local machine. When I upload to my host server, I realize that I must use their prefix for the database name and database user. So, I go and create new database name and new user. When I visit the site, it has this:
Warning (2): mysql_connect() [function.mysql-connect]: Access denied for user 'old_name'#'localhost' (using password: YES) [CORE/cake/libs/model/datasources/dbo/dbo_mysql.php, line 552]
I am 100% sure, I already change the name to "new_name", it runs on my local machine, but I dont know why it still load the old name. I go to ftp, and download the database config file, it clearly stated that, the database user is "new_name", i dont understand why when I go to the site, it loads the old database config. I am new to cakephp, please help.

try to clear the files from your app/tmp directory and tripple check the configuration.

Sometimes it can take a while for files to become live. One host I use has a folder for upload and then they transfer to the live folder from there automatically. Could it be something like this?
You possibly need to specify an IP for the database instead of localhost. Often the database is hosted on a different server to the code.

Related

moving wordpress website and database

I made wp website on my testing domain. I would like now to move it to local mamp server.
I have tried using updraftplus plugin, but it didn't work (website is constantly refreshing, sort of being in a loop).
Now I want to move it manually. I have downloaded whole website through ftp and I also exported db.
I made new dbd with same name on my mamp server/phpadmin. In wp-cofig the database, username, password are the same as in my testing page. however local site can't connect to db that I have imported (I have used the same name for database on local machine).
I have read several instructions how to do this, but now I'm lost.
Any help is really appreciated.
Try this solution:link
Did you use the same table prefix as you used in previous one.
and Don't Forget to Change your previous base URL to new local URL in each and every place in your SQL file.
find wp_options in database and change site url and home url from your testing domain to localhost

CakePHP project migration to different server

I am trying to move a cakePHP project I completed a few months ago from a server (a friend's server) to my own web server.
I have set up a database and changed the database config file to match my database/login credentials.
when I navigate to http://babbage.cs.missouri.edu/~jam2z9/muve/index.php you see it looks as if it is a brand new project. When I go to just /muve instead of index.php it says I'm missing a ~jam2z9Controller file but I don't see any files from the old server that are like this to edit and change to ~jam2z9.
I feel like this should be a very simple transition once I hook up the database credentials but I'm just confused as to what my issue is?
All of the database tables in my new database are blank as I just imported the .sql file into phpMyAdmin. It all seems to be connecting fine but it will not go to the home page just the aforementioned generic cakephp screen?
In your bootstrap.php add the following line:
Configure::write('App.base', '/~jam2z9/');
This is because as far as Cake sees it you are hosting it in a sub-sub directory.
Edit: There are more details about not being able to use mod_rewrite here

What files make one Wordpress site different from another

Migrating wordpress sites between hosts can take a lot of time, especially when the hosting platforms are different.
I have been trying to migrate my sites from Cpanel to Mediatemple, but it seems like im just not getting it right.
There is various options
Use the guide they provide
https://kb.mediatemple.net/questions/1556/Migrating+your+websites+to+the+Grid#gs
When moving the files in this way the permissions of the files are not set properly and I would have to got back through them and figure out which ones need to change.
The database export from PHPMyAdmin also does not look the same it looks in the screenshot
Using InfiniteWP
To use InfiniteWP you must provide the url of the site and since I dont want to change the DNS until the site is moved this option does not seems to be ideal.
This option might work if its ok for the sites to be unavailable for a day or so while the DNS resolves...
But I don't want the sites to be unavailable
Using Mediatemples "one click apps" to install wordpress and then moving only the files that are unique to the site from the old host to the new host.
I would like to use this option
I think that the content of the WP-Content folder needs to be moved that the database needs to be moved.
My question is
- what folders and files in a standard wordpress install typically hardly ever changes from one site to the other.
- can I use the wordpress database export and import function to move the database from one site to the other.
Any help will be appreciated
Thank you
With InfiniteWP, you can use the clone an existing site command (which can be found in "Tool"->"Install / Clone WP") to migrate a site to a new server.
You have to use a temporary (sub)domain pointing to the new server.
To answer your questions :
/wp-content/ stores all your files and sometimes plugin files, wp-config.php is where your configuration is stored (e.g. credentials to access the database). Depending on your servers, the .htaccess files may be different.
I would recommend to create a dump file of your entire database using phpMyAdmin.

How to restore websites in localhost

I am newbie in Composite, I already backup and download C1 websites (www.solve.sg), I also have installed (and working) Composite in localhost. So how to restore websites in localhost?.
I already used method to rename folder CompositesC1 to CompositesC1old, then extract and put extracted web in CompositeC1 folder at localhost but not working and gave me error.
Please help the right method how to read online backup websites and to read that at localhost
I dont know what Composite is, but you probably need to go back to your cPanel / backend of your webhost, dump the DB powering solve.sg and import that into your local instance.
Your hosting provider will probably have a tool called phpMyAdmin; go in there and find the 'Export' tab at the top of your DB and dump it out as a .sql file. You will then import that file into your local environment, probably also using phpMyAdmin.
You may also have to change around some of the settings files that show where your database is relative to your application.

Exporting a Typo3 site bit by bit

(edit: I'm leaving all the mistaken assumptions in just in case someone else makes the same mistakes)
I have an ancient Typo3 3.8.1 site on a remote server. I don't have access to that server, and the team in charge of maintaining the site doesn't know who to contact to get access to the server. I do have the admin rights on that site, though. (edit: no I don't. oops.)
This is what I see in the (not) admin menu:
I'm not sure if this version supports extensions, I can't find an extension manager anywhere. (because I'm not an admin)
I want to export the site so I can host it on a server on my own domain instead. The problem is the export file is too large, I can't download it. Will I destroy the directory structure if I export a bunch of pages at a time?
If you have admin access to the backend you can try to install Quixplorer - file manager. Using it you can try to zip folders in the main directory ie. (typo3, typo3conf, fileadmin etc) one by one and download them via browser.
It's important to download and remove typo3conf.zip from the server as soon as possible, cause it contains sensitive data.
Additionally you can also install PhpMyAdmin extension (search in repository) i you haven't other MySQL client.
Edit:
If you can't use Quixplorer the only way is... to write own extension and upload it via Extension Manager, there you'll need to try perform primitive file system operations like:
(PHP)
system('zip -R t3c.zip typo3conf/');
Sometimes the server allows more memory and execution_time that the T3D Export. So, if you can change PHP files on that server, try to change typo3/sysext/impexp/class.tx_impexp.php - search for ini_set and change that settings. If the server allows, you can then create bigger t3d-files.
And you could try some shell-extensions to get hands on that server:
http://typo3.org/extensions/repository/view/phpshell
http://typo3.org/extensions/repository/view/mw_shell
http://typo3.org/extensions/repository/view/shell
But to answer your initial question: you can crate a couple of T3D-files and import them again. Just force uid if you import them - and install all needed extensions first!

Resources