Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Wednesday, January 6, 2010

Enabling the PHP OCI8 Extension on Linux

To install on Linux, PHP generally needs to be recompiled. For users of Oracle Enterprise Linux, pre-built RPM packages of PHP and OCI8 are available from oss.oracle.com, or via ULN updates.

To build PHP and OCI8:

1.

Download the Apache HTTPD Server if you decide not to use your default package. Download the PHP 5.2 source code.

Install PHP and Apache following Installation on Unix systems in the PHP manual.

At this stage, don't configure the OCI8 extension.

Check that PHP is working before continuing.
2.

Download the Basic and the SDK Instant Client packages from the OTN Instant Client page. Either the zip file or RPMs can be used.

Install the RPMs as the root user:

rpm -Uvh oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm
rpm -Uvh oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm

The first RPM puts the Oracle libraries in /usr/lib/oracle/11.1/client/lib and the second creates headers in /usr/include/oracle/11.1/client

If using the zip files, the SDK should unzipped to the same directory as the basic package, and a symbolic link created:

ln -s libclntsh.so.11.1 libclntsh.so

3.

The latest OCI8 1.3 extension from PECL supercedes the default version in the PHP 5.2 source code. This can be downloaded manually and installed with:

pecl install oci8-1.3.5.tgz

Or the latest production package can be automatically downloaded and installed:

pecl install oci8

This gives:

downloading oci8-1.3.5.tgz ...
Starting to download oci8-1.3.5.tgz (137,987 bytes)
.....done: 137,987 bytes
10 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
1. Please provide the path to the ORACLE_HOME directory.
Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client : autodetect

1-1, 'all', 'abort', or Enter to continue:

If you have the Instant Client RPMs, hit Enter and PECL will automatically locate the RPMs and build and install an oci8.so shared library.

If you have the Instant Client zip files, or have multiple versions of the Instant Client RPMs installed then explicitly give the path:
*

Enter 1 to update the first (and only) setting. The OCI8 configuration prompt will then be shown:

Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib'
if you're compiling with Oracle Instant Client [autodetect] :

*

Enter the path, such as:

instantclient,/usr/lib/oracle/11.1/client/lib

or:

instantclient,/your/path/to/instantclient_11_1

Do not use any environment variable names, because the PECL installer doesn't expand variables.
*

You will get reprompted 1-1, 'all', 'abort', or Enter to continue. As it says, press Enter to continue. PECL will build and install an oci8.so shared library.
4.

Edit php.ini and confirm extension_dir points to the directory the oci8.so file was installed into.

Also in php.ini, enable the OCI8 extension with:

extension=oci8.so

5.

Add the directory with Instant Client to /etc/ld.so.conf, or manually set LD_LIBRARY_PATH to /usr/lib/oracle/11.1/client/lib and restart Apache.

It is important to set all Oracle environment variables before starting Apache. A script helps do that:

#!/bin/sh

LD_LIBRARY_PATH=/usr/lib/oracle/11.1/client/lib:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH

echo Starting Apache
/usr/sbin/apachectl start

This script can contain desired Oracle globalization language environment variables such as NLS_LANG. If nothing is set, a default local environment will be assumed. See An Overview on Globalizing Oracle PHP Applications for more details.

Verifying the Extension is Installed

To check the extension is configured, create a simple PHP script phpinfo.php in the Apache document root:



Load the script into a browser using the appropriate URL, e.g. "http://localhost/phpinfo.php". The browser page will contain an "oci8" section saying "OCI8 Support enabled".

The OCI8 options that can be configured in your php.ini file are shown.
Connecting to Oracle

Oracle authentication and database information is passed to oci_connect() to create a connection. Tools linked with Instant Client are always "remote" from any database server and an Oracle Net connection identifier must be used along with a username and password. The connection information is likely to be well known for established Oracle databases. With new systems the information is given by the Oracle installation program when the database is set up. The installer should have configured Oracle Net and created a service name.
There are several ways to pass the connection information to PHP. This example uses Oracle's Easy Connect syntax to connect to the HR schema in the MYDB database service running on mymachine. No tnsnames.ora or other Oracle Network file is needed:

$c = oci_connect('hr', 'hr_password', '//mymachine.mydomain/MYDB');

See Oracle's Using the Easy Connect Naming Method documentation for the Easy Connect syntax.

