Making a PHP Site on Linux Work with a Microsoft SQL Server Database

نوشته شده در موضوع SQL Server ODBC, سیستم عامل, لینوکس, پایگاه داده, پی اچ پی در ۰۴ مرداد ۱۳۹۰

A recent project at my current employer called for creating a new web frontend to an existing MSSQL database. My boss, having created a sophisticated MySQL and PHP-driven black diamond web site in PHP was enthused about the prospects of further web development with PHP. He suggested trying to get PHP on a Linux box to connect to a MSSQL database server.

An attempt at this task made months before ended in frustration. This time, after nibbling away at the task for a couple of days on a standard Red Hat system, success was had. Here’s how.

Similar to Windows, one method of connecting to a MSSQL database is through an ODBC DSN (open database connection, data source name). The ODBC DSN specifies a MSSQL driver to make the connection to the database. Recent versions of Red Hat include the utility for creating the ODBC DSN, but not the driver.

The driver chosen and discussed in this article is a FreeTDS driver. TDS (tabular datastream) is a protocol used by Sybase and MSSQL. This driver enables the Linux machine to connect to the MSSQL server.

Once the driver is installed, you can configure an ODBC connection on your Linux machine to use the driver, which then allows a connection to MSSQL. Start by downloading and saving the FreeTDS driver.


				

jQuery : Error: $(document).ready is not a function

نوشته شده در موضوع css,html,javascript, برنامه نویسی در ۲۹ تیر ۱۳۹۰

jQuery : Error: $(document).ready is not a function

Yes it bloody is!

Quite often when I’m mucking about with WordPress firebug will throw the following error:

jQuery : Error: $(document).ready is not a function

If you see this error it’s because another framework is in conflict with jQuery – most usually in my case it’s mootools or scriptaculous, anyway here’s the work-around.

The people who developed jQuery had the foresight to include a function which makes jQuery play nicely with other frameworks which all use the $ sign as a staple part of their code. Introducing the jQuery.noConflict(); function.

The jQuery.noConflict(); command you can replace the $ sign with the word jQuery throughout your code.

نحوه بروز رسانی Directadmin

نوشته شده در موضوع دایرکت آدمین در ۰۷ تیر ۱۳۹۰

cd /usr/local/directadmin
wget --no-check-certificate -O update.tar.gz 'https://www.directadmin.com/cgi-bin/daupdate?uid=123&lid=1234'
tar xvzf update.tar.gz
./directadmin p
cd scripts
./update.sh
/etc/init.d/directadmin restart

نحوه نصب Python بر روی Linux

نوشته شده در موضوع برنامه نویسی, دایرکت آدمین, لینوکس در ۰۵ خرداد ۱۳۹۰

$ wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz
$ tar xzf Python-2.7.tgz
$ cd Python-2.7
$ ./configure --with-pth --with-dec-threads --with-signal-module --prefix=/opt/python-2.7
$ make
# make install

آموزش راه اندازی کامل کاکتی از نصب تا گرفتن گراف از سیستم ها

نوشته شده در موضوع سیستم عامل, شبکه, لینوکس در ۱۴ اردیبهشت ۱۳۹۰

اول اینو بگم که این کاکتی ما دقیقا می شیند روی سیستم به عنوان سیستم عامل و به نظر من اگر بتونید اونو روی یک نرم افزار مثل VMvare نصب کنید خیلی عالی می شود.
اول اینو از اینجا بگیرید: http://cactiusers.org/index.php در سمت راست این سایت CactiEZ Satble  را که با شماره ۰۴ است را دانلود کنید. بعد اونو از زیپ در بیاورید (این فایل با پسوند تار است) و داخل اون یه فایله با پسوند ایزو.
این یه فایل ایزو است که به راحتی با vmvare کار می کند و اگر خواستید روی یه سیستم کامل نصب کنید فقط کافی است اونوروی سی دی رایت کرده و بعد از روی اون رو سیستم نصب کنید.

buy viagra