interested in
Moderator: General Moderators
You do not insert the FILES into the database, you insert the user supplied information into a database.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
It's a frustrating thing, learning through a project that you want to create yourself. Just try not to get too far ahead of yourself. Focus on getting specific tasks done, and worry about hosting and traffic / database size / storage space etc. issues when you get something ready to put up. If you're anything like me it'll take a few revisions before you're happy to let it out into the world.
Some tips:
You've got this image in your head about what you could make, and you're excited about it, and thats good, but you might have a long road ahead and you'll want to conserve that enthusiasm. You'll probably need it.
Map out the pages you can visualize. I use an A4 notebook to draw up an overall map of the application on one page, and then go through and just draw a simple mock-up of each page. You'll get an idea for how the parts you are thinking about link up, and what parts are missing. If you can see the forum display page, how do the messages get entered? Is there open, anonymous posting, or do you need to become a user to make posts? In either case, what pages are needed to allow this? (registration, activation, login, logout, profile, posting, etc.)
Your basic database model should be easy to extract from these pages. User information, posts, comments, these are the items that will need to alter on each page you jotted down, and should be stored somewhere that you can call dynamically - ie, the database.
Then, if you look at it for a while, you'll find at least one page in there that the rest of the pages depend upon. In the case of a forum where a user logs in to post, your login system is most likley going to be that page. Most of the pages will react differently depending on if the viewer is logged in or not. The page the others will depend on is where I usually start.
Create a basic index page with a simple link to your first page. Then start building that first page. For me, keeping the mechanics secondary helps a lot. Create the page, including forms and links, etc, and then when you're happy that it looks good and will do everything you want it to, then start coding.
As for the mechanics, I always try to keep code that handles a form on the same page as the form. Basically, the form posts to itself, and you just check if the form has been submitted and then process that submitted data (validation and action) with a header redirect on success. The benefit is that process code is stored with the form that generates the data, and if the data fails validation, you're already at the right page to redisplay the form with error messages.
I don't post replies here often .... I tend to ramble (Gee ... can you tell), but the guys here are the best source of info you could ever hope for, and will gladly offer assistance on any specific problems you are having. Just be patient, and when in doubt, RTFM.
Cheers
Some tips:
You've got this image in your head about what you could make, and you're excited about it, and thats good, but you might have a long road ahead and you'll want to conserve that enthusiasm. You'll probably need it.
Map out the pages you can visualize. I use an A4 notebook to draw up an overall map of the application on one page, and then go through and just draw a simple mock-up of each page. You'll get an idea for how the parts you are thinking about link up, and what parts are missing. If you can see the forum display page, how do the messages get entered? Is there open, anonymous posting, or do you need to become a user to make posts? In either case, what pages are needed to allow this? (registration, activation, login, logout, profile, posting, etc.)
Your basic database model should be easy to extract from these pages. User information, posts, comments, these are the items that will need to alter on each page you jotted down, and should be stored somewhere that you can call dynamically - ie, the database.
Then, if you look at it for a while, you'll find at least one page in there that the rest of the pages depend upon. In the case of a forum where a user logs in to post, your login system is most likley going to be that page. Most of the pages will react differently depending on if the viewer is logged in or not. The page the others will depend on is where I usually start.
Create a basic index page with a simple link to your first page. Then start building that first page. For me, keeping the mechanics secondary helps a lot. Create the page, including forms and links, etc, and then when you're happy that it looks good and will do everything you want it to, then start coding.
As for the mechanics, I always try to keep code that handles a form on the same page as the form. Basically, the form posts to itself, and you just check if the form has been submitted and then process that submitted data (validation and action) with a header redirect on success. The benefit is that process code is stored with the form that generates the data, and if the data fails validation, you're already at the right page to redisplay the form with error messages.
I don't post replies here often .... I tend to ramble (Gee ... can you tell), but the guys here are the best source of info you could ever hope for, and will gladly offer assistance on any specific problems you are having. Just be patient, and when in doubt, RTFM.
Cheers
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
1. Are you sure it is running?
What is the output of:
Try to locate where it is:
I thappens to be in /var/run/mysql/mysql.sock in my server.
If that is the case a soft link should solve your problem:
Or you may change this in the mysql config file.
What is the output of:
Code: Select all
pgrep mysqlCode: Select all
locate mysql.sockIf that is the case a soft link should solve your problem:
Code: Select all
ln -s /var/run/mysql/mysql.sock /var/lib/mysql/mysql.sockThere are 10 types of people in this world, those who understand binary and those who don't
What is the output of:
Code: Select all
pgrep mysqldThere are 10 types of people in this world, those who understand binary and those who don't
I'd recommend that you abandon trying to learn on a remote server, and set up your machine as a local server. You have some time before you'll have much to go live, and while you're developing you can check with your host to see that they have the services you need.
Best, you'll have full control over the test environment, which can really help out when trying to troubleshoot.
For understandings sake, you'd be best off installing and configuring manually. Doing a google for "install apache php mysql" should give you somewhere to start. THIS is the kind of thing I had in mind.
Failing that, you could use something like XAMP Which should install a complete test bed without any work. Never used it though, so it might be best to ask around.
You'll then be able to edit files and immediately see the changes without needing to wait for uploading files and then making a small change, then save then re-upload, etc. etc.
Working live is an option of course, but yeah ... I think I'd go crazy without a local testbed.
Best, you'll have full control over the test environment, which can really help out when trying to troubleshoot.
For understandings sake, you'd be best off installing and configuring manually. Doing a google for "install apache php mysql" should give you somewhere to start. THIS is the kind of thing I had in mind.
Failing that, you could use something like XAMP Which should install a complete test bed without any work. Never used it though, so it might be best to ask around.
You'll then be able to edit files and immediately see the changes without needing to wait for uploading files and then making a small change, then save then re-upload, etc. etc.
Working live is an option of course, but yeah ... I think I'd go crazy without a local testbed.