apache.apache - suPHP - DirectAdmin & installatron

spirit

Verified User
Joined
Nov 27, 2004
Messages
195
Location
Germany - Bremen
Hi,

We experience problems as discussed in the following: thread.

As a result of the information we collected in forums we decided to give suPHP a try, however we also have Installatron available to our customers, and this plugin of DirectAdmin does not work with suPHP, we seem to have run out of options.. See link for details.

Are there more experiences and/or solutions regarding to this combination of factors?

Any comment of advice would be appreciated!!

TIA.

Spirit.
 
I am facing the same problem.

Clients are unhappy about not being able to edit the files they upload via http-forms as they are automaticly chowned apache.apache.

@Spirit:
Running PHP as CGI would also solve this issue, but it's having too much disadvantages (slow, insecure) and like almost no advantages.
 
DennisCitus said:
I am facing the same problem.

Clients are unhappy about not being able to edit the files they upload via http-forms as they are automaticly chowned apache.apache.
You can CHMOD the files from within the script to 666. Only the script that handles the file upload can do this, right after writing the file. Just make sure you put rigid constraints on which MIME types and file extensions you allow; I generally only use that stuff for image uploads.
 
The only solution is suPHP John-DirectAdmin says

I asked for more info about this:
I've honestly never used/installed suPHP, but if we were ever to implment something to address the issue, I'd say we'd very likely use suPHP.

Php under cgi isn't great becaus it has to run the php binary which is another file-read hit, slowing down requests.

Php as apache module is what we currently use, but as you know the apache:apache issue will pose it's quirks ;)

Thank you,

-----
So now I am looking at www.suphp.org and more information about it :)

roel said:
You can CHMOD the files from within the script to 666. Only the script that handles the file upload can do this, right after writing the file. Just make sure you put rigid constraints on which MIME types and file extensions you allow; I generally only use that stuff for image uploads.
Not using FTP. The FTP user 'user' has to right to edit files from user 'apache'. Chmodding makes no difference.

Your other comments are not related to the issue really.
 
DennisCitus said:
I am facing the same problem.

Clients are unhappy about not being able to edit the files they upload via http-forms as they are automaticly chowned apache.apache.

@Spirit:
Running PHP as CGI would also solve this issue, but it's having too much disadvantages (slow, insecure) and like almost no advantages.

using suPHP, you have to run PHP in cgi mode:

from www.suphp.org
Why do my scripts not work and why do I get an "Premature end of script headers" in the error_log?

You probably have installed the CLI version of PHP, but you need the CGI version. Copy the file /build/path/sapi/cgi/php to /where/ever/you/have/installed/bin/php to use the CGI version.
 
And how would you do that, because I only get internal server errors, using CLI of php.
 
Logging gives permature endings.

Where can I change the filters. Permissions are set to 755, both dir and files.
 
I've had that with CGI-scripts.

Are you compiling SuPHP to run combined with CGI now? Or just CLI-Apache-module?

And... how's ur progress? Are you still trying to get this thing working?

I think I'll try installing suPHP at my VMWare-CentOS-machine as well. Just have to get a 30-day-trial-license from DirectAdmin. :)
 
Still the same, didn't try for a week now. Here's the situation. Got php in CGI mode compiled. Copied it in /usr/local/bin/php.cgi

Compiled suphp with --with-php=/usr/local/bin/php.cgi
but that doesn't work, it uses default: /usr/bin/php

Since this is an link i've changed the link to /usr/local/bin/php.cgi instead of /usr/local/bin/php

Now it works, I can change a virtual host to suphp and test. Some things work, som e don't . Changed files to 644, but doesn't help :s, only get Internal Server Error and in the loggin: premature script endings but not with all scripts.

update until sofar :D
 
I have running my server with suPHP and also with installatron and installatron works without any problems. Could you tell me what your problems were with installatron and suPHP so I could also check for that on mine server. I tested to install a few scripts and all went fine.

Regards Fabrizio
 
Well, I have 2 php binaries I use: /usr/lcoal/bin/php and /usr/local/bin/php.cgi

suphp uses the php.cgi
When I tried a script a customer uses: vwar

www.vwar.de it works, until they use the quickmenus but then again phpBB works fine.
 
If you would like to run both, for some users suphp and others the mod_php, here are the information for configuring this.

I've now configured that all my customers use mod_php and for those who need the chowned php, I could activate it.

http://www.pookey.co.uk/php-suphp-modphp.xml

Regards
Fabrizio
 
That's how I do it to, well almost.

in httpd.conf

<IfModule mod_php4.c>
suPHP_Engine on
#AddHandler x-httpd-php .php
AddType application/x-httpd-php .inc .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
</IfModule>

and on the virtual hosts I want to use suphp I add:

AddHandler x-httpd-php .php

That works :), the only thing is those internal errors :s
 
redeye said:
That's how I do it to, well almost.

in httpd.conf

<IfModule mod_php4.c>
suPHP_Engine on
#AddHandler x-httpd-php .php
AddType application/x-httpd-php .inc .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
</IfModule>

and on the virtual hosts I want to use suphp I add:

AddHandler x-httpd-php .php

That works :), the only thing is those internal errors :s

Ok but you shouldnt have to add anything to the virtualhost entry if you use suPHP_Engine on. Mine just doesnt work, period. No errors, php works fine, it just doesnt show as running as each user, still apache.
 
Has anyone got this working with a fairly recent DA install at all?

No matter what I do or try, it does not want to work for me.

here's the synopsis of what I need to do and what is happening:

I want to leave my main user base running under mod_php (i.e. NO changes to their setups). I want one vhost alone to run under suPHP so that I can actually install and use a shoutcast control panel that needs to run under phpSuExec/chrooted php.

mod_suphp shows up under Apache 1.3.34 running modules in a phpinfo, as does Zend (which is also needed).

When I try and view ANY page under that vhost, it attempts to download the php pages, as if it's not even attempting to utilize any form of php even with the "AddHandler x-httpd-php .php" in the user's vhost settings.

httpd.conf has the following:

LoadModule suphp_module modules/mod_suphp.so
AddModule mod_suphp.c

and in the <IfModule mod_php4.c> I have "suPHP_Engine on"

I've followed the how-to's on compile suphp and such and I'm at a real loss.

Anyone that's got this type of setup running and chrooted as the vhost user, I'd really love to hear, see how you've done it.
 
Back
Top