loooooooper Posted March 4, 2011 Share Posted March 4, 2011 Hello, Am a newbie using PEAR packages in my coding. I installed smarty on XAMPP recently and followed the configuration process in the 'php.ini' file, labelling the path to the '\libs\' directory. Before installation of smarty, my pear packages were working fine, never received any errors. However, after installing smarty and including my template file 'config.php' with 'Auth/HTTP.php' within the same file, i gor these errors; Warning: require_once(Auth/HTTP.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\OReilly\pear\blog\login.php on line 10 Fatal error: require_once() [function.require]: Failed opening required 'Auth/HTTP.php' (include_path='.;C:\xampp\smarty\libs') in C:\xampp\htdocs\OReilly\pear\blog\login.php on line 10 Warning: Cannot modify header information. Headers already sent by C:\xampp\htdocs\OReilly\pear\blog\login.php on line 10 Anybody got ideas what i can do to correct this issue, thanks. I have attached my templates file 'config.php' and my login script, the one that allows users to login be fore they access results to the database called 'login.php' [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/ Share on other sites More sharing options...
trq Posted March 4, 2011 Share Posted March 4, 2011 Sounds to me like you have broken your include_path within your ini file. Can we see that? Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1182732 Share on other sites More sharing options...
loooooooper Posted March 4, 2011 Author Share Posted March 4, 2011 Sounds to me like you have broken your include_path within your ini file. Can we see that? Sure, here goes; ;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; ; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" ; ; Windows: "\path1;\path2" ;include_path = ".;c:\php\includes" ; ; PHP's default setting for include_path is ".;/path/to/php/pear" ; http://php.net/include-path include_path = ".;\xampp\php\PEAR" ; Smarty path include_path = ".;C:\xampp\Smarty\libs" the last path is he link to smarty Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1182735 Share on other sites More sharing options...
Muddy_Funster Posted March 4, 2011 Share Posted March 4, 2011 I have never seen paths start with ".;" before, is this an XAMP thing? Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1182738 Share on other sites More sharing options...
loooooooper Posted March 4, 2011 Author Share Posted March 4, 2011 I have never seen paths start with ".;" before, is this an XAMP thing? Yap, I'm working with windows machine. Here's a link to the script and it worked for mehttp://estudioalegria.com/113:how-to-setup-smarty-on-xampp-and-get-it-running Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1182748 Share on other sites More sharing options...
trq Posted March 4, 2011 Share Posted March 4, 2011 You can only set the include_path directive once, you are setting it once (using invalid paths anyway) to include PEAR, then again to include smarty. You need to separate your paths by ; within one call to include_path. include_path = ".;C:\xampp\php\PEAR;C:\xampp\Smarty\libs" The first . ensures the current directory is on your path and that the include functions will work. Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1182757 Share on other sites More sharing options...
loooooooper Posted March 4, 2011 Author Share Posted March 4, 2011 Thank you sir, I have just corrected the error and this is the error message i got in the browser window; Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\OReilly\pear\blog\login.php:1) in C:\xampp\php\PEAR\Auth\HTTP.php on line 455 Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\OReilly\pear\blog\login.php:1) in C:\xampp\php\PEAR\Auth\HTTP.php on line 456 Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1182772 Share on other sites More sharing options...
trq Posted March 4, 2011 Share Posted March 4, 2011 This is the most common of errors. See http://www.phpfreaks.com/forums/index.php?topic=37442.0 Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1183054 Share on other sites More sharing options...
loooooooper Posted March 7, 2011 Author Share Posted March 7, 2011 Yes, I'd read that notification page before i posted this message, but still i get the same error message. I don't know if my problem is unique or PEAR and smarty don't go hand in hand, am lost for choice. Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1183900 Share on other sites More sharing options...
trq Posted March 7, 2011 Share Posted March 7, 2011 The error states pretty clearly that you are sending output to the browser on line 1 of your login.php page. You cannot send output to the browser and then call the header() function. This has nothing to do with either Smarty of Zend. Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1184227 Share on other sites More sharing options...
loooooooper Posted March 9, 2011 Author Share Posted March 9, 2011 Ooh yeah, think it has to do with hidden characters in my text editor that i can't see with the naked eye. So this is what i did,first, i saved the file in ANSI format and I used an output buffering function ob_start(); at the beginning of my code to remove output before the header().Well, i got this error; Fatal error: Class 'Auth_HTTP' not found in C:\xampp\htdocs\OReilly\pear\blog\login.php on line 23 Wuu, now what next? Did i solve the problem by creating another? Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1185006 Share on other sites More sharing options...
trq Posted March 9, 2011 Share Posted March 9, 2011 Have you installed the Auth_HTTP package? Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1185195 Share on other sites More sharing options...
loooooooper Posted March 10, 2011 Author Share Posted March 10, 2011 Yes, It is installed. Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1185398 Share on other sites More sharing options...
trq Posted March 10, 2011 Share Posted March 10, 2011 And within C:\xampp\php\PEAR you have a directory called Auth containing a file called HTTP.php ? Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1185408 Share on other sites More sharing options...
loooooooper Posted March 10, 2011 Author Share Posted March 10, 2011 Yes, I do 've that file in the said directory path. Quote Link to comment https://forums.phpfreaks.com/topic/229554-intergrating-smarty-and-pear-packages/#findComment-1185420 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.