[PlugIn] PHP Version selector FREE!

It's more than obviously, that the archive is either corrupted, or downloaded partly.
Try to download it manually.
 
did that and no luck either

downloaded it manually, and uploaded to server to proper directory

/usr/local/directadmin/plugins

I went into the scripts directory

tried to run install.sh but that says: gives error

install.sh: Command not found.
 
manual install

OK, I opened install.sh on editor

ran following commands manually from it:
chmod 777 /usr/local/directadmin/plugins/phpvs/data
seems ok, no messages

chmod -R 777 /usr/local/directadmin/plugins/phpvs/data/
seesm ok, no messages

chown diradmin:diradmin /usr/local/directadmin/plugins/phpvs -R
error message: chown: -R: No such file or directory
 
Run instead

Code:
chown -R diradmin:diradmin /usr/local/directadmin/plugins/phpvs

P.S. It's Directadmin's forum, not Linux for beginners ;)
 
then tried this:

chown -R diradmin:diradmin /usr/local/directadmin/plugins/phpvs
that gave no errors, but it still does not work

In DA I see the plugin PHP version selector, but when I try to go in it says:

Unable to execute your request

Details

The requested file does not have read or execute permissions


I know I am a freebsd beginner, I have a sysadmin whom I asked to get into it, but they seem to busy so I opened a book on freebsd myself and had a go. Thanks zEitEr!



Thanks for helping out
 
Last edited:
Do

Code:
        chmod 755 /usr/local/directadmin/plugins/phpvs/user/*
        chmod 755 /usr/local/directadmin/plugins/phpvs/reseller/*
        chmod 755 /usr/local/directadmin/plugins/phpvs/admin/*
        chown -R diradmin:diradmin /usr/local/directadmin/plugins/phpvs/
 
thanks, getting there

all lines work but this one:

chmod 755 /usr/local/directadmin/plugins/phpvs/reseller/*
that gives error: chmod: No match.

I checked and see there was no directory reseller, so I made that, but it needs a index.html in that directory I think and I ran a compare on index.html from user and admin directories, but they are very different, so I would not know which one to use for the reseller directory.

Apart from that it all seems to work.

zEitEr, thanks for helping a freebsd dummy out :D
 
Ignore it, that plugin is not for resellers...
Delete that directory, you've created (/usr/local/directadmin/plugins/phpvs/reseller/)
 
I would agree with this, not all of us are "seasoned" linux guru's and everyone had to start somewhere, this learning curve isnt overnight and I have learned alot since I started but not nearly enough to do all that I would like.
lot of people asking for PHP5, and still a lot of scripts that wont run on it, so a PHP version selector per user would be great!

PHP Selector should be a standard option in DA now as far as im concerned. If DA is going to approve custombuild and even encourage its use as per the knowledgebase they should provide a way to select which version of php you want to use from DA. Without any kinds of hack or plugin.
 
AndyII,

First, thanks for the pointer in the other thread to this one.

Second, in the past, in general, DirectAdmin hasn't added functionality once a plugin was created. is there a reason why DirectAdmin should include this rather than you just rely on the plugin?

Your input is appreciated.

Thanks.

Jeff
 
Well,
I for one am not a linux person, so getting something installed would be the hard part.
this plugin, as I understand. only writes in the .htaccess file, but if PHP 5 isnt available then what good would it be to someone like me who doesn't have the correct software to make it work.
I remember once a while back, someone wanting to install both PHP4 and PHP5 and there being a conflict of some sort. If this was included in DA then users like myself could be sure that it would work as planned without breaking the server.
I guess DA could make it a paid plugin as long as the price was good :cool:
 
DirectAdmin already offers you the ability to install both php4 and php5 using custombuild, and since customapache is deprecated, the feature will not ever be added to customapache.

On properly setup servers using custombuild to set up both php4 and php5 shouldn't cause problems; certainly adding the ability to choose between them won't make it less likely for custombuild to cause problems.

So you already have the ability to set up both on your server, using custombuild, either on a new server install or at any time in the future, and you already have the ability to install the plugin and therefore gain the ability to choose between them.

So I'm not sure what else it is you're looking for.

Jeff
 
When I'm going to a domain and hit Php versions selector plugin I'm getting: No domains found! but in the admin level it works fine.

Seems to be a safemode issue as I removed the mute from opendir and saw the worning:

Code:
Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 105 is not allowed to access /home/*****/domains/ owned by uid 1012 in /usr/local/directadmin/plugins/phpvs/user/index.html on line 11 Warning: opendir(/home/****/domains/): failed to open dir: Inappropriate ioctl for device in /usr/local/directadmin/plugins/phpvs/user/index.html on line 11
 
Last edited:
Walo, the problem with your new multi line version is this:

</FilesMatch> # phpvs v4

On some operating systems running Apache 1.3.x no characters can follow the closing </FilesMatch> otherwise it barks. Here is the error if anyone noticed it in their error_log.

/home/username/domains/domain/public_html/.htaccess: </FilesMatch> takes no arguments

So unfortunately as appealing as this plugin is I am going to have to wait on it for now.
 
Hi guys,

im having a strange problem, ive installed that way:

php_default 5
php4 cli
php5 cgi

configured the plugin to work has specified in options.conf

ive defined a user to use php4 and tryed with phpinfo() but it show he is using php5.2...

any suggestion?
 
As I've already said, edit your

/usr/local/directadmin/plugins/phpvs/data/php4cgi.txt

remove everything and add lines:

Code:
<FilesMatch "\.(inc|php|php3|php4|php5|php6|phtml|phps)$">
AddHandler x-httpd-php5 .php5
AddHandler x-httpd-php4 .inc .php .php3 .php4 .phtml
</FilesMatch>

/usr/local/directadmin/plugins/phpvs/data/php5cgi.txt

remove everything and add lines:

Code:
<FilesMatch "\.(inc|php|php3|php4|php5|php6|phtml|phps)$">
AddHandler x-httpd-php4 .php4
AddHandler x-httpd-php5 .inc .php .php3 .php5 .phtml
</FilesMatch>

In case, you use PHP as CGI (suPHP).

solved with those modifications.

walo, add them as default in next release ;)

Thanks
 
Hi,

For me it is not working, on user i have:

No domains found!

It seems that is some problem with code:

$dh=@opendir($basedir."/domains/");


while (($domain=@readdir($dh)) !== false) if (is_dir($basedir."/domains/$domain/public_html") && $domain!="..") {
echo $domain;
$domains[$x]=$domain;
$htaccess[$domain]=$_SERVER["HOME"] . "/domains/$domain/public_html/.htaccess";
$x++;

}

Somebody knows why?
 
Back
Top