 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
kkathman
Joined: 14 Jan 2008 Posts: 2 Location: North Texas
|
Posted: Mon Jan 14, 2008 10:39 am Post subject: Using PEAR with Xampp - Primer please? |
|
|
Greetings,
I wonder if anyone has had experience with using PEAR with PHP5 in the Xampp environment on Windows XP?
Im trying to get a handle on how to install the modules and develop with PEAR (newb here wrt PEAR) while maintaining development files in ...\htdocs\<yourdomain>.
So for instance if I have a domain called "foo" it resides physically in C:\Xampp\htdocs\foo. Now the pear library is located in C:\Xampp\php\PEAR.
Now as I code I'd like to use the PEAR module called HTML_QuickForm and another one called DB_DataObject. Can anyone just quickly give me a hint on how I can accomplish this?
Right now Im using Dreamweaver CS3 to code this up and of course I need to eventually load this up to the host server in the end.
Thanks for the help in advance!
Kork |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1000
|
Posted: Mon Jan 14, 2008 12:53 pm Post subject: |
|
|
Do I get you right? You have PEAR already installed?
If yes, you just need to add this directory to your include_path setting, and call "pear install PackageName", e.g. "pear install HTML_QuickForm" on the command line. After that you can follow the examples that you are bundled with the packages or that can be found in the manual. |
|
| Back to top |
|
 |
kkathman
Joined: 14 Jan 2008 Posts: 2 Location: North Texas
|
Posted: Mon Jan 14, 2008 5:24 pm Post subject: |
|
|
Thanks Mark.
When you install Xampp, it creates a directory in Windows C:\Xampp. Underneath this directory are several others, including an htdocs directory (where you normally put your domains you are working on), phpMyAdmin, and there is one C:\Xampp\php. In this directory there is a subdirectory called PEAR (i.e. C:\Xampp\php\PEAR). This directory has ll the code, it seems. There is a folder for HTML, for DB etc, each of which contains the code segments I guess for the modules (sorry I dont know specifically).
So, yes, I assume that PEAR is installed in its C:\Xampp\php\PEAR directory.
When you say use the include path, do you mean the path in Windows or the path in the php.ini file?
When I search the C:\Xampp\php directory though, I do find a pear.bat, but no pear.exe. perhaps I need to run the pear.bat first? |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1000
|
Posted: Mon Jan 14, 2008 5:45 pm Post subject: |
|
|
| kkathman wrote: | | In this directory there is a subdirectory called PEAR (i.e. C:\Xampp\php\PEAR). This directory has ll the code, it seems. There is a folder for HTML, for DB etc, each of which contains the code segments I guess for the modules (sorry I dont know specifically). |
If you have Quickform.php in the HTML subdirectory, then HTML_QuickForm is already installed.
| kkathman wrote: | | So, yes, I assume that PEAR is installed in its C:\Xampp\php\PEAR directory. |
Right.
| kkathman wrote: | | When you say use the include path, do you mean the path in Windows or the path in the php.ini file? |
The include_path setting in php.ini. If XAMPP already installs PEAR it is likely that the setting is already correct.
| kkathman wrote: | | When I search the C:\Xampp\php directory though, I do find a pear.bat, but no pear.exe. perhaps I need to run the pear.bat first? |
There is no pear.exe. pear.bat is everything you need. Open the command line and type e.g. "pear -V" or "pear list". The first command will give you the installed PEAR version, the latter command will show you all the already installed packages on your system with their version numbers. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|