ehcp 0.32 being tested, some improvements
When doing something, only changed domain files are updated, so, adding a new domain, subdomain etc.. should be much faster for persons who has many domains/files. after installing (actually just replace classapp.php, for recent versions), logout&login back (which fixes some db settings).
Added a workaround for wordpress installs, which complains of file ownership and cannot install some plugins/files automatically. With this new ehcp, some wordpress directories are automatically owned by www-data, permitting plugin upload. But I warn everybody related to wordpress, including wordpress authors. this is a (not Big) security issue. Anybody that gains control of any plugin/addon in wordpress would gain control of whole website.. because, wp-admin files are (have to be, for plugins) owned by www-data. This is caused by a (possibly I thing wrong) design choice of wordpress, in its code, file.php.
with this ehcp, any newly installed wordpress are ready to use, ready to install plugin, file permissions are (I hope) correct. I tested in 2 different places.
if you want to have same affect for your existing wordpress installs, give this command in mysql:
INSERT INTO `customsettings` (domainname,`name`,`value`,`value2`)VALUES ('yourdomain.com','fileowner','www-data:www-data','wp-content');
INSERT INTO `customsettings` (domainname,`name`,`value`,`value2`)VALUES ('yourdomain.com','fileowner','www-data:www-data','wp-admin');
assuming your wordpress is installed in root, just after httpdocs. Alternatively, you may use "Custom Permissions" as described below.
we have two changes in db: scripts table -> customfileownerships field, for adjusting custom file ownerships for some scripts/programs, such as wordpress.
customsettings table: value2 field added, for preserving custom file ownerships for individual domains. These values are executed when sync'ing a domain to filesystem. Currently, when you install wordpress to a domain, a row for adjusting permissions is automatically added to customsettings table, making wordpress work right. As I said before, this is not a perfect solution, just a workaround for wordpress installations.
A new link added in sky template, domain homepage, bottom, advanced section -> "Custom File Permissions", where you can see/add new custom file permissions. Use this with caution. You can see it after you select a domain.
To sync all domains forcingly, in old way, use ehcp->options->syncdomains (this may be time consuming if you have many domains/files, many=tens of thousands of files)
Comments
Thank You
I wish say thank you for that. The EHCP is now really great! Thanky again.
Does it work with 12.04?
Does it work out of the box with 12.04?
Translation
Hi. What about move phrases into language/*.php for better translation? Sorry if my post is not uptodate, I'm using 0.30.6 version
Source Forge Download Link
Could you please add this test version to the sourceforge page? Download is always corrupt for me when downloading from ehcp.net.
~
Thanks
OwN
After upgrading, I get this
After upgrading, I get this error when trying to login to the panel:
Fatal error: Unknown: Failed opening required '/var/www/new/ehcp/index.php' (include_path='.:/usr/share/php:/var/www/new/phpmailer') in Unknown on line 0
~
Thanks
OwN
how did you copy files to
how did you copy files to your server ? it seems like a file permission issue.
check perm of file&dirs.
chmod a+rx /var/www/new/ehcp/
chmod a+r /var/www/new/ehcp/*
cd /var/www/new/ehcp/
find ./ -type d -exec chmod a+rx {} \;
these will fix some permissions.
I'll give that a shot, but I
I'll give that a shot, but I installed it the same way I always install it. Stop the EHCP daemon, stop Apache2 daemon, copy new files into the EHCP directory but keep the config file, restart EHCP daemon, and restart Apache2 daemon. I had to revert to the older version which I believe has the same permissions that the new files have. I will try this though and get back to you with results tonight.
~
Thanks
OwN
This worked:
This worked:
sudo chmod a+rx /var/www/new/ehcp/
sudo chmod -R a+r /var/www/new/ehcp/
cd /var/www/new/ehcp/
sudo find ./ -type d -exec chmod a+rx {} \;
Were there new permissions settings added to this version? I never had to do this with previous EHCP versions.
~
Thanks
OwN
Now I get this error:
Now I get this error:
apache2: Syntax error on line 231 of /etc/apache2/apache2.conf: Syntax error on line 30 of /var/www/new/ehcp/apachehcp_subdomains.conf: Could not open configuration file /etc/apache2/fastcgi_params;: No such file or directory
I had to revert back again. Also, I noticed that the ehcp daemon in version 0.32 while I had it running wrote default index.php pages for websites even if they already had an index.htm or index.html file. I thought this was fixed in earlier versions?
~
Thanks
OwN
no permissions changed. your
no permissions changed. your perm issue may occur if you put those files using some other file transfer program (maybe I made a mistake while packaging, will check)
about that error: empty that file.
it seems that file left from nginx, while you switched to apache.
I now repackaged and uploaded to http://ehcp.net/ehcp_yeni.tgz
Thanks, this time I did not
Thanks, this time I did not have any permissions issues. However, I ran into a series of other problems which I corrected. Here are some of the errors I ran into:
apache2: Syntax error on line 231 of /etc/apache2/apache2.conf: Syntax error on line 30 of /var/www/new/ehcp/apachehcp_subdomains.conf: Could not open configuration file /etc/apache2/fastcgi_params;: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
eric@eric-Micro:~$ sudo service apache2 restart
* Restarting web server apache2 ... waiting [ OK ]
eric@eric-Micro:~$ sudo service apache2 restart
* Restarting web server apache2 ... waiting [ OK ]
eric@eric-Micro:~$ sudo service apache2 restart
Syntax error on line 4 of /var/www/new/ehcp/apachehcp_subdomains.conf:
Invalid command 'server', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
Every time, I told EHCP to sync my domains, it would recreate the apachehcp_subdomains.conf with errors. As such, I suspected the apache_subdomain_template had errors. I was right. It is really messed up and totally wrong. I had to revert the contents in this file back to version 0.31 as it would not work.
This is what was included in the latest version for apache_subdomain_template:
# this file used in Easy Hosting Control Panel (ehcp), www.ehcp.net
# webserver config file for nginx webserver
server {
listen 80;
server_name {subdomain}.{domainname} www.{subdomain}.{domainname};
access_log {homedir}/logs/access_log;
error_log {homedir}/logs/error_log;
access_log /var/log/apache_common_access_log;
location / {
root {homedir};
index index.html index.htm index.php;
}
## Images and static content is treated different
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml|swf)$ {
access_log off;
expires 30d;
root {homedir};
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME {homedir}$fastcgi_script_name;
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/tmp:/usr/share/php:/usr/share/pear";
include fastcgi_params;
}
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
deny all;
}
}
Here's what I had to set it to in order for EHCP to work:
#____________start of {subdomain}.{domainname}__paneluser:{panelusername}_reseller:{reseller}_id:{id}____________
# this file used in Easy Hosting Control Panel (ehcp), www.ehcp.net
ServerName {subdomain}.{domainname}
ServerAlias www.{subdomain}.{domainname}
UseCanonicalName Off
DocumentRoot {homedir}
#CustomLog {homedir}/logs/access_log combined # homedir yerine, domainhomedir gibi bisey olmali...
CustomLog /var/log/apache_common_access_log combined
php_admin_value open_basedir {homedir}
php_admin_value upload_tmp_dir {homedir}/phptmpdir
php_admin_value session.save_path {homedir}/phptmpdir
{customsubdomainhttp}
Also, once again, the EHCP daemon wrote default index.php pages for all vhosts if the index.php file did not already exist (the under construction page). However, some of my sites only use index.htm or index.html. By default, index.php loads before .htm and .html which means my established websites showed the under construction page rather than the REAL index page. The EHCP Daemon should never create a blank index.php file unless a NEW vhosts entry is created for a new site or a domain is added to the panel for the first time. And only if INDEX.HTML, INDEX.PHP, and INDEX.HTM DO NOT EXIST
This is probably a really small change, but it's really annoying. I thought this was fixed some time ago, and I think it was, but the problem is here again in 0.32.
I am using Ubuntu 11.10, and I've never used nor had nginx installed on my machine. Apache only.
~
Thanks
OwN
that is testing version,
that is testing version,
so, we may live some issues,
will solve as we progress, I hope.
subdomain template fixed now,
fixed index.php issue too.
domain synchronization was updated to help people with hundreds or even thousands of domains, so, some new issues are arising as you live. sory.
I uploaded new changes to http://ehcp.net/ehcp_yeni.tgz
Also keep in mind that, all new versions, new files may contain new bugs..they may not be so stable. we cannot test all files each time we are releasing to persons like you, who want to test/use newer versions.
Yes, I understand. I
Yes, I understand. I apologize if I came off sounding ungrateful. There are no alternatives to EHCP, as it's simply the best! I'm here as a tester, and I look forward to helping steer EHCP in the right direction. Thanks for giving me the opportunity to test. I will be testing additional functions and will post my results. Again, we really appreciate what you are doing for the community and what EHCP will become in the near future! Keep up the great work. I'll be testing ;)
~
Thanks
OwN
One note on latest
One note on latest improvements: in past,ehcp used to sync all domains. this was something time-wasting, in the order of a few 10 seconds,or 1-2 minute, when some ehcp admins has hundreds or even thousands of domains. ı upadated domain sync part since 0.30 or 0.31, dont remember which, as to sync only affected/newly added domains. So, this is better, but we are just testing new functionalities.. thank you alot for doing testing. ehcp is living with all its contributors. we cannot survive without any help.
Sync domains
this is good news, but i think it maybe best to have both options for better admin control,
example: 1. sync newer/non-synced domains
2. sync all domains
PHP still fails to chmod
PHP still fails to chmod files even though I changed the vsftpd settings to have all files 775 when uploaded?
Also, I will be testing the backup functionality of 0.32 soon. Do you have an updated 0.32 that fixes the index.php file being written?
~
Thanks
OwN
Here's a test I ran:
Here's a test I ran:
<?php
$f = 'test.txt';
if(file_exists($f) && is_file($f)){
$success = chmod($f,777);
if($success){
echo "$f successfully chmodded to 777";
}else{
echo "Failed to chmod file $f";
}
}else{
echo "File $f does not exist!";
}
?>
~
Thanks
OwN
Also, if you add a domain
Also, if you add a domain name to your account, play around with certain panel features, or try to add easy install scripts (which don't work), the panel goes offline for some reason. Not sure why. I'll try to look at logs. For now, I'm downgrading back to 0.31
~
Thanks
OwN
Apparently, the restart call
Apparently, the restart call for apache2 after adding a domain from the EHCP daemon is too fast? After adding a domain to my account, my webserver went down, as apache crashed when the restart command was called:
I got this error in the log:
[Fri Oct 26 21:28:33 2012] [notice] Graceful restart requested, doing restart
apache2: Syntax error on line 234 of /etc/apache2/apache2.conf: Syntax error on line 5387 of /var/www/new/ehcp/apachehcp.conf: directive missing closing '>'
However, I then restarted apache2 manually myself, and I'm not getting that error, and the syntax is right. It must have been writing to the file when the restart was called?
~
Thanks
OwN