Writing this post and am getting ready to hide behind strong walls, since mostly lighttpd is meant to fly light, or serve faster without the bloat and dynamic flexibilities. But certain situations may occur where one may have to forget the religion and behave sensibly. For a major project which was collaborated by different teams of our spread out offices, one part was developed by a team who were more exposed to benefitting the furls (friendly urls), by using apache rewrites. The bang off was detected only at the last moment of roll out to the beta deployment at client environment.
Continue reading “Quick and dirty htaccess rewrite for Lighttpd”
Cacti and rrdtool – a boon to the SysAdmins
Cacti templates and scripts built with the idea of getting the sampling data off colocated servers where there is atleast a webserver + php running, and on acute cases where both are unavailable, I would prefer deploying a single instance of nano web.
Regrett that I got familiarized with the cacti system only a week back. And once a clean installation was ready and running, the bottle necks started. Running snmpd for monitoring cpu, disk and network was an overkill. Though the snmp helped when we could add our WiFi Access Points, Routers and Switches. Even the traffic from our ISP Load balancer (pfsense) could be added for monitoring. All this was excellent. We got bottle necked at one point though.
Most of our colocated servers were behind heavy firewalls, and or running in virtual box machines inside real hardwares. True that we could use a single snmpd with multiple community id to collect data. But I was just reluctant. Just out of curiosity, the last one week day and night, at home, at work over IRC I was after getting the insides of both cacti and rrdtool. Thanks to the developers of both, and to all those who have contributed towards it. I did find better cacti templates on google code. This was one good step. The MySQL templates are simply superb. Also there is a script in php which does do ssh to remote servers and collect data. Good enough, but needed the cacti host root user to have a public key published on all of our servers.
Continue reading “Cacti and rrdtool – a boon to the SysAdmins”
Posting to wordpress using php cli and xmlrpc
A reader once asked me if I could build a command line tool which takes title from one file, and content from another file to create wordpress post. I tried, which finally gave an outline to this script. I dont think that this is very high fly, but for those whom the xmlrpc is mumbo, this might be somthing worth looking into.
Continue reading “Posting to wordpress using php cli and xmlrpc”
php MsSQL Backup
A php script to dump database as sql from MS SQL
We started porting (provide dual support) one of our application from MySQL to MSSQL, sorry, actually we were trying to run the same code base on either MSSQL or MySQL as the client wishes. And those who knows both, will agree to the level of toughness and agony when considers the fact that all of us are on MySQL and are new to MSSQL. In this context, we wanted to provide backup and restore to the application administrator through the system itself, and was not contented with the .bak files provided by MSSQL backup.
Continue reading “php MsSQL Backup”
MySQL vs MsSQL – comparisons never end
Search for the title, and you will land in several sites, which will tell you the views of the author. In fact there may be hell lot of people who would tell you that one out performs the other. But in reality what does that mean ?. If one knows how to optimize the database server, the sql, and the code behind. The performance can be tuned to a factor that both are at par. Now that is a far fetched view. Just think of the real bare minimum hardware to handle 300 tables, with less than 50 having a million rows, and the rest having master data. The MsSQL server will need a min of dual core with 8G memory, whereas the mysql would run on a 2G Virtual Machine and even out perform the MsSQL server. Think of the SELECT …. LIMIT X,Y and the SELECT GROUP_CONCAT, the advantages when considering server side pagination as well as selections directly outputting JSON for ajax frontends.
Continue reading “MySQL vs MsSQL – comparisons never end”
Question on wordpress script
Hi,
I am looking for php script that can take input from a file for heading post and content from file to create post from command line using XMLRPC.
Can you do this ? How much you will charge ?
Danielle
Once again Saturn opens the door
Saturn SPL at Technopark requires PHP professionals. For more information you may contact +91-471-2527000.
* Only personnel with minimum one year need to apply
* Knowledge in ExtJS ui library, MySQL etc added advantage
* Knowldege and experience in popular PHP IDE, with remote debugging would be appreciated
* Package will be at par with industry standards.
Migration from MySQL to MSSQL our solutions – Continued
In the previous post, I had specified that a code analysis would be presented later on, which is happening now. Though I am not permitted to abstract the whole database abstraction, which would otherwise divulge the core business logic of the system too, I do expect that the following would be enough to guide a MySQL PHP developer to port his application to MSSQL 2005. Mostly the compatablities are maintained. But for the database design, we had to let away some of the wonderful features from MySQL.
We started by a code auditing and reworked the system such that we did not use any group_concat through out the system. Also all timestamp and datetime fields were changed to varchar(19) since we were already feeding those fields with the php function date’s return value or ‘now()’. But there was quite a handful of areas where we were using STR_TO_DATE and with different formats. So this had to be handled in its own way. And it is here we started our regular expression war path.
Continue reading “Migration from MySQL to MSSQL our solutions – Continued”
Migration from MySQL to MSSQL our solutions
Last post I did had all of my feelings, and despair, and now I am sure those were out of sheer negligence and mostly because I was unaware of the MS SQL product. Though I still do not agree with certain things like the row_count workaround for the limit feature, and escaping of quotes. But for our project we could more or less maintain a streamline by using the same code base for MySQL, SQLite3 and MSSQL 2005. Will try to explain this across a couple of posts.
Continue reading “Migration from MySQL to MSSQL our solutions”
Porting application from MySQL to MSSQL
At first I thought it should be a challenge, though I did not expect it to be too tough, since we were already using a custom db wrapper. Well it turned out to be well too heavy a nightmare. And there was situations where I even considered retiring from life. I pity those who are paying thousands of hard earned money to buy such filthy crap.
Continue reading “Porting application from MySQL to MSSQL”