Page 3 of 3
Posted: Fri Jan 12, 2007 5:44 pm
by Hokey
mgroeninger wrote:
Hokey: Is there anyway you could start at the bottom of the file and re-add lines until it stop working? That would help me find which line (or block) of code is causing you problems. Most of the code I would expect to break is at the top of the if statement, so I am hoping you can narrow it down a bit.
Hi Matt,
the weather-template isn't installed anymore, because I use the template-switcher, so there was the risk that visitors could switch to the weather-template.
Would it be possible to "mirror" my s9y-installation (on my server) so that we could avoid a downtime?
I also tried to find the point, when the template starts to stop working. I'm not sure if I understand your right. My approach was:
- deleting all lines until the template worked (by deleting all from 146 to end)
- adding the deleted lines again at the bottom by starting from top to bottom
- directly in line 147 it stops ( include dirname(__FILE__) . '/weather_test.inc.php'; )
Posted: Fri Jan 12, 2007 6:02 pm
by mgroeninger
Hokey,
- adding the deleted lines again at the bottom by starting from top to bottom
Ahh, I must have missed that... in this case I probably would have worked from bottom to top, but I think that works just as well (especially since it stopped at an included file).
Ok, to test it is up to you if you want to create a mirror install. I'm not sure what your hosting provider is like, or what they will let you do.
I'm actually thinking you should wait, though. Since your error occurred while trying to include a file and it sounded like you were having problems with other template files not being available, it might make sense for me to fix the problem YellowLed is having and then to ask you to try to upload a more finished version. Then all you would have to do is make sure all the files are uploaded, and switch the template. If it doesn't work you could remove the weather_template folder from the file system and we can look at trying to create a test environment to play with.
Does that make sense? Hopefully it would save us some work.
Posted: Fri Jan 12, 2007 6:06 pm
by Hokey
I never tried to mirror my blog so your last suggestion sounds very nice.

