The Way to Programming
The Way to Programming
Here’s the best way to do it :
Install a fresh copy of WordPress on your new server. This will ensure all your settings are proper!
Then, overwrite everything under the wp-contents folder, so that your skin and plugins are transferred.
Overwrite your database with your database back up from the old WordPress.
Activate all plugins.
Then you’re good. That’s the easy, headache-free, guaranteed way if you don’t want to mess around with the setting files to change the database name, absolute path of the blog files’ location, etc.
There are references to URLS embedded in some of the tables. You need to look at, for example, the table wp_comments and the field within comment_author_url. Additionally, if URLS are in any of the post_content fields of the wp_posts table, you’ll need to perform update queries to pluck out sub stings and the like.
There are several ways to do this.
– If you can program, use Perl. Perl has a ODBC library which can connect to your database through ODBC. Perl is freeware and can be downloaded from www.perl.com.
– If you ‘re not so good in programming, you should check out ColdFusion (www.coldfusion.com
). This product has a wizard that allows you to do some database access from your web pages.
There are also a couple of easier ways to do this.
Try www.microsoft.com/directaccess
or use your
odbc setting in control panel.
3151 is not an ODBC error message/number I believe you are using MS Visual Basic for your client application. If you are, that number is a connectivity issue with the data source you are connecting to. If the data source is an Access DB then make sure the users have rights to the area where the MDB is connected to.
Still busy installing that little SQLServer program?
Then maybe you’d better take it from the top. Reinstall Windows NT Server (DON’T install it as a domain server). Why? Because your registry is probably messed up by all those installation/uninstall experiments.
Then re-install SQLServer. Make sure the server is connected to
a network and is running at least IPX/SPX or NetBEUI protocols. Don’t forget to specify the same protocols for SQLServer when you install it, otherwise both services can’t communicate with eachother. No network? Install the MS Loopback adapter and bind IPX/SPX and/or NetBEUI to it. Create a SQLServer account in the accounts-database and assign ‘logon as a service’ rights to it (extended rights dialog).
If that fails, go to Configuration->Services, select MSSQLServer service and modify startup so that it logs on using the local system account. If SQLServer tells you that you can do ‘other things’ while SQLServer is setting up the master-database, then DON’T listen to it. Let it finish and don’t touch it.
SQLServer installation is supposed to be childsplay. It should take about 15 minutes to do so. Since this is giving you such terrible headaches, you also might try to install NT/SQLserver on a different (clean) machine.
If you have only one PC which can’t be reinstalled (because it’s in use) then may the force be with you…
Verity the following directories exist:
\mssql\binn
\msssql\log
\mssql\charsets
\mssql\data
Veriry the following files appear in the devices;
master,
msdbdata,
msdblog
Verity the following databses exist
master
model
msdb
pubs
tempdb
Try starting the SQL server from the command prompt
with the -f option.
Look at the NT event logs for more info.
In the sql60\ dir do this:
dir *.out /od
examine this output files for more clues.
Hope this helps
db.
Your site is readable, on a portrait view in phone, but you can make many sizing and relative placement changes to improve your site appearances, although for a philosophical site, the visitors may be more concerned with ease of readability than looks. My opinions follow, You should have your Intro text (Those who understand. . . . .), centered in that space and in a container that has a “Max Width” set so on desktop views, , the words do NOT stretch all the way across the large screen size, it looks awkward like that . . . and change the font to an accent font for that, or at least make it italic.
The telescopic viewers photo could be smaller, , and needs to RESIZE with width even in larger, medium and smaller screen resolutions, because the text beside the photo is more distinctive than the photo (which is more or less a symbol or icon).
You may could resize the keith-5803-35pct.jpg image of keith which is to large for that placement at the native 846px × 1,161px size, maybe reduce it by half to 500px height.
You can change the “intellectual heros” face image row, and have each image in a container, that also has the name , and the date of birth and death (or other very short bio). . . And I would use a mech that is in wordpress that places a “Read More” clicker touch place below the name (bio), that when clicked-touched, a hidden element
You say – “On my cell phone the three pictures just scroll up in single file”, . . .
I would use smaller initial image sizes, as these pictures do not seem be for the site users to get a great deal of visual information from a face, with a little more text for bio underneath and the read-more to show additional words ONLY if the user is interested and touches it.
I have not used any wordpress for some time, but I do know there are a couple of wp plugins that can allow you to place PHP in a page, but it sometimes is not a free lunch, as you can step on PHP code and process and page output that is generated by wordpress.
Allow/Deny directives are not very resource intense, and there is no DNS lookup performed with IP ranges, so I would not expect a noticeable change in performance outside of a a few microseconds.
Choosing to allow certain ranges, rather than deny a metric ton, may help keep the file smaller.
In any event, a determined hacker will spoof his IP/Country/etc to get around these types of barriers, so I’d say this will only prevent the laziest of the malicious.
it was an issue in Model binding and expecting XML namespace information. Yes I am able to fix the issue,but it’s using DataContractSeralizer instead XmlSerializer.
I have already configured GlobalConfiguration.Configuration.Formatters.XmlFormatter.UseXmlSerializer = true; in Startup.cs.
SQL Express is perfect. It has more features than a SQL beginner needs.
SQLCourse is great. You can also look at http://www.w3schools.com/sql/
Microsoft provides some sample databases
Adventure Works Sample Databases: http://msftdbprodsamples.codeplex.com/
Northwind and pubs Sample Databases for SQL Server 2000: http://www.microsoft.com/en-us/download/details.aspx?id=23654
However, that said, I still think that the best use cases are when you come up with a sample application and you design a database to solve that problem. That way, you can frame your database design against your ‘theoretical’ applications requirements. For example, write an application to mimic a student records system. what tables would be needed (users, permissions, roles, students, courses, and so on)… then work various logic into the database layer… listing students, authenticating a user (simplistic username and unencrypted password), and pulling various reports such as average marks for a student across assignments in a subject, determining class position for students in a subject, finding the best performing students, and so on. As you add complexity to your requirements, using a simple but well understood problem domain, you can expand your SQL skills. Challenge yourself to create the tables using SQL scripts, think up scenarios where perhaps new features that require adjustments to the database design are added and so on. Generate dummy data to create thousands of students, and millions of exam/test/assignment results/scores. Query this data and play with indexes to find how you can optimize the performance of queries.
The point is, without a little application, just reading and working through online courses might not give you the actual hands on experience that you want here.
As stated already, the value is not stored like that. It is simply the default display format of the stored value.
Further, always handle date and time as date and time, never strings, no exceptions.
Thus, for your SQL, do something like this where you format the date value as a proper 24-hour string expression for MySQL:
DateTime smsTime = DateTime.Parse(str.Substring(0, pos1)).Add(new TimeSpan(9, 30, 0)).AddHours(6); string sqlTime = smsTime.ToString("yyyy'-'MM'-'dd HH':'mm':'ss"); sql = "update package set sms_time = '" + sqlTime + "' where id = " + id.Text + ""; DBUtil.ExecuteNonQuery(conn, sql);
ToString follows the format defined in the Control Panel.
It is usually the way to display the date on the screen, because it then shows as the user is used to see dates on his computer.
But it is a very bad way of saving the date in a database, a file, or any data repository, because you will get an inconsistent format between users and some users might have problem reading back the date.
In fact, why do you continually convert the date back and forth?
You first convert it from a string (str) to a date (Parse). Then back to a string (ToString). Then back to a date (STR_TO_DATE).
What you should do is convert it to a date straight from the start with the Parse, and then leave it as a date for all your operations. Something like the following. I cannot give you the SQL, because I do not know MySQL and the way it handles dates in its SQL.
datetime dt2= DateTime,Parse(str.Substring(0, pos1).AddHours(15).AddMinutes(30);
If your problem is the display, then you can force the format with by using the ToString overload that enables you to specify the format instead of the standard ToString that follows the Control Panel: https://msdn.microsoft.com/en-us/library/zdtaw1bw%28v=vs.110%29.aspx
It is not recommended to force the display on the screen however, where it should follow the Control Panel, which is the format that the user sees everywhere. You should force the format only when required for reports, files, etc.
Just did a googled on “quartz.net azure” and came to an interesting link: https://alexandrebrisebois.wordpress.com/2013/01/20/using-quartz-net-to-schedule-jobs-in-windows-azure-worker-roles/
Attacks targed insecure wordpress. If you have no wordpress just disregard them. If you indeed use wordpress – rename those admin files to long random name and force over SSL.
If you have hard time containing CPU usage – evaluate if mod_fcgid + apache-worker is a viable option for you (examples in fcgid documentation talk about using it with php)
The log rotation did not seem to help. I have been slowly tracking things down and have managed to identify a couple of attacks that were occurring that were repeatedly hitting the same valid files on the server, files I would normally expect to see in the logs. It took a while but after sifting through a couple million rows of logs I was able to identify the attacks and stop them with a combination of .htaccess rules and turning off some features of the blogs. It’s tough to identify the good from the bad, when in your situation it is normal to have a couple hundred thousand requests from the same IP’s daily because they are coming from schools and businesses. So it’s normal to see 50,000 post requests to the login script etc.
The files I found that were specifically being targeted were
1. wp-login.php – someone was trying to brute force attack a user. I denied access to this page via .htaccess ruleon the blogs that we don’t allow users to register on, and added an environment check to allow our work IP Address to access it.
2. xmlrpc.php – I don’t know what they were trying to do with this but I deleted this file from the blogs
3. I also edited the wp-config.php and disabled wp-cron (I manually update the blogs and plugins, and we don’t schedule posts, so I think that should be fine.) I don’t know if this was a problem on my machine but I read about it being used as an exploit so figured I would disable it now.
I am still getting fake posts to the comments on the blogs on a regular basis, even though they are not getting through because we require moderation of all comments and have some anti-spam stuff in place, we are still getting too many, I am unsure how to stop this one since we do want people to comment on our posts… but that is a completely different question.
So even though wordpress was not allowing any of the attacks to actually do anything, no comments were getting through, people were still beating on the server in short waves causing the cpu spikes. Currently things are sitting at a 15 minute average of between .10 and .15 which is more along the lines of what I expect of the system under the expected current load, and I no longer see any apache threads reaching above 10% cpu or if they do, it’s only for a second and then they are back to 2-5% usually.
Sign in to your account