Page 1 of 1
running other php stuff with serendipity
Posted: Wed Oct 27, 2004 2:31 pm
by Tom
Hello,
I've small problem with runnig php scripts under serendipity. I known that it happens from security reason, but...
I need to have a serendipity installed on my rootdir. There I have one directory with some scripts (usually a post method formulars) and other stuff which I need to provide for my web. Is it possible to write permission somewhere in .htacces or elsewhere? And if it is, how?

I'm beginner in mysql&php and that's why I choose serendipity. It is easy to install. I didn't expect that I need to install serendipity in subdir if I want to run other stuff on my web

Re: running other php stuff with serendipity
Posted: Wed Oct 27, 2004 5:28 pm
by garvinhicking
Well, Serendipity redirects script calls to nonexistant files to its own, so if your files exist you should easily be able to call them.
Can you point out more specific what does not work for you, with file and code examples (shortest possible, please)
You definitely are able to put other files into the same directory as serendipity...
Regards,
Garvin.
Posted: Sun Oct 31, 2004 3:48 pm
by Tom
OK I'll try
So in my rootdir (there is installed serendipity) I have dir called base, where I store some php scripts. For example php guestbook, that saves entries to the special txt file (method post, without using database). Before installation of serendipity everything had worked just fine but now script can't save anything (I don't change anything in code). I thought that something is wrong with chmod, but when I changed this atributte nothing happend.
Yes I can put files into the same directory, but they don't work too :/ I copied the script to the root dir but If I click to the button to transfering entry into txt file, as I said, there's nothing doing too.
Maybe this happens from some security reason. Only thing, that I want to known, before I'll start on gbook with using database(thats gonna kill me;), if it is possible to allow my script to working.
Posted: Tue Nov 02, 2004 10:47 am
by garvinhicking
Hi Tom!
That's really strange, the script should be able to write files without a problem! Especially if you made sure that the main directory is set to be writable by the webserver user (or 0777).
Anyways - the only thing which could cause harm is your '.htaccess' file. Temporarily edit/remove that and see, if your script starts working then.
Serendipity didn't do anything to other files, so I suspect it must be some other reason why your script stopped working...?
Regards,
Garvin.
Posted: Sun Nov 07, 2004 11:35 pm
by Tom
I removed the .htacces file and it works!

But what about security now? Isn't it problem that I haven't any file like this on my root now? Because when I looked to the .htacces file I saw there some restrictions like "deny for all" for .db files and so on...
Posted: Sun Nov 07, 2004 11:38 pm
by Tom
actually, the .htacces file was created by the serendity that's why I'm asking if I can delete this file

Posted: Mon Nov 08, 2004 10:40 am
by garvinhicking
Okay, now I understand.
Then your provider doesn't like some attribute we have in .htaccess because he's restrictive. If you set the "rewrite" directive inside Serendipity Configuration to "none" you can safely remove the .htaccess file, yes.
Regards,
Garvin.
Posted: Mon Nov 08, 2004 12:37 pm
by Tom
"rewrite" directive inside Serendipity Configuration to "none"
Does it mean that i have to disable the URL rewriting?
Thank you very much for your helping! Serendipity rulezz

Posted: Mon Nov 08, 2004 2:14 pm
by garvinhicking
If you're currently using "Apache Errordocs", then yes, you need to remove URL rewriting, because that is achieved via .htaccess. And if you remove the file, the rewriting won't work
Regards,
Garvin.