mysql database connectivity issues - php

I was following this guide: http://mrbool.com/how-to-create-a-login-page-with-php-and-mysql/28656 to create a login page. I followed everything to the letter but when I uploaded the two files (login.html and connectivity.php) to my public_html folder of my godaddy linux shared hosting server and attempted to test it out, I was met with a blank page when I navigated to: mydomainname.com/connectivity.php. Now after reviewing the code within connectivity.php, my suspicion was that my mistake lay somewhere in my database setup. This is what I am referring to:
I changed the database name "practice" to the actual name of my database that I created through godaddy. I got a little bit stuck on the "DB_USER" section though. I added a user to my database through godaddy's mysql application and changed the name "root" to the name I set for the user. Here is what I'm referring to:
After I did that I changed the "DB_Password" to whatever I had set for the username's password. I thought at this point I was done but when I attempted to navigate to the page, it still didn't work. I know the "DB_HOST" is set to localhost but I wasn't sure what I was supposed to change that to since phpMyAdmin panel stated the following: "Server:localhost" even though I'm using a server. I added all the tables and users to the mysql database correctly so I really think this has something to do with my configuration. If anyone could help me I would greatly appreciate it. Thanks.

Related

while executing via localhost I got these error. How to resolve it?

I want to run magento site using localhost. I downloaded it through site and tried to run it using localhost but it gives me all these error.
I exactly don't know the idea what exactly is going on, in files what changes are required to run the code. If this error is related to database then from where I will get the username, password & localhost name.
Can anyone please help me sort this problem?
Open the file in app/etc/local.xml
Check/Edit the DB credentials
For URL, open table core_config_data
change the value of web/unsecure/base_url and web/secure/base_url with your required value e.g. example.com/
Note that if you are working on localhost then you have to create Virtual Host with site name.

Setting up a wordpress website

I downloaded a WordPress website and copied it to a folder on localhost.
However the it's asking me for a database name which is WordPress as I created a database in phpmyadmin.
Then it asks for User Name : no matter what i type it does not accept it, the same goes for Password: and Database Host Name. I have no password on phpmyadmin i login as root and there is no password.
Can anyone help me with this please?
If you're really sure what your username and password are and still not working, you should download again wordpress... I've setup a few times Wordpress locally and I found it very simple. (Change directory name, different database name and so on).

unable to select the wordpress database

Unable to select the wordpress database.
I am using WAMP server in windows 7 OS
while configuring the wordpress i am getting this kind of error
Thanks
It looks like you are not creating the database.You need to create database schema first manually. First Create database in Phpmyadmin. And give that name in your configuration file.
Make sure the database name you have given in wp-config.php is correct. Check if the database user name and password is correct. Also check if the user has the privilege to access the database.
Some times the problem appears when you have everything right there!!
So if you make sure you have created a database, giving the database name correctly while installing and you still are seeing the error, then:
1>> go to the root of your server
2>> Edit the file wp-config.php, set everything there manually, its that easy ;)
That should work for you!!

WordPress migrate sufficient permissions error

I have a strange problem, that I have never encountered.
I migrated web-site from my PC to the server. Well, I have done this a lot of times, but never encountered this issue.
Ok, what I did is, i copied the theme and exported the database and imported on the server + I replaced the table prefixes from wp_ to site_ to match the servers pre-made WordPress installation prefixes.
The page works fine, but, when I log in as an administrator ( there are no other users, then the admin ) I get this error:
And when I open the actual page I see this:
The white line one the top is where the admin menu should be.
It seems, that the user has actually logged in, but somehow is getting rejected from the server?
I know that this is a small isue that can be solved, by reinstalling WordPress with the exact settings that I have on my local PC, but I want to know why this happened and how to actually fix it.
PS: There are no addons involved in this. Just my custom theme.
It looks like you're being logged in, but your account doesn't have administrator privileges. Go to your site_usermeta table in the database and confirm that the meta_key and meta_value are using the correct prefix. They should be site_capabilities, site_user_level etc instead of wp_capabilities and wp_user_level etc. Also make sure that site_capabilities is set to administrator.
Additionally, check the site_options table to see if there are any option_names that are still using wp_ and not site_ Essentially, if you changed the prefix in the config file, you will need to change all entries of the prefix in your MySQL database as well.
Here's a good resource to follow: http://www.wpbeginner.com/wp-tutorials/how-to-change-the-wordpress-database-prefix-to-improve-security/

Error when running WordPress on new server

I've just upload a WordPress project into a web server. Everything went fine with the exception of the User-Photo plugin. The problem I'm having is that its doesn't seems to find the basedir path. This is the error:
Upload error: Unable to place the user photo at: /var/www/clients/client2/web4/web/arsoblog/wp-content/uploads/userphoto/1.jpg
First of all, I don't know where this path is. Even on the local server, where the site is working good, is using the exact same path, which I can't find.
Maybe someone of you knows what could have changed from one server to the other. By the way, the blog is inside another site in the web server, which is developed using CakePHP.
EDIT --- I'm having the same problem with all the uploads!
The problem is in your upload directory. When we develop the WordPress site in localhost, the default upload directory will be point to your localhost only. When you move to online server, this directory path will not change.
To override this do the following steps:
Login to your cPanel/control Panel
Go to phpMyadmin
Select your database.
Go to wp_options table
On the second page (around 58th row) Edit 'upload_path'(For the first time this row may be blank).
Give your correct directory.Eg: /home/username/public_html/folder-name/wp-content/uploads
Change "username" and "folder-name". Username is usually the username you use to login to cPanel, or your domain’s control panel. Folder-name is used for the sites hosted in subfolders. If you hosted the site in root folder, remove it.
Here is a detailed tutorial How to move wordpress to a new server or host.
If you already used WordPress uploader in localhost, you need to do a search in wp_posts table and replace your localhost reference to your live site's reference. There are some plugin available to do these search and replace in database. Check this one
Hope this will solve your problem.
777 permissions are dangerous and not the correct fix for the issue. You will get hacked with 777 permissions. See Hardening WordPress « WordPress Codex
For solving this problem you have follow some step,
*Login to your cPanel/control Panel
*Go to phpMyadmin
*Select your database.
*Go to wp_options table
*On the second page (around 58th row) Edit 'upload_path'
*Give your correct directory.Eg: /home/username/public_html/folder-name/wp-content/uploads
then you shift your server See tutorial
for more
http://www.techyv.com/questions/error-when-running-wordpress-new-server

Categories