In new databases the demonstration schemas such as the HR user may need to be unlocked and given a password. This may be done in SQL*Plus by connecting as the SYSTEM user and executing the statement:

ALTER USER username IDENTIFIED BY new_password ACCOUNT UNLOCK;

Using Oracle

Try out a simple script, testoci.php. Modify the connection details to suit your database and load it in a browser. This example lists all tables owned by the user HR:

\n";
}

oci_free_statement($stid);
oci_close($conn);

?>

Troubleshooting

Check the Apache error log file for startup errors.

Temporarily set display_error=On in php.ini so script errors are displayed.

Chapter 9 of The Underground PHP and Oracle Manual contains some common connection errors.

Oracle's SQL*Plus command line tool can be downloaded from the Instant Client page to help resolve environment and connection problems.

Check the environment used by SQL*Plus is the same as shown by phpinfo.php.

Windows Help

If the phpinfo.php script does not produce an "oci8" section saying "OCI8 Support enabled", verify that extension=php_oci8_11g.dll is uncommented in php.ini.

If PATH is set incorrectly or the Oracle libraries cannot be found, starting Apache will give an alert: "The dynamic link library OCI.dll could not be found in the specified path." The Environment section of the phpinfo() page will show the values of PATH and the Oracle variables actually being used by PHP.

If php.ini's extension_dir directive is not correct, Apache startup will give an alert: "PHP Startup: Unable to load dynamic library php_oci8.dll."

Linux Help

If using Instant Client zip files, make sure the two packages are unzipped at the same time. Make sure a symbolic link libclntsh.so points to libclntsh.so.11.1

Set all required Oracle environment variables in the shell that starts Apache.

Installing Oracle, PHP, and Apache on Linux

Let's walk through the steps required to install the Oracle Database, Apache HTTP Server, and PHP as an Apache module on Linux. Check out the OTN Linux Technology Center to see what versions of Linux are certified for use with the Oracle Database. We will be using Oracle Enterpise Linux for this example.

Software Requirements:

Software Version URL
Oracle Database 10g Express Edition 10.2 http://www.oracle.com/technology/products/database/xe/
Apache HTTP Server 2.0 http://httpd.apache.org/download.cgi
PHP Hypertext Processor 5.2 http://www.php.net/downloads/

Installing Oracle

You have a choice here. You may either install the database locally on this Linux machine, or you may decide to use an Oracle server located on another machine on your network. If your database is remote, jump to the article on Installing PHP and the Oracle Instant Client for Linux and Windows.

Otherwise, if this is your first time with Oracle, installing the Oracle Database 10g Express Edition only takes a few minutes. Download the Express Edition (commonly known as "XE") RPM package, log in as root and run:

    # rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm

After the software package is installed on the machine, configure a database by running this and answering its four questions:

    # /etc/init.d/oracle-xe configure

For Debian users, a .deb file is also available.

Starting and Stopping Oracle

Oracle XE will be running after installation. You can test it by opening your browser to the Database home page http://localhost:8080/apex. Use the username "SYSTEM" and the password you chose during installation.

Note: You may need to replace "localhost" with the IP address 127.0.0.1 or your machine's DNS name if you are behind a firewall or if localhost does not resolve for some other reason.

If you need to restart the database at any time use the Start Database and Stop Database items on the operating system's "Oracle Database 10g Express Edition" menu. To run these you will need to add yourself to the operating system "dba" group and re-login to the machine.

Alternatively you can call the oracle-xe script as the root user:

    # /etc/init.d/oracle-xe stop

To restart:

    # /etc/init.d/oracle-xe start

Installing Apache HTTP Server

Now that the Oracle Database is installed, you should install Apache. You must install Apache before you can install PHP, since PHP will be installed into Apache.

If you don't want to mess about compiling Apache or PHP, Oracle has pre-built PHP RPM packages that use the default Apache package.

If your operating system doesn't already have Apache, download httpd-2.0.63.tar.bz2 from the Apache web site, log in as the root user and execute these commands:
    # tar -jxvf httpd-2.0.58.tar.bz2

# cd httpd-2.0.58
# ./configure --prefix=/usr/local/apache --enable-module=so
# make
# make install

When configuring the web server, the option "--enable-module=so" allows PHP to be compiled as a Dynamic Shared Object (DSO). Also, the "--prefix=" option sets where Apache will be installed during the command "make install"

