pear설치(cafe24) 및 테스트

* php의 플레임워크는 무었인가? 답은 pear 플레임워크이다. 그러나 대부분의 php유저들이 cafe24와 같은 호스팅 업체를 이용한다. 그렇다면 php4대 버전에서는 pear플레임워크를 사용할 수 없는 것인가? 아니다! 사용 할 수 있다.

아래와 같이 사용하면 된다. (요즘 세월이 좋아저서 너무도 쉽고 간편하게 웹인터페이스를 통해 설치 및 관리가 가능하다. 예전에는 컨멘드 명령 모르는 사람은 쓰지도 못했었는데...)



1. http://go-pear.org에 접속한다.

사용자 삽입 이미지


2. 로컬 폴더에 저장한다.
사용자 삽입 이미지

3. ftp로 호스팅 서버에 올려준다. (확장자는 php로 올려야 한다. ex: go-pear.php)
폴더 하나 만들어서 거기다 올려주면 좋다. 이유는 설치가 완료되고 나면 다른 다른 파일과 폴더들이 생기기 때문이다.
사용자 삽입 이미지

4. 올려준 위치로 브라우저로 접속한다.
사용자 삽입 이미지

5. install을 클릭해 주면 아래 그림과 같이 자동으로 다운 받아서 설치가 된다.(시간이 좀 걸림으로 담배 한대 피고와도 무방..ㅋㅋ)
사용자 삽입 이미지

6. 대충 긍정적인 것 눌러서 설치를 마치면 아래와 같은 페이지가 뜬다. 그러면 설치가 완료된 것이다. 여기다 다른 플레임 워크를 추가 하고 싶다면 왼쪽에 search package를 클릭한다.
사용자 삽입 이미지

7. 찾을 플레임웍페키지를 치고 검색을 누른다.(혹은 package Management에서 눈으로 찾아도 무방)
사용자 삽입 이미지

8. 아래 그림과 같이 찾아진 페키지에 +모양 버튼을 클릭한다.
사용자 삽입 이미지

9. 그리고 또 담배 한대 피고 온다..ㅋㅋ
사용자 삽입 이미지

10. 설치가 완료되면 아래 그림과 같이 해당 페키지가 설치 되어 있는 것을 확인 할 수 있다.
사용자 삽입 이미지

11. 위 그림에서 i모양 버튼을 클릭해서 pear홈페이지로 와서 추가 적인 정보를 확인 할 수도 있다.
  메뉴얼의 내용에 보면 셈플 코드도 있다. 이를 복사 한다.
사용자 삽입 이미지

12. 텔넷으로 접속해서 설치된 정보를 확인 할 수 있다.
사용자 삽입 이미지

13. 위 11에서 찾은 소스 코드를 아래와 같이 수정해서 호스트에 저장한다.
(페스를 수정했는데 이유는 우리가 php폴더에 pear플레임웍 모듈로 저장 하지 못해서 본인의 계정폴더 안에 pear를 설치 했기 때문에 페키지도 거기에 저장 되어서 그렇다.)
사용자 삽입 이미지

14. 웹 브라우저로 제대로 동작하는지 확인한다.
사용자 삽입 이미지


15. 차후에 계속 pear플레임워크를 관리 하기 원한다면 pear을 설치한 루트 폴더에 브라우저로 접속하면 된다. ex) http://j.finfra.com/pear  <---나는 몇일 지나면 이 폴더를 지울 것이다. 보안에 문제가 많다.ㅠㅠ



* 제대로 된 방법은 아니지만 우리가 php.ini파일을 수정할 수도 없는 호스팅 업체를 이용한다면 이렇게 짝퉁(?)이지만 비슷하게 pear플레임 워크를 설치하고 테스트 해보는 정도는 할 수 있지 않을까 싶다.