Posted: Fri Jan 12, 2007 8:23 pm
by yellowled
mgroeninger wrote:Actually, that is a pretty big help... It at least tells me we're not having some kind of funky php version/function problem.
Always happy to help without even noticing it
mgroeninger wrote:Can you make sure that the folder "/var/www/serendipity/templates/weather_template/lib" exists and is readable by the webserver?
It does, it is, and it contains the directories "Cache" and "Services" plus a file "Cache.php". All this is readable and writeable for the webserver. Same for everything "below that level" (i.e. the contents of the dirs and subdirs).
mgroeninger wrote:
Could you try removing the code block
[snipped]
That should print the path variable the template is trying to set the path to, which might tell us what is going on.
This is the output:
.:/usr/share/php:/usr/share/pear:/var/www/serendipity/bundled-libs/:/var/www/serendipity/bundled-libs/Smarty/libs/:/var/www/serendipity/:/var/www/serendipity/templates/weather_template/lib:
YL
Posted: Mon Jan 15, 2007 6:17 pm
by mgroeninger
*sigh* Ok, that wasn't as much help as I had hoped, because that path looks perfect.
So, it is likely to be a Pear problem, I assume. Which is a pain in the butt to troubleshoot.
Could you try changing the $new_include line to this:
Code: Select all
$new_include = dirname(__FILE__)."/lib".PATH_SEPARATOR.$old_include;
It will move the templates path to the beginning of the list, meaning those libraries should be found first (this isn't really a fix, it would just check to see if you have a library in PEAR which is incompatible with the template).
Also, it might be worth seeing what happens if you remove line 162 through 207, but leave the rest of the file intact.
Sorry this is taking so long.
Posted: Tue Jan 16, 2007 1:41 am
by yellowled
mgroeninger wrote:It will move the templates path to the beginning of the list, meaning those libraries should be found first (this isn't really a fix, it would just check to see if you have a library in PEAR which is incompatible with the template).
No output, no source code for the blog, no plugin config page.
mgroeninger wrote:Also, it might be worth seeing what happens if you remove line 162 through 207, but leave the rest of the file intact.
If I do this and keep the original $new_include-line, everything looks fine - I can't really test this any further, it's
very late once again. Same with the new line from your last post. Sorry to be so brief, but I really need some sleep
YL
Posted: Wed Jan 17, 2007 2:17 am
by mgroeninger
Thanks for testing this for as long/far as you have. Please don't hurt yourself trying to test it, though.
Ok, I am a little stumped at this point, honestly. The problem must be a problem with the PEAR libraries, but I don't have any idea why the methods I used work for core, but not for the template.
Do you have either PEAR weather or PEAR Cache installed in your PEAR base?
Posted: Wed Jan 17, 2007 9:16 am
by Hokey
Maybe this could be a hint, but I'm not sure: Sometimes, when my blog loads very slow, I can still see the colour scheme of the weather-template for a moment, before the correct template is loaded. I can't reproduce this or make a screenshot, because it's gone too fast and it happens only sometimes, but maybe this information may help...
Posted: Wed Jan 17, 2007 1:15 pm
by yellowled
mgroeninger wrote:Thanks for testing this for as long/far as you have. Please don't hurt yourself trying to test it, though.
I was fine testing it. However, writing the forum post ...
mgroeninger wrote:Do you have either PEAR weather or PEAR Cache installed in your PEAR base?
Uhm ... should those be bundled with s9y or should they be installed on my machine? If it's the latter, I have to admit I don't have PEAR installed at all, which I didn't even notice until just now
Edit: I'm installing PEAR on my machine right now. In order to speed this up a little: Can you tell me how to find out if either of those is included? This is an area of PHP where I'm truly lost ...
YL
Posted: Mon Jan 22, 2007 5:08 pm
by mgroeninger
*sigh* I probably sent you on a wild goose chase... And sorry I didn't get back to this sooner.
If you didn't have PEAR installed then you wont have the Cache or Weather things installed. I don't believe they are part of the default package.
I'm baffled by this. Can you post your OS/php version/webserver, etc again?
I should have a new workstation in a few weeks and it will have enough room on it for me to start using some virtualization to test setups... I'll try to recreate your set up and see what is going on.
At this point I can only assume there is a problem somewhere in the PEAR libraries I include. Since those are pretty much a requirement to get the template working, that is a big problem. And since it causes the blank screens that means I can't just test for an error condition and stop the template if there is a problem.
Sorry about this.
Posted: Mon Jan 22, 2007 6:47 pm
by yellowled
mgroeninger wrote:*sigh* I probably sent you on a wild goose chase... And sorry I didn't get back to this sooner.
No problem
mgroeninger wrote:I'm baffled by this. Can you post your OS/php version/webserver, etc again?
Later, yes. Once again, I'm not at home, I have no access to my test machine. It's a Debian Sarge desktop machine running Apache2 and PHP5, but I don't remember the exact version numbers. I'll have them tomorrow, at the latest.
mgroeninger wrote:Sorry about this.
I remember Carl mentioning this should be the code base for a new default template. Judging from the experience with the One True Layout, those simply seem to be cursed somehow ...
YL
Posted: Mon Jan 22, 2007 7:37 pm
by carl_galloway
I remember Carl mentioning this should be the code base for a new default template. Judging from the experience with the One True Layout, those simply seem to be cursed somehow ...

we do seem to be doomed don't we?
But the actual template files for the weather template are quite robust, and if I stripped out all the weather code it would most likely work for all v1.1 users, and could easily form the basis of a default template if that was what users wanted.
The problem as Matt says is in the weather code, I can prove it by shoving Matt's weather code into any template including the older tables based templates, and they would then stop working for the same people who have problems with the weather template.
Matt, I think you've done a great job making this work as much as you have, and its a shame the pear module is letting you down because all the rest of your coding has been first-rate. Please don't give up, I'd really like to see this template get fully released.
Posted: Tue Jan 23, 2007 2:47 pm
by yellowled
YellowLed wrote:Later, yes. Once again, I'm not at home, I have no access to my test machine. It's a Debian Sarge desktop machine running Apache2 and PHP5, but I don't remember the exact version numbers. I'll have them tomorrow, at the latest.
Okay, here we go:
This is a Debian 3.1 (Codename Sarge) desktop machine. The current Apache version is 2.0.54, current PHP is 5.2.0 (for the Debianites wondering: yes, it's a backport), and since I have figured out how to check the installed PEAR packages in the meantime, no, it doesn't have the Cache or Weather things.
YL