If you are familiar with the tar command on UNIX systems, you may be wondering why we did not need to invoke bunzip2 to extract the tar file. Linux includes the GNU version of tar which has a new 'j' flag to automatically uncompress a bzipped tar file. If you downloaded the gzipped file you could have used the 'z' flag instead.

Note: With Apache 2 you should use the default pre-fork MPM ("Multi-Processing Module") because many of the PHP extentions are not known to be thread-safe.

Starting and Stopping Apache

Start and stop Apache with the apachectl script:

    # /usr/local/apache/bin/apachectl start

You should test that Apache is up and running on your machine by opening your web browser to http://localhost/.

Now stop Apache so it can be configured for PHP:

    # /usr/local/apache/bin/apachectl stop

On Oracle Enterprise Linux, the apachectl script for the default Apache package is /usr/sbin/apachectl.

Installing PHP

To build PHP yourself, download the file php-5.2.9.tar.bz2 from the PHP downloads page.

Installation Steps

  1. Log in as the root user and execute these commands:

        # tar -jxvf php-5.2.9.tar.bz2
    
    # cd php-5.2.9
    # export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    # ./configure \
    --with-oci8=$ORACLE_HOME \
    --with-apxs2=/usr/local/apache/bin/apxs \
    --with-config-file-path=/usr/local/apache/conf \
    --enable-sigchild
    # make
    # make install

    Note: if you are behind a firewall, you may need to set the environment variable http_proxy to your proxy server before running make install. This enables PHP's PEAR components to be installed.

  2. Copy PHP's supplied initialization file:

        # cp php.ini-recommended /usr/local/apache/conf/php.ini
    

    For testing it is helpful to edit php.ini and set display_errors to On so you see any problems in your code.

  3. Edit Apache's configuration file /usr/local/apache/conf/httpd.conf and add the following lines:

        #
    
    # This next section will call PHP for .php, .phtml, and .phps files
    #
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .phtml
    AddType application/x-httpd-php-source .phps

    #
    # This is the directory containing php.ini
    #
    PHPIniDir "/usr/local/apache/conf"

    If a LoadModule line was not already inserted by the PHP install, add it too:

        LoadModule php5_module modules/libphp5.so
    

Restart the Apache HTTP Server

You must now restart the Apache Server so that you can test your PHP installation.

    # /usr/local/apache/bin/apachectl start

Note: If you are using Oracle 10.2 but not the Express Edition, you must give the "nobody" user access to the Oracle directory. With Oracle 10.2.0.2 there is a script $ORACLE_HOME/install/changePerm.sh to do this.

If there are errors, they will display on your screen. They may also be recorded in /usr/local/apache/logs/error_log. If you have problems, double check your httpd.conf and php.ini, and make corrections.

When you start Apache, you must at least have ORACLE_HOME defined. Any other required Oracle environment variables must be set before Apache starts too. These are the same variables set by the $ORACLE_HOME/bin/oracle_env.sh or the /usr/local/bin/oraenv scripts.

To simplify things, you may create a script to start Apache. I did this and named it start_apache:

    #!/bin/sh


ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export ORACLE_HOME
echo "Oracle Home: $ORACLE_HOME"
echo Starting Apache
/usr/local/apache/bin/apachectl start
Testing Apache and PHP with Oracle

Testing PHP with Oracle is easy. You simply need to place a PHP file into your htdocs directory; normally /usr/local/apache/htdocs.

Here are two files, the first is used to test basic PHP installation. Open it in a browser with http://localhost/phpinfo.php. If PHP is installed you should see a large page full of PHP configuration information.

phpinfo.php
   

Check there is a section titled "oci8".

oci8test.php

The second file will display name and salary columns from the EMPLOYEES table owned by the HR user. This requires the HR schema be installed otherwise you will need to modify the script. The HR schema comes with Oracle XE. You can unlock access and set a password using the Adminstration section of the Database home page.

For Oracle XE the database connection string is simply "127.0.0.1/XE". If you are not using Oracle XE then change the connection string (third parameter) to the Oracle Net entry for your database.

  Oracle PHP Test";

echo "

Oracle PHP Test


";
echo "\n\n";
echo "\n\n\n";