Written by NaHyunJae(http://j.finfra.com)
Copyright NaHyunJae(http://j.finfra.com) All Rights Reserved

Posted by 나현재

2007/01/03 21:26 2007/01/03 21:26
, , ,
Response
0 Trackbacks , 2 Comments
RSS :
http://j.finfra.com/tt/rss/response/409

0. 메뉴얼을 꼼꼼히 읽을 것.

1. 코딩시간 < 검색 및 페키지 분석.

2. test Suit를 눈에 익혀 둘 것.

3. 오프라인 메뉴얼(특히 chm버전)은 보지 말것.

4. 코드 분석 하는데 부담 갖지 말것.

Written by NaHyunJae(http://j.finfra.com)
Copyright Finfra(http://www.finfra.com) All Rights Reserved

Posted by 나현재

2004/12/22 09:57 2004/12/22 09:57
, ,
Response
0 Trackbacks , 0 Comments
RSS :
http://j.finfra.com/tt/rss/response/169

출처 - 직접 작성

개요
editPlus의 php문형에 관한 기본 템플릿은 pear의 코딩 스텐다드의 Indenting and Line Length
(http://pear.php.net/manual/en/standards.php )를 만족 시키지 못한다. 따라서, 페어 페키지를 공용으로 만들거나 할 사람은 페어페키지 코딩 스텐다드가 잘 지켜 지도록 editPlus2의 셋팅을 바꿔서 사용해야 하겠다.

내용 (Tab키 관련 부분만임)
텝의 넓이는 4space이고, 텝키가 아니라 spaceX4로 입력해야 한다.

방법
document -> permanent Setting => files -> Setting & syntax -> PHP -> Setting and Syntax -> Tab/Ident => Tab = 4, Ident = 4 , 나머지 다 체크

기존 코드에 대한 적용
위 방법데로 셋팅하고 Edit->format->Tabs To Spaces를 클릭해줌.

확인하기
editPlus2의 Tabs and Spaces(Alt+Shift+I) 메뉴를 클릭해줌.

기타
pear페키지를 생성해서 공개할 사람이 아니면 필요없는 기능이기는 함.


Written by NaHyunJae(http://j.finfra.com)
Copyright Finfra(http://www.finfra.com) All Rights Reserved

Posted by 나현재

2004/12/21 18:42 2004/12/21 18:42
, , ,
Response
0 Trackbacks , 0 Comments
RSS :
http://j.finfra.com/tt/rss/response/168

1. DB_DataObject_FormBuilder 0.10.3 페키지 설치


[CODE]Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. F:Documents and Settingsjgnam>cd F:Inetpub\_programpear F:Inetpub\_programpear>pear install DB_DataObject_FormBuilder No release with state equal to: 'stable' found for 'DB_DataObject_FormBuilder' F:Inetpub\_programpear>pear install DB_DataObject_FormBuilder-0[1].10.3.tgz requires package `HTML_QuickForm' requires package `DB_DataObject' DB_DataObject_FormBuilder: Dependencies failed F:Inetpub\_programpear>pear install HTML_QuickForm downloading HTML_QuickForm-3.2.4pl1.tgz ... Starting to download HTML_QuickForm-3.2.4pl1.tgz (93,144 bytes) .....................done: 93,144 bytes requires package `HTML_Common' >= 1.2.1 HTML_QuickForm: Dependencies failed F:Inetpub\_programpear>pear install HTML_Common downloading HTML_Common-1.2.1.tgz ... Starting to download HTML_Common-1.2.1.tgz (3,637 bytes) ....done: 3,637 bytes install ok: HTML_Common 1.2.1 F:Inetpub\_programpear>pear install HTML_QuickForm downloading HTML_QuickForm-3.2.4pl1.tgz ... Starting to download HTML_QuickForm-3.2.4pl1.tgz (93,144 bytes) .....................done: 93,144 bytes install ok: HTML_QuickForm 3.2.4pl1 F:Inetpub\_programpear>pear install DB_DataObject downloading DB_DataObject-1.7.2.tgz ... Starting to download DB_DataObject-1.7.2.tgz (45,244 bytes) .............done: 45,244 bytes requires package `Date' >= 1.4.3 DB_DataObject: Dependencies failed F:Inetpub\_programpear>pear install Date downloading Date-1.4.3.tgz ... Starting to download Date-1.4.3.tgz (42,048 bytes) ............done: 42,048 bytes install ok: Date 1.4.3 F:Inetpub\_programpear>pear install DB_DataObject downloading DB_DataObject-1.7.2.tgz ... Starting to download DB_DataObject-1.7.2.tgz (45,244 bytes) .............done: 45,244 bytes Optional dependencies: package `Validate' version >= 0.1.1 is recommended to utilize some features. install ok: DB_DataObject 1.7.2 F:Inetpub\_programpear>pear install DB_DataObject_FormBuilder-0[1].10.3.tgz Optional dependencies: package `HTML_Table' is recommended to utilize some features. install ok: DB_DataObject_FormBuilder 0.10.3 F:Inetpub\_programpear>pear install Validate No release with state equal to: 'stable' found for 'Validate' F:Inetpub\_programpear>pear install HTML_Table downloading HTML_Table-1.5.tgz ... Starting to download HTML_Table-1.5.tgz (6,276 bytes) .....done: 6,276 bytes install ok: HTML_Table 1.5 F:Inetpub\_programpear>pear install DB_DataObject Package 'DB_DataObject' already installed, skipping F:Inetpub\_programpear>[/CODE]



2. _FormBuilder 0.10.3 페키지 종속 표

DB_DataObject
<-DB_DataObject_FormBuilder(0.10.3)
<- HTML_QuickForm (v3.2.9pl1)
<- HTML_Common (v1.2.1)
<- HTML_Table (v1.5) -optional
<- DB_DataObject (v1.7.2)
<- Date (v.1.4.3)

Posted by 나현재

2004/12/07 16:12 2004/12/07 16:12
, ,
Response
0 Trackbacks , 1 Comments
RSS :
http://j.finfra.com/tt/rss/response/151

최종 선택된 주석문 예제.
* object model에서 +는 상속, =는 사용

/**
* frWpDbL v0.9.2 (FrWeb Package series Ddatabase Layer )
*
* The main "frWpDbL" class is simply a container class with some static
* methods for creating DB objects as well as some utility functions
* common to all parts of DB.
*
* The object model of frWpDbL is as follows (= only using, required.):
*
* frWpDbL The main frWpDbL class. This is simply a utility class
* | with some "static" methods for creating frWpDbL objects as
* | well as common utility functions for other frWpDbL classes.
* |
* =-frWpConfig The wrapper for pear package config implementation.
* | This package contains installed configuration file path.
* |
* =-config This is pear package config(1.10.3).
*
* @package frWpDbL.php , frWpDbLHead.php, frWpDbL_test.php(optional)
* @filename : frWpDbL.php
* @author JoongGoo-Nam (j@finfra.com) (http://j.finfra.com)
* @since PHP 5.0.2
* @version $Id: frWpDbL.php,v 0.92 2004/12/02
* v 0.9 2004.12.01 10:39:35 by jgnam
* Jonas Koch Bentzen(2002)이 만든 Fasdab라는 클레스 모듈을 참고하여
* myslq5.0을 지원하는 클레스로 만들고 이름을 fdc(fdc.mysqli.php)로 명명함.
* pconnect를 대한 지원하지 않음.
* v 0.9.2 2004.12.02 by jgnam
* frWeb 시리즈의 이름을 통일 하기 위해 이름을 fdc(fdc.mysqli.php)에서
* frWpDbL(frWpDbL.php)로 변경함.
* @licesence: finfra.com All Rights Reserved
* @category Database
* @TODO : - __destruct를 통한 자동 디비 클로징 기능.
* - mysql(예전버전),postgreSql 및 mssql지원 기능
* @info : frWpConfig 필요.
* Mysql 5.0 이상 버전에서 동작합니다.
* (4.1버전 작동 가능할 것으로 예상하나 테스트 전)
*
*/



more..




재료 1.


/**
* Writes the configuration to a file
*
* @param mixed $datasrc Info on datasource such as path to the configuraton file or dsn...
* @param string $configType Type of configuration
* @param array $options Options for writer
* @access public
* @return mixed true on success or PEAR_ERROR
*/
function writeDatasrc($datasrc, $configType, $options = array())
{
$configType = strtolower($configType);


재료 2
/**
* The main "DB" class is simply a container class with some static
* methods for creating DB objects as well as some utility functions
* common to all parts of DB.
*
* The object model of DB is as follows (indentation means inheritance):
*
* DB The main DB class. This is simply a utility class
* with some "static" methods for creating DB objects as
* well as common utility functions for other DB classes.
*
* DB_common The base for each DB implementation. Provides default
* | implementations (in OO lingo virtual methods) for
* | the actual DB implementations as well as a bunch of
* | query utility functions.
* |
* +-DB_mysql The DB implementation for MySQL. Inherits DB_common.
* When calling DB::factory or DB::connect for MySQL
* connections, the object returned is an instance of this
* class.
*
* @package DB
* @author Stig Bakken
* @author Tomas V.V.Cox
* @since PHP 4.0
* @version $Id: DB.php,v 1.59 2004/07/08 21:15:11 danielc Exp $
* @category Database
*/

Posted by 나현재

2004/12/06 17:40 2004/12/06 17:40
, ,
Response
0 Trackbacks , 2 Comments
RSS :
http://j.finfra.com/tt/rss/response/147

I. 개요.
Pear은 닷넷과 달리 모든 플레임 웩네의 클래스 드을 포함 하고 있지 아니하다 따라서 필요에 의해서 다운 받아 설치 하여야 한다.
윈도우즈 환경에서의 설치 및 테스트임.
II. 설치 절차
1. http://pear.php.net/packages.php 에 접속 해서 필요한 페키지를 찾아서 다운 받는다.

2. 피어가 설치된 폴더의 루트에 압축된 페키지를 가져다 놓는다.

3. 컨멘드 모드에서 해당 폴더로 이동한다.
ex) 시작->실행->cmd /k cd F:\Inetpub\_program\pear
4. "pear.bat install+페키지 파일명 "을 실행 시킨다.
ex)
[CODE] F:\Inetpub\_program\pear>dir F 드라이브의 볼륨: Main 볼륨 일련 번호: D85D-2928 F:\Inetpub\_program\pear 디렉터리 2004-11-25 04:22p <DIR> . 2004-11-25 04:22p <DIR> .. 2004-11-25 03:00p 13,237 HTML_Form-1[1].1.0.tgz 2004-11-25 04:23p <DIR> pear 2004-11-25 04:18p 2,879 pear.bat 2004-11-25 04:18p 381 pear.ini 2004-11-25 04:18p 455 PEAR_ENV.reg 4개 파일 16,952 바이트 3 디렉터리 19,653,120,000 바이트 남음 F:\Inetpub\_program\pear>pear.bat install HTML_Form-1[1].1.0.tgz HTML_Form already installed F:\Inetpub\_program\pear>[/CODE]


III. 테스트
1. 파일이 생성 되었는지 확인한다.

2. 셈플 코드를 php가 설치된 서버에 올려서 테스트 한다.


3. 완료



written by NaHyunJae(http://j.finfra.com)

Posted by 나현재

2004/11/25 16:58 2004/11/25 16:58
,
Response
1 Trackbacks , 0 Comments
RSS :
http://j.finfra.com/tt/rss/response/133

PHP-Pear Install and Manual

* manual



* pear Install file.





* install process in Windows.


step1. down insall batch File.!




step2. execute the batch file.!



more..




C:\>move go-pear.txt go-pear.php

C:\>php go-pear.php
Welcome to go-pear!

Go-pear will install the 'pear' command and all the files needed by
it. This command is your tool for PEAR installation and maintenance.

Use 'php go-pear.php local' to install a local copy of PEAR.

Go-pear also lets you download and install the PEAR packages bundled
with PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser, PHPUnit.


If you wish to abort, press Control-C now, or press Enter to continue:

HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none::

Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.

1. Installation prefix : C:\
2. Binaries directory : $prefix
3. PHP code directory ($php_dir) : $prefix\pear
4. Documentation base directory : $php_dir\docs
5. Data base directory : $php_dir\data
6. Tests base directory : $php_dir\tests
7. php.exe path : f:\inetpub\_program\php5\php.exe

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

Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.

1. Installation prefix : F:\Inetpub\_program\pear
2. Binaries directory : $prefix
3. PHP code directory ($php_dir) : $prefix\pear
4. Documentation base directory : $php_dir\docs
5. Data base directory : $php_dir\data
6. Tests base directory : $php_dir\tests
7. php.exe path : f:\inetpub\_program\php5\php.exe

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

The following PEAR packages are bundled with PHP: DB, Net_Socket, Net_SMTP,
Mail, XML_Parser, PHPUnit.
Would you like to install these as well? [Y/n] : Y

Loading zlib: ok
Downloading package: PEAR-stable......ok
Downloading package: Archive_Tar-stable....ok
Downloading package: Console_Getopt-stable....ok
Downloading package: XML_RPC-stable....ok
Bootstrapping: PEAR...................(remote) ok
Bootstrapping: Archive_Tar............(remote) ok
Bootstrapping: Console_Getopt.........(remote) ok
Downloading package: DB...............ok
Downloading package: Net_Socket.......ok
Downloading package: Net_SMTP.........ok
Downloading package: Mail.............ok
Downloading package: XML_Parser.......ok
Downloading package: PHPUnit..........ok
Extracting installer..................ok
install ok: PEAR 1.3.3.1
install ok: Archive_Tar 1.2
install ok: Console_Getopt 1.2
install ok: XML_RPC 1.1.0
install ok: DB 1.6.8
install ok: Net_Socket 1.0.2
install ok: Net_SMTP 1.2.6
install ok: Mail 1.1.4
install ok: XML_Parser 1.2.1
install ok: PHPUnit 1.1.1

******************************************************************************
WARNING! The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:

If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.


Would you like to alter php.ini ? [Y/n] :

php.ini include_path updated.

Current include path : .;F:\Inetpub\_program\smarty
Configured directory : F:\Inetpub\_program\pear\pear
Currently used php.ini (guess) : F:\WINNT\php.ini
Press Enter to continue:

The 'pear' command is now at your service at f:\inetpub\_program\pear\pear.bat

** The 'pear' command is not currently in your PATH, so you need to
** use 'f:\inetpub\_program\pear\pear.bat' until you have added
** 'F:\Inetpub\_program\pear' to your PATH environment variable.

Run it without parameters to see the available actions, try 'pear list'
to see what packages are installed, or 'pear help' for help.

For more information about PEAR, see:

http://pear.php.net/faq.php
http://cvs.php.net/co.php/pearweb/doc/pear_package_manager.txt?p=1
http://pear.php.net/manual/

Thanks for using go-pear!



* WINDOWS ENVIRONMENT VARIABLES *
For convenience, a REG file is available under F:\Inetpub\_program\pear\PEAR_ENV
.reg .
This file creates ENV variables for the current user.

Double-click this file to add it to the current user registry.


C:\>



step3. add the pear registry entry by reg file double click..!




step4. restart Web Server.!




written by NaHyunJae(http://j.finfra.com)

Posted by 나현재

2004/11/25 10:53 2004/11/25 10:53
,
Response
0 Trackbacks , 5 Comments
RSS :
http://j.finfra.com/tt/rss/response/131


블로그 이미지

Insufficient memory! So,Blog is my 2nd Brain!

- 나현재

Notices

Archives

Authors

  1. 나현재

Calendar

«   2012/02   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Site Stats

Total hits:
202429
Today:
0
Yesterday:
18