Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty (or actually PHP) with Apache2/Fedora

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
mniskanen
Smarty Rookie


Joined: 26 Apr 2003
Posts: 20
Location: Lieksa,Finland

PostPosted: Sun Sep 18, 2005 5:28 pm    Post subject: Smarty (or actually PHP) with Apache2/Fedora Reply with quote

I did a fresh test install of Fedora Core 4 to one of my old computers just
to test Apache 2. What followed was a true mess.

At first everything went just fine and I moved one of my project to the
server because it was faster than my main server (FreeBSD/Apache13).
Then mains power went down and I had to reboot the beast. This is
where the trouble started

Smarty only could write two compiled templates to "templates_c". I removed all
files from there and after that it could not write one single byte. I changed
templates_c to /tmp/templates_c giving all possible permissions. Nothing
helped (or actually did help, from time to time. The more I tried to trick
permissions the less Smarty could do and finally it could not even READ the source
templates!!! I also wrote a small log test PHP application without Smarty
and It could not write to its directory, either. Then, after maybe five Apache
restarts everything went smoothly again WITH THE ORIGINAL SETTINGS.
No changes in ownerships or permissions. Everything is now
exactly the way it used to be!

This is a clear evidence about the instability of Apache 2 and I will
certainly install 1.3 as soon as possible. We have written more than 150
Smarty applications so far not seen anything like this before.

Markku
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Sun Sep 18, 2005 6:27 pm    Post subject: Reply with quote

Are you certain this is a problem of Apache2? Did you use prefork? May it have been a problem with SELinux instead? I am having good success with Apache2 on Debian.
Back to top
View user's profile Send private message
mniskanen
Smarty Rookie


Joined: 26 Apr 2003
Posts: 20
Location: Lieksa,Finland

PostPosted: Sun Sep 18, 2005 7:48 pm    Post subject: Reply with quote

boots wrote:
Are you certain this is a problem of Apache2? Did you use prefork? May it have been a problem with SELinux instead? I am having good success with Apache2 on Debian.


Well getting a bit off topic...
To be totally honest I have no idea what "prefork" means, I only used the
standard installation that came with Fedora. So far I have done my own
compilation of the 1.3 series and just wanted to see if everything goes
well 'out of the box'. It did not. As for the default Fedora PHP configuration,
it is far from satisfactory and needs a recompilation as well.

As for Smarty the whole thing was darn difficult to debug and I still have
no idea where the problem really was. Nothing in the logs reveals anything
about the possible cause.

Well, whatever it was, it truly broke my confidence in Fedora. The more "user friendly"
these beast are built the more badly they seem to behave. A month a go
an 'out-of-the-box' Ubuntu installation and a hangup in X destroyed
one of my NTFS partitions. Needless to say I feel much more
at home with the "do-it-yourself" distributions.

As for "SELinux"... well... I did use that installation option only to see that
the "Security Level" applet refuses to run... sigh... no idea, though, what
this applet should do. All in all this is what I remember having seen in
Windows 3.0 and Windows ME. Very, very bad programming indeed.

Well... back to something more stable. As for Debian I am not too sure as
the Sun Java support is pretty close to none or am I incorrect?

Markku
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Sun Sep 18, 2005 9:42 pm    Post subject: Reply with quote

Hi again. I'll continue the OT just this once Wink

mniskanen wrote:
To be totally honest I have no idea what "prefork" means, I only used the standard installation that came with Fedora. So far I have done my own compilation of the 1.3 series and just wanted to see if everything goes well 'out of the box'. It did not. As for the default Fedora PHP configuration, it is far from satisfactory and needs a recompilation as well.


I haven't looked at Fedora in a long time but Apache2 supports several different processing modules, "prefork" being one of them. It is essentially the same per process model that Apache 1.3 uses as opposed to the threaded model which, AFAIK, isn't recommended for PHP use. I have no idea what the default model is in Fedora.

mniskanen wrote:
A month a go an 'out-of-the-box' Ubuntu installation and a hangup in X destroyed one of my NTFS partitions. Needless to say I feel much more at home with the "do-it-yourself" distributions.


Ouch. Again, I have had much better luck but I long ago ditched all of my NTFS partitions and rely on Wine for the few windows apps I sometimes need. In fact, I recently upgraded to breezy (which is still beta) and despite a few relatively easy to correct glitches have no problems to speak of. *shrug* I guess I'll count my lucky stars Smile

mniskanen wrote:
As for "SELinux"... well... I did use that installation option only to see that the "Security Level" applet refuses to run... sigh... no idea, though, what this applet should do. All in all this is what I remember having seen in Windows 3.0 and Windows ME. Very, very bad programming indeed.


I'm staying away from SELinux until it matures and even then I'm not too sure. Owner / Group / World security works just fine for me.

mniskanen wrote:
Well... back to something more stable. As for Debian I am not too sure as the Sun Java support is pretty close to none or am I incorrect?


I must be getting old because I'm tired of maintaining my own DIY distro for my desktop and have gotten comfortable with Ubuntu. Java support is quite possible and with various ports available. FWIW, I have Sun's 1.5 installed. Technically, it is not considered "Free" software so you have to do a little bit of manual work, but nothing worth mentioning. Considering your experiences, I have to add that YMMV Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP