Firefox PHP

Template: Basic Blog

Posted by fmon 
Re: Template: Basic Blog
August 21, 2008 10:26AM
Interesting. These files are being written to the /tmp directory of the VPS I'm using, not the domain. I'll check that out later.

I've edited /phorum/include/admin/cache.php and changed the path to "./cache", chmod'd the permissions to 777, and deleted the .htaccess file that contained "deny all".

Makes no difference. Is this setting elsewhere?
Re: Template: Basic Blog
August 21, 2008 10:31AM
Do NOT delete that .htaccess. Why did you do that? Put it back. The server needs to read files from that directory. Web access is not needed.

Do NOT edit /phorum/include/admin/cache.php. Why did you do that? Settings are done through the admin interface, not by hacking files. Go to your admin interface -> Cache settings in your web browser and change the path there.

The /tmp directory is standard. It's a directory in the server's root directory. It is the standard place to store temp files on a UNIX system. If you are able to access that /tmp on your VPS, then there's no direct need to change the cache directory. You can go back to where we started.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Template: Basic Blog
August 21, 2008 10:49AM
That's weird. I posted a reply and it went poof.

Anyways, the /tmp it is using is the root of the vps I'm on, not the domain. I'll worry about that later.

I deleted all of the tpl_ files from that directory.

I made the "./cache" change in the file include/admin/cache.php.

I chmod'd phorum/cache to 777 and deleted the .hataccess file that contaned "deny all users".

Still get the same error message and the files are back to writing to the vps root /tmp.

Any ideas?
Re: Template: Basic Blog
August 21, 2008 10:51AM
Yes, see my previous reply to your reply that apparently didn't poof after all.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Template: Basic Blog
August 21, 2008 11:06AM
Yeah, I see that. Strange. Not my day.

Okay, I've restored it back to the original config and changed the cache setting in the admin panel to ./cache. The files are now writing to that directory.

And I have the same problem. If I change anything at all in the header file, I get the error. If I restore the original header file, it works fine.

I'm using php 5.2.6 with apache2handler and mysql 5.0.51a.

I'll play around, if I can't figure it out, I'll move on. Speedy board, I hope to get it working.
Re: Template: Basic Blog
August 21, 2008 12:20PM
So, go back to my first suggestion.
The error message tells you what file is causing the warning.
What does the start of that file look like?

I only wanted you to change to ./cache, because you said you could not access /tmp.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Template: Basic Blog
August 21, 2008 01:12PM
First 5 lines:

Quote

<?php if(!defined("PHORUM")) return; ?>
<?php $PHORUM['LOOPSTACK'] = array() ?>
<?php if (((isset($PHORUM['DATA']['CHARSET']) && !empty($PHORUM['DATA']['CHARSET'])))) { ?>

<?php header("Content-Type: text/html; charset=".htmlspecialchars($PHORUM['DATA']['CHARSET'])); ?>
<?php echo '<?' ?>xml version="1.0" encoding="<?php echo $PHORUM['DATA']['CHARSET'] ?>"<?php echo '?>' ?>
Re: Template: Basic Blog
August 21, 2008 03:35PM
There is not supposed to be any white space in those lines.

My guess is that you are using an editor that writes out a UTF-8 byte order marker (BOM) at the start of the file. This BOM might disturb the code. Check your editor if this is the case and if you can save the file without BOM.

If this is the problem, then something weird is going on. In the latest 5.2.8 code, the templates engine should strip these byte order markers from the input file. But I have to check, since I cannot explain the empty line that you are showing.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Template: Basic Blog
August 22, 2008 11:44AM
That must have been the problem. I was using the editor from WinSCP for quick edits. I opened the original in Dreamweaver and changed the text and it works.

Strange, I've never had that problem before.

Anyways, thanks.
Re: Template: Basic Blog
August 23, 2008 04:32PM
Got it to work, now to make it 'work'. Used an old domain name I had doing nothing. If I can get a look and feel that I like, I'll move it to a production site.

Thanks for the outline.
Sorry, only registered users may post in this forum.

Click here to login