473,559 Members | 2,982 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question concerning proper dir structure for PEAR/Smarty

OK, I am new to the whole PEAR/Smarty templating thing. I am trying to
setup my directory structure correctly. If someone could weigh in and
see if I have this setup "right", I would appreciate it. Directory
structure:

pear/
db/
db/
DB/
doc/
tests/
DB.php
... other pear packages
smarty/
... all smarty files
OS/
PEAR/
... pear basic package files
scripts/
package.xml
package2.xml
package.dtd
PEAR.php
System.php
template.spec

I want to make sure this looks right, because my PEAR db class appears
to be buried pretty deep (db/db/DB.php) and I want to make sure I
manually put the smarty files in the correct place.

I did a lot of searching, and really didn't come up with much. Would
appreciate some input, thank you very much!

Jim

Jul 17 '05 #1
1 2040
DJ Majestik wrote:
OK, I am new to the whole PEAR/Smarty templating thing. I am trying to
setup my directory structure correctly. If someone could weigh in and
see if I have this setup "right", I would appreciate it. Directory
structure:

pear/
db/
db/
DB/
doc/
tests/
DB.php
... other pear packages
smarty/
... all smarty files
OS/
PEAR/
... pear basic package files
scripts/
package.xml
package2.xml
package.dtd
PEAR.php
System.php
template.spec

I want to make sure this looks right, because my PEAR db class appears
to be buried pretty deep (db/db/DB.php) and I want to make sure I
manually put the smarty files in the correct place.

I did a lot of searching, and really didn't come up with much. Would
appreciate some input, thank you very much!

I just leave the PEAR stuff to the PEAR commandline installer:

$ sudo pear install DB

which gives me this:

.....
DB/
DB.php
OS/
PEAR/
PEAR.php
.....

So, DB.php is on the same level as the DB subdirectory. In fact, all the
classes which have to be included are in this directory
(/usr/local/php/lib/php in my Mac OS X system).

and I have

include_path = ".:/usr/local/php/lib/php"

in my php.ini. The effect being that if do a "pear install
<module_name> ", I can always use this:

require('<modul e_name>.php');

and it will work.

I would advise you to leave the PEAR directory structure to the PEAR
installer, and put Smarty wherever it makes sense to you. I put it
manually in the /usr/local/php/lib/php directory, in a subdir called
Smarty, and I added /usr/local/php/lib/php/Smarty to my include_path, so
that I can simply do a require('Smarty .class.php').

JP

--
Sorry, <de*****@cauce. org> is a spam trap.
Real e-mail address unavailable. 5000+ spams per month.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1576
by: Sebastian Benner | last post by:
Hi, what are your experiences with Smarty and PEAR/HTML_Progress? http://pear.laurent-laville.org/HTML_Progress/apidoc/HTML_Smarty/default/ I tried it, but having difficulties producing a working bar. The bar gets displayed, it is running (verified by looking at the html source code), but on the webpage there is just the empty bar......
6
1713
by: DJ Majestik | last post by:
OK, I am devising a php page that will handle a form submission, and wanted to know if anyone has already setup such an idea, or if you had links to point to good tutorials on this. Basically I have a form (which I use smarty templating to display, and smartyvalidator to validate). The php page basically is driven by the action variable...
0
1596
by: Conrad | last post by:
Hi, I'm very new to Smarty Template Engine and I'm using PHP 5.0.4 on the Windows XP Professional platform and I have the following question: When I change the 7th line of the script to use a new name and refresh the browser, it maintains the old value instead of updating to the new value. Both index.php and SmartySetup.class.php appear...
2
1302
by: awebguynow | last post by:
latest PEAR on W32, refers to PHP5 inaccurately. I've seen posts regarding path's that get messed up, by lost ini's or registry settings. I don't think that's my case, because I can't find PHP5 in registry or any left-over ini's. This is a new PC that I use on the weekends mostly. The latest Pear version 1.4.5-I believe, also seems to have...
1
2217
by: IchBin | last post by:
I am new to PHP and I am running on Windoze XP SP 2. Just noticed that the PEAR installed dir structure I have (to DB subdir) is : C:\php5.2\PEAR\pear\DB My registry vars are: "PHP_PEAR_SYSCONF_DIR"="C:\\php5.2\\PEAR" "PHP_PEAR_INSTALL_DIR"="C:\\php5.2\\PEAR\\pear" "PHP_PEAR_DOC_DIR"="C:\\php5.2\\PEAR\\pear\\docs"...
4
2117
by: awebguynow | last post by:
Re: only got "pear.old_bat" I had a previous post ".. Upgrade Methods ..." and so far I've gotten around most thorny issues, including patching php5.1.4 with php5apache2_2.dll so I can run it as module with Apache2.2.3 I need a educated response from a PEAR developer, if possible My 1st run go-pear died because I exceeded "maximum...
6
2552
by: alvarojaviervera | last post by:
Im programer (about 2 years ago I started), and allways I use PEAR. and Now I was thinking about change my tool for building custom dynamic sites. What do you think sholud be better Smarty, may be Pear or another one? Why? I need your comments and experience. Thanks 4 your time. Alvaro J Vera Alvarado VNC SFE.-
2
2063
by: Gene | last post by:
i'm newcomer in using smarty and i have problem like this: i want to have one template file (e.g. index.tpl) in this file section which use variable {$content}. and two files *.php which are using the same template index.tpl and only change the content. for example: /*index.php*/ $smarty = new MySmarty();...
2
1328
by: howa | last post by:
This is quite interesting, PHP is so success, but Pear as an offical package, seems to be a little bit weak. i have developed PHP for many years, and can easily do my job without Pear, e.g. I use Smarty, PHPmailer, adodb etc. However, In the old day when I use perl, cpan is a must for perl developer.
0
7629
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7593
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7915
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6184
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5455
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1165
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.