Tag Info

Hot answers tagged

12

I'd have separate database for separate clients. A client might demand this for security reasons - i.e. only their site has access to their data. It also means that if a client want to move their data then it's going to be much easier to manage. It also means that if there is a problem with one client's database it doesn't affect all of the others. If you ...


10

Google Analytics is pretty much the best around, regardless of server platform. Unless there is a specific reason you need to use server-side analytics rather than a client-side Javascript solution, Google Analytics is the way to go.


10

There are inherit risks and rewards to both system. I worked for a financial firm that supported roughly 40 clients (national banks) on 1 database. We then purchased another company that sold similar software and that had gone with 1 database per client. Finally, the company went bankrupt and we did have to export all user data. Here is what the people I ...


10

It's difficult to assess which one is going to be faster without additional details on how your shared hosting is configured. An application that uses MySQL will need to make a connection to a MySQL server. This can be done to a remote/local host over TCP or to the local host via a Unix socket. The latter is likely to be slightly faster, since you won't ...


9

I'm glad you know there isn't going to be a bulletproof way to accomplish this. That means your outlook is at least realistic. Since JavaScript is not an option I would say you're left with: Check the user-agent for the word "bot" in it. That will catch most of them. Compile a list of known bots and filter them based on some kind of unique identifier, ...


8

Probably the biggest thing to check if is you have keys on the fields you are querying on. Having the right keys and fields will make your queries considerably faster. You can determine if your keys are being used by running the query with EXPLAIN in front of it, such as EXPLAIN SELECT * FROM table WHERE id = 2; You can add EXPLAIN on queries in the slow ...


7

Is the string I'm in your question actually copy-n-pasted from the database via adminer/phpmyadmin/mysqlcli/whatever? Or is it retyped? I suspect that what's stored in your database is not I'm at all, but rather something like I’m with a typographer's apostrophe. Like the other comments have said, you can and should fix the problem by consistently using a ...


7

One commonly used solution is to make your image URLs look something like this: http://www.example.com/path/to/images/1.jpg?v=123456 Here, /path/to/images/1.jpg is the actual URL path of the image, while ?v=123456 is just a dummy query staring tacked onto the end of the URL. The query string can be anything — a version number, a timestamp, a hash ...


6

You seem to have a good understanding of why you should and shouldn't write your own forum software so I'm going to focus on my opinion instead of hashing out facts you already know. Forums are favorite places for spammers to spam. They're right up there with blogs. Even existing forum software have a hard time keeping up with them. If you roll your own ...


6

Wikipedia probably counts as having a "huge website", even if it's still tiny compared to, say, Google. You can find a description of their server architecture here. Basically, their SQL backend consists of a bunch of clusters, each one consisting of a single MySQL master server whose data is replicated to a bunch of read-only slave servers. Also, images ...


6

Without knowing more about your app or seeing some real code it is hard to give any detailed security advice. That being said here are some things that come to mind after reading your post: 1: Keep your config file with the database connect info and salt key outside the public directory and chmod it to 444 or 644. You can access one directory above your ...


6

Google has no knowledge of the actual file structure of your web app and what is accessible to the public. A news site, for example, will have hundreds of articles to view, but might only have one actual script: article.php. Server-side directives might allow pretty canonical URLs like /category/283423-pretty-name to point to /article.php, and this is what ...


5

I would consider using a WordPress plugin called "WordPress Database Backup (WP-DB-Backup)" which is also listed on the Wordpress Database backup guide. This plugin can backup the database on a schedule and email it to you(assuming its a small database). You can also just back it up locally. You can exclude comment spam and revisions to make the DB smaller ...


5

I can tell you that I currently use mysqldump to maintain a backup of my database. I do this because my goal is to keep weekly backups so that in the event someone removes their webpage(s), I can recover it from at most a week ago. The good thing about this is that it is a basic text file so I can import it over to any computer with MySQL, load it up, and ...


5

Try this: On the phpMyAdmin default page (localhost) click on the "Privileges" link Click on the "Add a new User link" Assign the User a login and password Where it says "Database for User" select "None" Leave all checkboxes in global privileges unchecked Press the "Go" button You should see the new user in the User overview. Global privileges should say ...


5

There are three fairly simple ways: Use Google Analytics, which will process and handle all the data for you, and present you with detailed statistics for visitors and how they got to your site. This is by far the easiest solution. Use Javascript to do the counting. When the page has loaded, generate an AJAX request to your counting script. Robots and ...


5

You could split the file at the end of each group of SQL statements and then import one after the other.


4

Whichever backup solution you go with, realize that backups are worthless if you don't test them. This means, having a restore strategy, and actually simulating a complete recovery. You don't have to kill your production data to do this, but you need to make 100% sure that you can actually recover what you need to using your backups. Also version control ...


4

I think that http://www.godaddy.com/hosting/web-hosting.aspx?ci=9009#details is a good source for what Godaddy is currently hosting. However, I am fairly certain that they do not allow for URL Rewrite. I know they didn't 2 months ago. Also, GoDaddy just turned on .NET 4.0 and MVC 2 support. It usually takes them 8+ months after release for them to ...


4

http://piwik.org/ is a good option if you're looking for self-hosting.


4

To begin with, move static resources (images, css, js) to a server in Australia and keep the rest of your application in US. Since the majority of your webpage is going to be static resources, this is going to give you a significant improvement in response time. If you can afford it, use a Content Delivery Network that has a presence in Australia. If you ...


4

If you know that the file contains consistently-formed CSV (there is no standard, so you'll likely want to test extensively before importing over any production tables) you can skip PHP altogether and use MySQL's LOAD DATA INFILE statement after uploading the data to the server. (If you don't have immediate access to the mysql console on the server, this ...


4

There can be several explanations. One of them is security. It's definitely safer to disallow any kind of special character that might eventually be misinterpreted during a query. Of course, the best way (from the end-user perspective) would be to allow these characters and safe escape/quote them, but this behavior increases the risk a developer might ...


4

20,000 records is not a lot at all. It's not uncommon for a table to have millions of records and, if your database is designed properly, still be very fast. So using Autocomplete with a table of 20,000 or even one million records is definitely feasible and shouldn't be slow. If it is you need to revisit your database design and SQL queries to make sure ...


4

Actually when using hosting management software like cPanel, it installs MySQL with default and commonly used configurations: MySQL host = 'localhost' MySQL port = '3306' MySQL User = 'cpanelusername_mysqluser' [1] MySQL password = 'password' [2] MySQL database = 'cpanelusername_database' [3] More explanations about the host address: If ...


4

Yes it is possible. Once you know the Host, Username and Password for your MySQL account, you can just log in to it as you normally would from as many hosts as you want. I once did it with two different hosts. My website was on one host, and from other host I was running some cron jobs that were running queries on the other site. Although depending on ...


3

There's Vanilla and bbPress. They're both relatively simple and have good communities.


3

If you really want to spend that kind of time downloading, here's a link to the Wikipedia dumps - "WARNING: 6.07 GB compressed, approximately 27 GB uncompressed as of 2010-09-20" (and you'll still have only 3,428,557 articles) Here's a quick PHP script that'll make one for you (just create an empty DB, temporarily grant the $db_user CREATE + INSERT ...


3

Wordpress MU might be overkill for just three blogs, but it will let you run everything against just one database and just one Wordpress install.



Only top voted, non community-wiki answers of a minimum length are eligible