for ($i = 0; $i < $nrows; $i++ ) { echo "\n";
echo "";
echo "";
echo "\n";
}

echo "
NameSalary
" . $results["LAST_NAME"][$i] . "$" . number_format($results["SALARY"][$i], 2). "
Number of Rows: $nrows
";
echo "
If you see data, then it works!
\n";

?>

Friday, December 11, 2009

vi solaris 10

vi(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | COMMAND SUMMARY | USAGE | ENVIRONMENT VARIABLES | FILES | ATTRIBUTES | SEE ALSO | AUTHOR | NOTES

NAME

    vi, view, vedit- screen-oriented (visual) display editor based on ex

SYNOPSIS


    /usr/bin/vi [-|-s] [-l] [-L] [-R] [-r[filename]] [-S] [-t tag] [-v] [-V] [-x] [-wn] [-C] [+command | -c command] filename...
    /usr/bin/view [-|-s] [-l] [-L] [-R] [-r[filename]] [-S] [-t tag] [-v] [-V] [-x] [-wn] [-C] [+command | -c command] filename...
    /usr/bin/vedit [-|-s] [-l] [-L] [-R] [-r[filename]] [-S] [-ttag] [-v] [-V] [-x] [-wn] [-C] [+command | -c command] filename...
    /usr/xpg4/bin/vi [-|-s] [-l] [-L] [-R] [-r[filename]] [-S] [-ttag] [-v] [-V] [-x] [-wn] [-C] [+command | -c command] filename...
    /usr/xpg4/bin/view [-|-s] [-l] [-L] [-R] [-r[filename]] [-S] [-ttag] [-v] [-V] [-x] [-wn] [-C] [+command | -c command] filename...
    /usr/xpg4/bin/vedit [-|-s] [-l] [-L] [-R] [-r[filename]] [-S] [-ttag] [-v] [-V] [-x] [-wn] [-C] [+command | -c command] filename...

DESCRIPTION

    vi (visual) is a display-oriented text editor based on an underlying line editor ex. It is possible to use the command mode of ex from within vi and to use the command mode of vi from within ex. The visual commands are described on this manual page; how to set options (like automatically numbering lines and automatically starting a new output line when you type carriage return) and all ex line editor commands are described on the ex(1) manual page.

    When using vi, changes you make to the file are reflected in what you see on your terminal screen. The position of the cursor on the screen indicates the position within the file.

    The view invocation is the same as vi except that the readonly flag is set.

    The vedit invocation is intended for beginners. It is the same as vi except that the report flag is set to 1, the showmode and novice flags are set, and magic is turned off. These defaults make it easier to learn how to use vi.

OPTIONS

    Invocation Options

      The following invocation options are interpreted by vi (previously documented options are discussed in the NOTES section of this manual page):

      - | -s

      Suppress all interactive user feedback. This is useful when processing editor scripts.

      -C

      Encryption option; same as the -x option, except that vi simulates the C command of ex. The C command is like the X command of ex, except that all text read in is assumed to have been encrypted.

      -l

      Set up for editing LISP programs.

      -L

      List the name of all files saved as the result of an editor or system crash.

      -r filename

      Edit filename after an editor or system crash. (Recovers the version of filename that was in the buffer when the crash occurred.)

      -R

      Readonly mode; the readonly flag is set, preventing accidental overwriting of the file.

      -S

      This option is used in conjunction with the -t tag option to tell vi that the tags file may not be sorted and that, if the binary search (which relies on a sorted tags file) for tag fails to find it, the much slower linear search should also be done. Since the linear search is slow, users of large tags files should ensure that the tags files are sorted rather than use this flag. Creation of tags files normally produces sorted tags files. See ctags(1) for more information on tags files.

      -t tag

      Edit the file containing the tag, tag, and position the editor at its definition.

      -v

      Start up in display editing state using vi. You can achieve the same effect by simply typing the vi command itself.

      -V

      Verbose. When ex commands are read by means of standard input, the input will be echoed to standard error. This may be useful when processing ex commands within shell scripts.

      -wn

      Set the default window size to n. This is useful when using the editor over a slow speed line.

      -x

      Encryption option; when used, vi simulates the X command of ex and prompts the user for a key. This key is used to encrypt and decrypt text using the algorithm of the crypt command. The X command makes an educated guess to determine whether text read in is encrypted or not. The temporary buffer file is encrypted also, using a transformed version of the key typed in for the -x option. If an empty encryption key is entered (that is, if the return key is pressed right after the prompt), the file will not be encrypted. This is a good way to decrypt a file erroneously encrypted with a mistyped encryption key, such as a backspace or undo key.

      +command | -c command

      Begin editing by executing the specified editor command (usually a search or positioning command).

    /usr/xpg4/bin/vi

      If both the -t tag and the -c command options are given, the -t tag option will be processed first. That is, the file containing tag is selected by -t and then the command is executed.

OPERANDS

    The following operands are supported:

    filename

    A file to be edited.

COMMAND SUMMARY

    vi Modes

      Command

      Normal and initial mode. Other modes return to command mode upon completion. ESC (escape) is used to cancel a partial command.

      Input

      Entered by setting any of the following options:


      a A i I o O c C s S R


      Arbitrary text may then be entered. Input mode is normally terminated with the ESC character, or, abnormally, with an interrupt.
      Last line

      Reading input for : / ? or !. Terminate by typing a carriage return. An interrupt cancels termination.

    Sample commands

      In the descriptions, CR stands for carriage return and ESC stands for the escape key.

      <-
      ->
      down-arrow
      up-arrow

      arrow keys move the cursor

      h j k l

      same as arrow keys

      itextESC

      insert text

      cwnewESC

      change word to new

      easESC

      pluralize word (end of word; append s; escape from input state)

      x

      delete a character

      dw

      delete a word

      dd

      delete a line

      3dd

      delete 3 lines

      u

      undo previous change

      ZZ

      exit vi, saving changes

      :q!CR

      quit, discarding changes

      /textCR

      search for text

      ^U ^D

      scroll up or down

      :cmdCR

      any ex or ed command

    Counts before vi commands

      Numbers may be typed as a prefix to some commands. They are interpreted in one of these ways:

      line/column number

      z G |

      scroll amount

      ^D ^U

      repeat effect

      most of the rest

    Interrupting, canceling

      ESC

      end insert or incomplete command

      DEL

      (delete or rubout) interrupts

    File manipulation

      ZZ

      if file modified, write and exit; otherwise, exit

      :wCR

      write back changes

      :w!CR

      forced write, if permission originally not valid

      :qCR

      quit

      :q!CR

      quit, discard changes

      :e nameCR

      edit file name

      :e!CR

      reedit, discard changes

      :e + nameCR

      edit, starting at end

      :e +nCR

      edit, starting at line n

      :e #CR

      edit alternate file

      :e! #CR

      edit alternate file, discard changes

      :w nameCR

      write file name

      :w! nameCR

      overwrite file name

      :shCR

      run shell, then return

      :!cmdCR

      run cmd, then return

      :nCR

      edit next file in arglist

      :n argsCR

      specify new arglist

      ^G

      show current file and line

      :ta tagCR

      position cursor to tag

      In general, any ex or ed command (such as substitute or global) may be typed, preceded by a colon and followed by a carriage return.

    Positioning within file

      F

      forward screen

      ^B

      backward screen

      ^D

      scroll down half screen

      ^U

      scroll up half screen

      nG

      go to the beginning of the specified line (end default), where n is a line number

      /pat

      next line matching pat

      ?pat

      previous line matching pat

      n

      repeat last / or ? command

      N

      reverse last / or ? command

      /pat/+n

      nth line after pat

      ?pat?-n

      nth line before pat

      ]]

      next section/function

      [[

      previous section/function

      (

      beginning of sentence

      )

      end of sentence

      {

      beginning of paragraph

      }

      end of paragraph

      %

      find matching ( ) or { }

    Adjusting the screen

      ^L

      clear and redraw window

      ^R

      clear and redraw window if ^L is -> key

      zCR

      redraw screen with current line at top of window

      z-CR

      redraw screen with current line at bottom of window

      z.CR

      redraw screen with current line at center of window

      /pat/z-CR

      move pat line to bottom of window

      zn.CR

      use n-line window

      ^E

      scroll window down one line

      ^Y

      scroll window up one line

    Marking and returning

      ``

      move cursor to previous context

      ´´

      move cursor to first non-white space in line

      mx

      mark current position with the ASCII lower-case letter x

      `x

      move cursor to mark x

      ´x

      move cursor to first non-white space in line marked by x

    Line positioning

      H

      top line on screen

      L

      last line on screen

      M

      middle line on screen

      +

      next line, at first non-white space character

      -

      previous line, at first non-white space character

      CR

      return, same as +

      down-arrow
      or j

      next line, same column

      up-arrow
      or k

      previous line, same column

    Character positioning

      ^

      first non-white space character

      0

      beginning of line

      $

      end of line

      l or ->

      forward

      h or <-

      backward

      ^H

      same as <- (backspace)

      space

      same as -> (space bar)

      fx

      find next x

      Fx

      find previous x

      tx

      move to character following the next x

      Tx

      move to character following the previous x

      ;

      repeat last f, F, t, or T

      ,

      repeat inverse of last f, F, t, or T

      n|

      move to column n

      %

      find matching ( ) or { }

    Words, sentences, paragraphs

      w

      forward a word

      b

      back a word

      e

      end of word

      )

      to next sentence

      }

      to next paragraph

      (

      back a sentence

      {

      back a paragraph

      W

      forward a blank-delimited word

      B

      back a blank-delimited word

      E

      end of a blank-delimited word

    Corrections during insert

      ^H

      erase last character (backspace)

      ^W

      erase last word

      erase

      your erase character, same as ^H (backspace)

      kill

      your kill character, erase this line of input

      \

      quotes your erase and kill characters

      ESC

      ends insertion, back to command mode

      CTRL-C

      interrupt, suspends insert mode

      ^D

      backtab one character; reset left margin of autoindent

      ^^D

      caret (^) followed by control-d (^D); backtab to beginning of line; do not reset left margin of autoindent

      0^D

      backtab to beginning of line; reset left margin of autoindent

      ^V

      quote non-printable character

    Insert and replace

      a

      append after cursor

      A

      append at end of line

      i

      insert before cursor

      I

      insert before first non-blank

      o

      open line below

      O

      open line above

      rx

      replace single character with x

      RtextESC

      replace characters

    Operators

      Operators are followed by a cursor motion and affect all text that would have been moved over. For example, since w moves over a word, dw deletes the word that would be moved over. Double the operator, for example dd, to affect whole lines.

      d

      delete

      c

      change

      y

      yank lines to buffer

      <

      left shift

      >

      right shift

      !

      filter through command

    Miscellaneous Operations

      C

      change rest of line (c$)

      D

      delete rest of line (d$)

      s

      substitute characters (cl)

      S

      substitute lines (cc)

      J

      join lines

      x

      delete characters (dl)

      X

      delete characters before cursor dh)

      Y

      yank lines (yy)

    Yank and Put

      Put inserts the text most recently deleted or yanked; however, if a buffer is named (using the ASCII lower-case letters a - z), the text in that buffer is put instead.

      3yy

      yank 3 lines

      3yl

      yank 3 characters

      p

      put back text after cursor

      P

      put back text before cursor

      "xp

      put from buffer x

      "xy

      yank to buffer x

      "xd

      delete into buffer x

    Undo, Redo, Retrieve

      u

      undo last change

      U

      restore current line

      .

      repeat last change

      "dp

      retrieve d'th last delete

USAGE

    See largefile(5) for the description of the behavior of vi and view when encountering files greater than or equal to 2 Gbyte ( 231 bytes).

ENVIRONMENT VARIABLES

    See environ(5) for descriptions of the following environment variables that affect the execution of vi: LC_CTYPE, LC_TIME, LC_MESSAGES, and NLSPATH.

FILES

    /var/tmp

    default directory where temporary work files are placed; it can be changed using the directory option (see the ex(1) command)

    /usr/share/lib/terminfo/?/*

    compiled terminal description database

    /usr/lib/.COREterm/?/*

    subset of compiled terminal description database

ATTRIBUTES

    See attributes(5) for descriptions of the following attributes:

    /usr/bin/vi

    /usr/bin/view

    /usr/bin/vedit

      ATTRIBUTE TYPE ATTRIBUTE VALUE
      Availability SUNWcsu
      CSI Not enabled

    /usr/xpg4/bin/vi

    /usr/xpg4/bin/view

    /usr/xpg4/bin/vedit

      ATTRIBUTE TYPE ATTRIBUTE VALUE
      Availability SUNWxcu4
      CSI Enabled

SEE ALSO