Jump to content

Content Management System


emvy03

Recommended Posts

Alright Lads.

I've had a go at building a CMS using an apache server, but this is all local to my PC and I was wondering how to go about uploading it to the internet.

The problem I think I am having is that I am using phpmyadmin locally, however when I upload the cms to the internet it tells me that it failed to connect to the database. I assume this is due to the fact the CMS is online, while the database is still saved locally.

Apologies for asking such a daft question but I am really quite new to php scripting and web design.

Cheers.

 

Link to comment
https://forums.phpfreaks.com/topic/238678-content-management-system/
Share on other sites

Ok, where are you 'uploading' your cms to? and does your web hosting have mysql support / databases . If so then you need to:

1. export your local database into an sql file.

2. change your connection details in your php connection script to match youronline databases mysql users details

3. import your sql file into the online database

Pretty much what gristoi said, you should use mysql dump (http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html) to create the sql file.  You can probably use the PHPMyAdmin GUI as well if that's easier.  After you dump your database live your hosting panel should allow you to create MySQL users, from there you just have to change your configuration script with the new credentials.

Hi,

Thanks for that guys. Also, I was wondering if there is a way to assign an id to a post when adding it to the database. The reason I ask is the current 'add-content' script doesn't assign an id to the posts and therefore the database won't accept the new post because the 'id' column can't be null.

 

Hope I've explained it at least a little.

Cheers guys.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.