Re: Maia Guard and Freebsd 12. Problems with PHP..ini
jjs - mainphrame <[email protected]>
| Newsgroups | gmane.mail.virus.maiamailguard |
|---|---|
| Message-ID | <CABkzw7yALA=uO2M2Std1LLHQ+ka-youkUv4KZJmsO+aXC793pw@mail.gmail.com> |
Interesting data point. Not sure why FreeBSD would be different - maybe something about the php build? On the Linux side, centos 6,7,8, Debian 10, and Ubuntu 18.04 & 20.04 all prefer smarty 2. jake On Wed, Apr 22, 2020 at 1:11 PM Janky Jay, III <[email protected]> wrote: > That is interesting. I just checked both the stats page and the > unconfirmed non-spam just to be sure and they both work as expected on my > Maia server using Smarty3. Certainly has me curious. > > Regards, > Janky Jay, III > > On 4/22/20 2:04 PM, jjs - mainphrame wrote: > > Thanks for the explanation. > > As for the smarty 2 vs smarty 3 question, it's interesting if you're > seeing no difference between them on FreeBSD. > > What I've found is that with Smarty 3, configtest.php works fine, and I > can log into maia and some things work. > > But I can see 2 things right off that bat, that break when I swap smarty 2 > for smarty3: > > 1. Accessing stats.php results in server error > [Wed Apr 22 12:57:40.780994 2020] [php7:error] [pid 14744] [client > 192.168.111.139:34542] PHP Fatal error: Uncaught --> Smarty Compiler: > Syntax error in template > "file:/var/www/html/maia/themes/desert_sand/templates/stats.tpl" on line > 65 "{$lang.text_efficiency} {$eff_pct*100|string_format:"%.2f"}%" unknown > modifier 'string_format' <-- \n thrown in > /usr/share/php/smarty-3.1.34/sysplugins/smarty_internal_templatecompilerbase.php > on line 65, referer: http://maiatest.mainphrame.net/maia/welcome.ph > > 2. Clicking on unconfirmed non-spam results in server error > 192.168.111.139 - - [22/Apr/2020:12:55:44 -0700] "GET > /maia/list-cache.php?cache_type=ham HTTP/1.1" 500 394 " > http://maiatest.mainphrame.net/maia/welcome.php" "Mozilla/5 > .0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) > Chrome/80.0.3987.163 Safari/537.36" > > Switching back to smarty2 fixes everything. > > YMMV of course, > > Jake > > On Wed, Apr 22, 2020 at 12:32 PM Janky Jay, III <[email protected]> wrote: > >> I'll take a crack at making this a little less confusing. >> >> The php.ini entry: >> The entry in the php.ini file is telling PHP what it can access when it's >> called. So, the entry that you have of "include_path = >> "/usr/local/share/pear:/usr/local/share/smarty3-php72” is telling PHP that >> it is allowed to access both the /usr/local/share/pear and the >> /usr/local/share/smarty3-php72 directories. So, when your HTTP server >> starts a PHP process, it can access the pear and smarty data. >> >> The Maia Smarty directory: >> The directory that Maia expects to exist for smarty is located in the >> Maia web base directory (likely /usr/local/www/maia if installed using the >> port/pkg) under "libs/Smarty" (So, the full path would be >> /usr/local/www/maia/libs/Smarty). This directory *MUST* be named "Smarty" >> (not "smarty" or "Smarty2", etc...). If this directory does not exist, Maia >> will choke. The FreeBSD port automatically creates a symbolic link from >> /usr/local/www/maia/libs/Smarty to /usr/local/share/smarty3-php72. With the >> php.ini entry above in place, it allows the Maia PHP code to access the >> smarty data in /usr/local/share/smarty3-php72. >> >> If you've used Smarty2 instead of Smarty3, only the symbolic link in the >> Maia web directory would need to be changed. So, >> /usr/local/www/maia/libs/Smarty would need to be symbolically linked to >> /usr/local/share/smarty instead of /usr/local/share/smarty3-php72. Also, >> just an FYI, I haven't heard of any issues with Smarty3 and Maia on >> FreeBSD. Thousands of installs running perfectly out there so you shouldn't >> *NEED* to use Smarty2 but you certainly can. >> >> I hope this helps! >> >> Regards, >> Janky Jay, III >> >> On 4/22/20 12:55 PM, Jason Hirsh wrote: >> >> OK now don’t feel so good >> >> >> Going to quit till tomorrow. I am back beyond confused >> >> >> >> >> On Apr 22, 2020, at 2:46 PM, jjs - mainphrame <[email protected]> wrote: >> >> If the directory is already named "Smarty" then there is no need for a >> symbolic link. >> >> The symlink would have been needed if the directory was named "smarty", "smarty3-php72" >> or anything other than "Smarty" >> >> What does configtest,php say now? >> >> jake >> >> On Wed, Apr 22, 2020 at 11:42 AM Jason Hirsh <[email protected]> wrote: >> >>> OK. I changed the Smarty 2 directory to Smarty since that seem easier >>> then rewriting Smarty >>> >>> (See *jjs - mainphrame <[email protected] <[email protected]>>)* >>> >>> *Changed the path to* >>> >>> include_path = "/usr/local/share/pear:/usr/local/share” >>> >>> *Lawrence Mulder <lmulder-iL7gtBVyNKCGUxFv0Br65wC/[email protected] <lmulder-iL7gtBVyNKCGUxFv0Br65wC/[email protected]>>* >>> >>> >>> Bit I am confused on the symbolic link >>> >>> >>> ln -s /usr/local/share/smarty Smarty >>> >>> *jjs - mainphrame <[email protected] <[email protected]>>* >>> >>> Shouldn’t that now be >>> >>> >>> ln -s /usr/local/share/Smarty Smarty >>> >>> >>> Thanks guys >>> >>> >>> Jason >>> >>> On Apr 22, 2020, at 2:25 PM, Lawrence Mulder <lmulder-iL7gtBVyNKCGUxFv0Br65wC/[email protected]> >>> wrote: >>> >>> Jason, >>> >>> I think what Derek is saying, is that you have the smarty directory >>> included in your include_path… it should only be the parent directory. You >>> want to find the smarty folder at that include_path, not the smarty files. >>> So, shorten your include_path to: >>> >>> include_path = "/usr/local/share/pear:/usr/local/share” >>> >>> Thanks, >>> -Larry >>> >>> *From:* Maia-users <[email protected]> *On Behalf Of *Jason >>> Hirsh >>> *Sent:* Wednesday, April 22, 2020 1:04 PM >>> *To:* Derek Atkins <[email protected]> >>> *Cc:* Maia-Users Mailing List <[email protected]> >>> *Subject:* Re: [Maia-users] Maia Guard and Freebsd 12. Problems with >>> PHP..ini >>> >>> Doesn’t this do that ?? >>> >>> >>> include_path = "/usr/local/share/pear:/usr/local/share/smarty” >>> >>> >>> Jason >>> >>> >>> On Apr 22, 2020, at 2:00 PM, Derek Atkins <[email protected]> wrote: >>> >>> Add /usr/local/share to the list so that smarty/Smarty.php can be found. >>> >>> -derek >>> Sent using my mobile device. Please excuse any typos. >>> >>> >>> On April 22, 2020 1:58:14 PM Jason Hirsh <[email protected]> wrote: >>> >>> OK Appreciate all the help but I am now completely confused >>> >>> >>> To recap. I down grade to Smarty 2.0 >>> >>> It is is located in /usr/local/share/smarty >>> >>> Php.ini (one and only at /usr/local/etc/php.ini) >>> >>> Has the following >>> >>> include_path = "/usr/local/share/pear:/usr/local/share/smarty" >>> >>> Configuration failed for Smart Template Engine >>> >>> There is also a comment here that says >>> >>> "here should be a symbolic link to "/usr/local/share/smarty3-php72" >>> from "libs/Smarty". For example, in my "/usr/local/www/maia/libs" >>> directory, there is a symlink that looks like "Smarty@ -> >>> /usr/local/share/smarty3-php72". “ >>> >>> I am using smarty2. And this would appear to start the issue with case >>> sensitivity again >>> >>> >>> Thought for a confused old man?? >>> Jason >>> >>> >>> On Apr 22, 2020, at 1:13 PM, jjs - mainphrame <[email protected]> >>> wrote: >>> >>> >>> From what you have written, it looks like you're very close to working, >>> There's just one thing you haven't done. >>> >>> Make sure that maia finds "Smarty/Smarty.class.php" in the path. If that >>> doesn't fix the problem, I'd be shocked. >>> >>> Jake >>> >>> >>> On Wed, Apr 22, 2020 at 10:10 AM Jason Hirsh <[email protected]> wrote: >>> >>> I have made the mistake of following too many courses of action and >>> advice at once >>> >>> The maia installations is pretty much hosed. >>> >>> >>> Have to step back and look at how to recover >>> >>> >>> Jason >>> >>> >>> On Apr 22, 2020, at 12:03 PM, jjs - mainphrame <[email protected]> >>> wrote: >>> >>> 'smarty" won't work. I just did a quick test on my local maia server. >>> >>> This works: >>> >>> # ll /usr/share/php/ >>> >>> lrwxrwxrwx. 1 root root 8 Apr 22 09:00 Smarty -> Smarty2/ >>> drwxr-xr-x. 4 root root 4096 Mar 22 11:41 Smarty2 >>> >>> This fails: >>> >>> # ll /usr/share/php/ >>> >>> lrwxrwxrwx. 1 root root 8 Apr 22 09:00 smarty -> Smarty2/ >>> drwxr-xr-x. 4 root root 4096 Mar 22 11:41 Smarty2 >>> >>> On Wed, Apr 22, 2020 at 8:49 AM Jason Hirsh <[email protected]> wrote: >>> >>> The directory is lower case “smarty” >>> >>> The file is Uppercase. “Smarty.class.php” >>> >>> Jason >>> >>> >>> On Apr 22, 2020, at 11:43 AM, jjs - mainphrame <[email protected]> >>> wrote: >>> >>> Keep in mind that it's case sensitive. "smarty" != "Smarty" >>> >>> Jake >>> >>> On Wed, Apr 22, 2020 at 8:40 AM Jason Hirsh <[email protected]> wrote: >>> >>> Jake >>> >>> Path to that on my server is " >>> /usr/local/share/smarty/Smarty.class.php" >>> >>> So I should have that covered unless the following is wrong >>> >>> include_path = "/usr/local/share/pear:/usr/local/share/smarty" >>> >>> Thank again >>> >>> >>> Jason >>> >>> >>> >>> >>> On Apr 22, 2020, at 10:44 AM, jjs - mainphrame <[email protected]> >>> wrote: >>> >>> Remember, it's looking specifically for "Smarty/Smarty.class.php" (case >>> sensitive) >>> >>> Jake >>> >>> On Wed, Apr 22, 2020 at 5:50 AM Jason Hirsh <[email protected]> wrote: >>> >>> Ok. New day tried again >>> >>> Removed smarty 3 and installed smarty 2 which installed under >>> /usr/local/share/smarty >>> >>> Using include_path = "/usr/local/share/pear:/usr/local/share/smarty" >>> >>> Pear is loaded happy but no smarty according to the configtest.pl >>> >>> Can’t get any access to Smarty Mailing list or Forum >>> >>> Took me a month to get Maia installed originally now its dead after a >>> simple upgrade >>> >>> >>> Jason >>> >>> >>> >>> >>> >>> In general, I find that Smarty3 breaks maia, and I've always had to >>> install Smarty2 to get a 100% working setup. >>> >>> I've always installed Smarty under /usr/share/php. Do you have a single >>> php.ini for cli and web versions? >>> >>> Jake >>> >>> On Tue, Apr 21, 2020 at 2:37 PM Jason Hirsh <[email protected]> wrote: >>> >>> And SmartI recently upgraded my Server running Freebsd 12.1 1. PHP. >>> 7.2.29 PEAR 1.10.6 and smarty3-php72-3.1.32 >>> >>> >>> My Configuration tester says that all is OK except for smarty. I think >>> I am messing up the php.ini. include_path >>> >>> >>> My current is >>> >>> include_path = "/usr/local/share/pear:/usr/local/share/smarty3-php72” >>> >>> >>> The Maia config test is happy except for Smarty. Where it says “Failed >>> Not Installed”. The reference page has been no help >>> >>> >>> Any suggestions?? >>> >>> >>> Jason >>> _______________________________________________ >>> Maia-users mailing list >>> [email protected] >>> http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Maia-users mailing list >>> [email protected] >>> http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users >>> >>> >>> _______________________________________________ >>> Maia-users mailing list >>> [email protected] >>> http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users >>> >> >> >> _______________________________________________ >> Maia-users mailing list >> [email protected] >> http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users >> > > _______________________________________________ > Maia-users mailing list > [email protected] > http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users > _______________________________________________ Maia-users mailing list [email protected] http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users