Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.7.5

Bug #11525 cannot read the template file error
Submitted: 2007-07-05 08:28 UTC
From: mcorne Assigned: tias
Status: Closed Package: PEAR_Frontend_Web (version 0.7.1)
PHP Version: 5.2.1 OS: XP
Roadmaps: (Not assigned)    
Subscription  


 [2007-07-05 08:28 UTC] mcorne (Michel Corne)
Description: ------------ I am simply login the bug as suggested. You will find below the detail of the email exchange with tias, including the work around which seems to work btw, thx. the email thread ---------------- On Sun, Jul 01, 2007 at 07:52:38AM -0700, Michel Corne wrote: > So I set $pear_user_config = 'C:\Program Files\pear\pear'; as you instructed. > But I now get the following error message: Fatal error: Call to undefined method PEAR_Error::get() in C:\Program Files\pear\pear\pearfrontendweb.php on line 100 > Note that Config.php is now executed. > Any idea what the issue is this time? It means you tracked yet again a bug : ) You must set the config file to the file itself, not just the directory. The error is a buggy way of saying that the config was not a config, but a directory ; ) Try setting it to the file itself if your config is c:\Program Files\pear\pear.ini then it should read: $pear_user_config = 'C:\Program Files\pear\pear.ini' Greetings, Feel free to open a bug report about this at http://bugs.pear.php.net/bugs/report.php?package=PEAR_Frontend_Web Tias > Thanks, > MC > > ----- Original Message ---- > From: Tias <tias@ulyssis.org> > To: Michel Corne <mcorne@yahoo.com> > Sent: Saturday, June 30, 2007 11:39:16 PM > Subject: Re: error with PEAR_Frontend_Web > > On Sat, Jun 30, 2007 at 01:29:40PM -0700, Michel Corne wrote: > > 'pear config-get data_dir' returns the right thing: C:\Program Files\pear\pear\data. > > the index.php file has the right stuff too: $pear_dir = 'C:\Program Files\pear\pear'. > > Btw, I have a similar error with PEAR_Info. I don't know if this is related. I'll forward you the email I sent to the PEAR_Info leads and their reply as an FYI. > > Thanks for looking into this, > > MC > > Thanks for the info. > > The solution is point $pear_user_config to your config, in your > index.php. > > I'll adjust the default behaviour of the webfrontend to also look for > the config location that the pear command uses. > > > Greetings, > Tias > > > ----- Original Message ---- > > From: Tias <tias@ulyssis.org> > > To: Michel Corne <mcorne@yahoo.com> > > Cc: greg@chiaraquartet.net > > Sent: Saturday, June 30, 2007 8:52:46 PM > > Subject: Re: error with PEAR_Frontend_Web > > > > Interesting, > > > > I hope you can run the pear command, if so try: > > 'pear config-get data_dir'. > > Does this return 'c:\php5\pear\data' ? because that would be the > > problem. > > > > If not, perhaps the webfrontend is using an old config file that you > > don't want it to use. Open your index.php file (or whatever file you point your webbrowser too), and uncomment $pear_user_config = ''; and fill in the location of the config file you want to use there. > > Does the error still exist ? > > If so, what is the value that is given to '$pear_dir' there ? and does > > it match the value of 'pear config-get php_dir' ? > > > > > > Hoping to resolve the problem, > > Tias > > > > PS. Use the bugtracker for reporting errors please. > > > > > > > > On Sat, Jun 30, 2007 at 05:53:48AM -0700, Michel Corne wrote: > > > Hi guys, > > > I am trying to use PEAR_Frontend_Web on XP but I get the error below. It is looking for stuff in C:\php5\pear\data/PEAR_Frontend_Web/data/templates. There is no such directory (php5) on my box. The actual directory is : C:\Program Files\pear\pear\data\PEAR_Frontend_Web\data\templates. I verified that there is no mention of php5 in the PATH, the PEAR config or the environment variables. And PHP is installed in C:\Program Files\php-5.2.1. Do you have any idea what is going on? > > > Thanks for your help, > > > MC > > >

Comments

 [2007-07-09 16:14 UTC] tias (Tias Guns)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2007-09-26 16:18 UTC] felixtherat (Clancy Hood)
Still unresolved this, also please note the config file is pear.conf not pear.ini as mentioned in this thread. The commented lines in index.php read: // OPTIONAL: If you have a config file at a non-standard location, // uncomment and supply it here: //$pear_user_config = ''; but even if you haven't altered anything, the config lives in the same directory as index.php and setting the variable simply to $pear_user_config = 'pear.conf'; works fine. Surely then this is the standard location?
 [2007-09-26 20:51 UTC] tias (Tias Guns)
``works fine. Surely then this is the standard location?'' For installations by go-pear: yes this is the default location. If you leave the $pear_user_config commented, than the webfrontend will check several locations (inlcuding ./pear.conf on linux and ./pear.ini on windows). Can you more accurately describe your bug ? * What OS are you using ? * How did you install the webfrontend (go-pear or package on existing install?) * At what location are your files ? * What is the actual error ?
 [2007-11-21 01:44 UTC] felixtherat (Clancy Hood)
Tias - thanks for responding "Can you more accurately describe your bug ?" Having installed pear, nothing works. You get error beginning "Fatal error: Call to undefined method PEAR_Error::get()" exactly as described in the email posted above (I originally came to this page via google search for same error). Everything is fine since I changed the line to $pear_user_config = 'pear.conf'; but I was just remarking how it was the only part of an otherwise perfectly elegant installation system that tripped it up. * What OS are you using ? WinXP on dev machine at home, php5, apache2.2 * How did you install the webfrontend (go-pear or package on existing install?) On my case, go-pear from go-pear.org for initial installation "./pear.conf on linux and ./pear.ini on windows" Actually, I've got pear.conf on windows, downloaded automatically via go-pear. Maybe this is the issue (that it looks for an ini file that isn't there having established it is running on a Windows machine)? Sorry am not on the installaton machine today can take a look at the source code soon maybe I can find the conditional statement at the root of this myself. Thanks!
 [2008-03-04 04:11 UTC] felixtherat (Clancy Hood)
OK, lines 54-58 of pearfrontendweb.php read: <code> if (OS_WINDOWS) { $conf_name = 'pear.ini'; } else { $conf_name = 'pear.conf'; } </code> However, the sever doles out pear.conf to XP users (at least twice to me anyway), and it works fine once you've told PEAR what to look for, so surely no need for different config filename (don't they even have the same content? In any case a pear install on windows can parse a conf file just as well as an ini, so why bother with this distinction?). So solution would be to a) use same filename/type for both OS or b) look for one file, then the other if unfound, regardless of OS, which renders the two different filetypes pointless, or c) ensure windows users are served the ini file when installing from go-pear, which again seems like an unnecessary complication Like I mention above, this is only to make an otherwise very elegant process work (i.e. not die after windows install). I think it's worth fixing. Cheers :-)