Posts by tilicar
-
-
Please take my apologize and sorry for all my bad post's .
I look into my imscp.conf and guess what ? DEBUG = 1 .
I look into IMSCP v 1.2.2 and 1.2.8 files and try to make difference betwen them.
My problem with the installer file is in the syntax:
I try to find "CMD_PHP" in the IMSCP files into version 1.2.2, and look into the 1.2.8 version and see what was the change !
After that i try to remake the installer file in different mod.My problem with the application installer is: Place the file, place the daabase, but when the script try to make encrypted password for admin, there is a problem.
I look into the database at the users tabel -> admin, and the password field is empty.
The encryption script is good, is working, but this syntax returns me empty field.PS: I'm not a developer, but I try to be one. I don't know so much programing language, but I try to understand them.
PS2: Please sorry for my English, I do my best to learn it.
PS3: I do my best to rise this platform above Cpanel and to make people happy.
PS4: I have a job, 8 hours/ day, sometime I work more then 8 hours.
PS5: If you understand me, is good, else try more. -
sorry for double post.
Problem solved.
I din't have pannel redirect plugin.Sorry !
-
i look on my logs to see if i got some, but now i got 502 Bad Gateway error in browser on client software install. (pannel/client/software.php)
Solved. Sorry. My PannelRedirect was missing from plugins.
I look in to my log files, /var/log/imscp/* and /var/log/apache2/subdomain and domain, nothing there.
-
After update to 1.2.8 when i go to customer -> Software Install (pannel/client/software.php) i get 502 Bad Gateway error in browser.
any ideea ?
-
ok I'll do my best, but please tell me what logs do you need, from where ?
-
Any dev. can take a look on script ?
I wanna make software application installer work fine.Till now any soft get install but not the database.
Please get some time to take a look.
Ceers -
Code
- [Sun Jun 21 14:23:56.077873 2015] [:error] [pid 11422] [client xx.xx.xx.xx:25988] PHP Warning: touch(): Unable to create file /var/www/virtual/site/htdocs/wp-content/uploads/make.1.6.0.tmp because Permission denied in /var/www/virtual/site/htdocs/wp-admin/includes/file.php on line 164, referer: http://site/wp-admin/theme-install.php?browse=popular
- [Sun Jun 21 14:23:56.285182 2015] [:error] [pid 11422] [client xx.xx.xx.xx:25988] PHP Warning: unlink(/var/www/virtual/site/htdocs/wp-content/uploads/make.1.6.0.tmp): No such file or directory in /var/www/virtual/site/htdocs/wp-admin/includes/file.php on line 464, referer: http://site/wp-admin/theme-install.php?browse=popular
- [Sun Jun 21 14:31:04.700851 2015] [:error] [pid 11764] [client xx.xx.xx.xx:26140] PHP Warning: touch(): Unable to create file /var/www/virtual/site/htdocs/wp-content/uploads/make.1.6.0.tmp because Permission denied in /var/www/virtual/site/htdocs/wp-admin/includes/file.php on line 164, referer: http://site/wp-admin/theme-install.php?browse=popular
- [Sun Jun 21 14:31:05.146247 2015] [:error] [pid 11764] [client xx.xx.xx.xx:26140] PHP Warning: unlink(/var/www/virtual/site/htdocs/wp-content/uploads/make.1.6.0.tmp): No such file or directory in /var/www/virtual/site/htdocs/wp-admin/includes/file.php on line 464, referer: http://site/wp-admin/theme-install.php?browse=popular
-
Hi,
till I-MSCP version 1.2.3, wordpress work perfect.
now at 1.2.6, 1.2.8 wordpress can't update theme, language, plugins, even upload photos on post.You will tell me maybe: "hey, it is a wordpress problem not I-MSCP". No it is not !
Why at version 1.2.3 work perfect and now not ?I change permission to folders at 775, 777, but i think this is not good for website security !
any ideea ?
-
ok. I replace CMD_PHP with PHP and still don't work.
Anything else ?
This is the original file for wordpress install.
PHP- #!/usr/bin/perl
- # i-MSCP a internet Multi Server Control Panel
- #
- # Copyright (C) 2010 by internet Multi Server Control Panel - http://i-mscp.net
- #
- #
- # The contents of this file are subject to the Mozilla Public License
- # Version 1.1 (the "License"); you may not use this file except in
- # compliance with the License. You may obtain a copy of the License at
- # http://www.mozilla.org/MPL/
- #
- # Software distributed under the License is distributed on an "AS IS"
- # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- # License for the specific language governing rights and limitations
- # under the License.
- #
- # The Original Code is "i-MSCP a internet Multi Server Control Panel".
- #
- # The Initial Developer of the Original Code is ispCP Team.
- # Portions created by Initial Developer are Copyright (C) 2010 by
- # i-MSCP a internet Multi Server Control Panel. All Rights Reserved.
- #
- # The i-MSCP Home Page is:
- #
- # http://i-mscp.net
- #
- use Digest::MD5 qw(md5_hex);
- use strict;
- use warnings;
- ################################################################################
- #
- # Load configuration from i-MSCP configuration file
- #
- # @return int 0 on success, negative int otherwise
- #
- sub getConf {
- my $file;
- if(-e '/usr/local/etc/imscp/imscp.conf'){
- $file = '/usr/local/etc/imscp/imscp.conf';
- } elsif(-e '/etc/imscp/imscp.conf') {
- $file = '/etc/imscp/imscp.conf';
- } else {
- return -1;
- }
- return -1 if ! open F, '<', $file;
- %main::cfg = join('', <F>) =~ /^\s*(\w+)\s*=\s*(.*)$/gm;
- close F;
- %main::cfg ? 0 : 1;
- }
- my ($sw_database_pass_clear, $sw_database_pass_md5, $sw_install_pass_clear, $sw_install_pass_md5, $sql, $url_path, $DBname, $hostname, $dbUser, $dbPassword);
- my ($processing_type,$sw_software_db,$sw_software_prefix,$sw_database,$sw_database_user,$sw_database_tmp_pwd,$sw_install_username,$sw_install_password,$sw_install_email,$domain_name,$sw_dest_path,$sw_path);
- sub extract_variables {
- my $crypted_array = shift;
- my $uncrypted_array = decode_base64($crypted_array);
- ($processing_type,$sw_software_db,$sw_software_prefix,$sw_database,$sw_database_user,$sw_database_tmp_pwd,$sw_install_username,$sw_install_password,$sw_install_email,$domain_name,$sw_dest_path,$sw_path)=split(/,/, $uncrypted_array);
- if($processing_type && $sw_software_prefix && $sw_database && $sw_database_user && $sw_database_tmp_pwd && $sw_install_username && $sw_install_password && $sw_install_email && $domain_name && $sw_dest_path && $sw_path) {
- if ($sw_database ne "not_required") {
- $sw_database_pass_clear = $sw_database_tmp_pwd;
- $sw_database_pass_md5 = md5_hex($sw_database_pass_clear);
- #New database connection to the user database
- imscp_installer_set_new_db_connection($sw_database,$sw_database_user,$sw_database_pass_clear);
- } else {
- $sw_database_pass_clear = $sw_database_tmp_pwd;
- $sw_database_pass_md5 = $sw_database_tmp_pwd;
- }
- $sw_install_pass_clear = $sw_install_password;
- $sw_install_pass_md5 = md5_hex($sw_install_pass_clear);
- } else {
- print "[DEGUB] i-MSCP installer file - Some variables not defined in the uncrytped string\n";
- exit();
- }
- }
- sub imscp_installer_set_new_db_connection {
- @main::db_connect = undef;
- $DBname = shift;
- $dbUser = shift;
- $dbPassword = shift;
- $hostname = 'localhost';
- @main::db_connect = ("DBI:mysql:$DBname:$hostname", $dbUser, $dbPassword);
- }
- sub imscp_installer_package_start {
- if($processing_type eq "install") {
- print "[DEGUB] i-MSCP installer file - installation process start\n";
- } elsif ($processing_type eq "uninstall") {
- print "[DEGUB] i-MSCP installer file - uninstallation process start\n";
- }
- }
- sub imscp_installer_package_end {
- if($processing_type eq "install") {
- print "[DEGUB] i-MSCP installer file - installation process end\n";
- } elsif ($processing_type eq "uninstall") {
- print "[DEGUB] i-MSCP installer file - uninstallation process end\n";
- }
- setup_main_vars();
- }
- if(getConf() != 0) {
- print "[DEGUB] i-MSCP installer file - Can't load imscp.conf\n";
- } else {
- #
- # Do not make changes to this static vars
- #
- sub get_inc_path {
- if(getConf() != 0) {
- print "[DEGUB] i-MSCP installer file - Can't load imscp.conf\n";
- } else {
- my $imscp_path = $main::cfg{'ROOT_DIR'}.'/engine';
- }
- }
- use lib get_inc_path();
- require 'imscp_common_code.pl';
- my $crypted_array = $ARGV[0];
- if ($crypted_array) {
- extract_variables("$crypted_array");
- my $db_tables = "sql_tables";
- $url_path = $sw_path;
- $url_path =~ s/^\/.*htdocs//g;
- #
- # This is the place for dynamic vars
- #
- my $config_file = "wp-config.php";
- my $emailadress = $sw_install_email;
- my $table_comments = "comments";
- my $new_table_comments = $sw_software_prefix.$table_comments;
- my $table_options = "options";
- my $new_table_options = $sw_software_prefix.$table_options;
- my $table_posts = "posts";
- my $new_table_posts = $sw_software_prefix.$table_posts;
- my $table_users = "users";
- my $new_table_users = $sw_software_prefix.$table_users;
- if($processing_type eq "install") {
- ## Don't remove this line below ##
- imscp_installer_package_start();
- ##################################
- my $securekeys = `$main::cfg{'CMD_PHP'} -n ./get_secure_keys.php`;
- my $configfile_entry = "<?php
- define('DB_NAME', '$sw_database');
- define('DB_USER', '$sw_database_user');
- define('DB_PASSWORD', '$sw_database_pass_clear');
- define('DB_HOST', 'localhost');
- define('DB_CHARSET', 'utf8');
- define('DB_COLLATE', '');
- $securekeys
- \$table_prefix = '$sw_software_prefix';
- define('WPLANG', 'en_GB');
- define('WP_DEBUG', false);
- if ( !defined('ABSPATH') )
- define('ABSPATH', dirname(__FILE__) . '/');
- require_once(ABSPATH . 'wp-settings.php');
- ?>";
- open(CONFIGFILE,'>'.$sw_dest_path.'/'.$config_file);
- print CONFIGFILE "$configfile_entry";
- close CONFIGFILE;
- #Dump import
- sys_command("mysql -u".$sw_database_user." -p".$sw_database_pass_clear." ".$sw_database." < ./sql/sql.sql");
- #Rename SQL-Tables
- open(SQL_TABLES,'<'.$db_tables) or die("Unable to open file: ".$db_tables);
- my @sql_table_data = <SQL_TABLES>;
- chomp (@sql_table_data);
- close(SQL_TABLES);
- foreach my $sql_table_data_line (@sql_table_data) {
- $sql = "
- RENAME TABLE
- `".$sql_table_data_line."`
- TO
- `".$sw_software_prefix.$sql_table_data_line."`
- ;
- ";
- doSQL($sql);
- }
- my $setdatetime = `date '+%Y-%m-%d %H:%M:%S'`;
- my $loginpasswordhash = `$main::cfg{'CMD_PHP'} -n ./make_password.php $sw_install_pass_clear '$sw_dest_path'`;
- #Update Datebase with variables
- $sql = "
- UPDATE
- `".$new_table_options."`
- SET
- `option_value` = 'http://".$domain_name.$url_path."'
- WHERE
- `option_name` = 'siteurl'
- ;
- ";
- doSQL($sql);
- $sql = "
- UPDATE
- `".$new_table_options."`
- SET
- `option_value` = '".$domain_name.$url_path."'
- WHERE
- `option_name` = 'blogname'
- ;
- ";
- doSQL($sql);
- $sql = "
- UPDATE
- `".$new_table_options."`
- SET
- `option_value` = '".$emailadress."'
- WHERE
- `option_name` = 'admin_email'
- ;
- ";
- doSQL($sql);
- $sql = "
- UPDATE
- `".$new_table_options."`
- SET
- `option_value` = 'http://".$domain_name.$url_path."'
- WHERE
- `option_name` = 'home'
- ;
- ";
- doSQL($sql);
- $sql = "
- UPDATE
- `".$new_table_users."`
- SET
- `user_login` = '".$sw_install_username."',
- `user_pass` = '".$loginpasswordhash."',
- `user_nicename` = '".$sw_install_username."',
- `user_email` = '".$sw_install_email."',
- `user_registered` = '".$setdatetime."',
- `display_name` = '".$sw_install_username."'
- WHERE
- `user_login` = 'admin'
- ;
- ";
- doSQL($sql);
- ## Upgrade Database to the current wordpress version ##
- my $upgrade_wp_version = `$main::cfg{'CMD_PHP'} ./wp_upgrade.php '$sw_dest_path'`;
- ## Don't remove this line below ##
- imscp_installer_package_end();
- ##################################
- } elsif ($processing_type eq "uninstall") {
- ## Don't remove this line below ##
- imscp_installer_package_start();
- ##################################
- #Drop existing SQL-Tables
- open(SQL_TABLES,'<'.$db_tables) or die("Unable to open file: ".$db_tables);
- my @sql_table_data = <SQL_TABLES>;
- chomp (@sql_table_data);
- close(SQL_TABLES);
- foreach my $sql_table_data_line (@sql_table_data) {
- $sql = "
- DROP TABLE IF EXISTS
- `".$sw_software_prefix.$sql_table_data_line."`
- ;
- ";
- doSQL($sql);
- }
- ## Don't remove this line below ##
- imscp_installer_package_end();
- ##################################
- }
- } else {
- print "[DEGUB] i-MSCP installer file - No Input Data available";
- }
- }