cpanel

Cannot install Ruby on CentOS

♀尐吖头ヾ 提交于 2019-12-12 11:08:10
问题 I just cannot install Ruby on my CentOS (which is also hosting a cPanel). sudo yum install ruby ruby-devel ruby-irb ruby-rdoc ruby-ri audit_log_user_command(): Connection refused Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile base: mirror.sov.uk.goscomb.net updates: mirror.sov.uk.goscomb.net addons: mirror.sov.uk.goscomb.net extras: mirror.sov.uk.goscomb.net base | 1.1 kB 00:00 updates | 951 B 00:00 addons | 951 B 00:00 extras | 1.1 kB 00:00 Excluding Packages in

folder “ea-php55” deleted, now session doesn't work

人盡茶涼 提交于 2019-12-12 05:51:19
问题 recently a huge size increase happend in a folder in cPanel host in this address: .cagefs/var/cpanel/php/sessions/ea-php55 it was about 700MB size. I couldn't even open this folder to see all files. so I deleted the entire folder and recreated it. I also set Permissions to 0700 (like it was before). now session doesn't work. I can't even login to my website's admin panel. How can I fix this problem? 回答1: Before it could have been with permission 0700 but the owner should be different -

Why backslashes are being added to all the $_GET, $_POST automatically?

耗尽温柔 提交于 2019-12-12 05:49:49
问题 I have a vps with cPanel/Whm/CentOS 5.5 and the problem is that all parameters sent to my server are being addslashed , I've checked out the PHP configuration and i found out that all the magic quotes are turned off and i don't know what causes this. My code is so clean and i know every bit of it and i don't have any addslashes() or some sort of these functions. i only want to receive the parameters as they are. URL: test.php?text=blah" ' " 'blah <?php echo $_GET["text"]; // Output blah\" \'

PHP in HTML files not running or being commented out

天涯浪子 提交于 2019-12-12 03:34:41
问题 First of all, I am not trying to run php within a js script, there is a similar question on here that refers to a user trying to run php from inside a js script. I have added many combinations of AddType application/x-httpd-php .php .html AddHandler x-httpd-php .html to the .htaccess file in a higher level directory containing the .html file I want to run php in. This has not worked. (I am open to trying new combinations) The is either not read at all or commented out when viewing the source

Migrating Wordpress database to server SQL error

蓝咒 提交于 2019-12-12 01:58:04
问题 I have just finished a Wordpress site and I'm trying to set it up on the server. I did the following, as always: uploaded a .htaccess file to a public_html folder with the text from https://codex.wordpress.org/htaccess (basic WP) moved all the contents from the local wordpress folder to public_html exported my local database and changed all instances of 'localhost/siteName/wordpress' with 'www.siteAddress.com' created a mySQL database in cPanel's mySQL section created a new user in cPanel's

Error in two scripts: “unary operator expected” and “integer expression expected”

僤鯓⒐⒋嵵緔 提交于 2019-12-12 01:44:59
问题 I wrote two scripts which try to do the same action in two different ways, but I get errors each time I run those. Kindly requesting your help to correct my scripts and to improve my knowledge as well. All I am trying to do the vps setup in a single script. Following two scripts are just a portion of it which get errors each time. 1) Script to set hostname through cpanel xml-api for a vps in openvz node cat vpstest.sh #/bin/bash hostname_status=`curl -sku root:PASSWORDHERE "https://ip.x.x.x

Enable allow_url_fopen on cpanel

我怕爱的太早我们不能终老 提交于 2019-12-12 01:38:33
问题 I have cPanel and I want enable allow_url_fopen on my host. When I use this code if (ini_get("allow_url_fopen") ==1) { echo "allow_url_fopen is ON"; } else { echo "allow_url_fopen is OFF"; } Show me allow_url_fopen is OFF 回答1: If your PHP version is under 5.4 you can use the following line of code to set allow_url_fopen to true. ini_set('allow_url_fopen', '1'); 来源: https://stackoverflow.com/questions/42605197/enable-allow-url-fopen-on-cpanel

Cpanel API Database Creation with out root access

前提是你 提交于 2019-12-11 20:43:37
问题 So I'm trying to create a database/user with out root access. It's either not possible - or i've done something wrong. Suggestions? Missing a Step? Here is my code as of now: include("xmlapi.php"); $xmlapi = new xmlapi($db_host); $xmlapi->password_auth("".$cpaneluser."","".$cpanelpass.""); $xmlapi->set_debug(1);//output actions in the error log 1 for true and 0 false $xmlapi->set_output('array');//set this for browser output //create database $createdb = $xmlapi->api1_query($cpaneluser,

Migrating Drupal Site on same server

允我心安 提交于 2019-12-11 19:12:30
问题 I have finished developing my new Drupal site to replace an old HTML static site. I chose to install the Drupal site on Public HTML folder on the main domain here; www.my-site.co.uk/development-site I would now like to remove the old HTML static site and replace with this site. Do I just delete all the HTML files from the old site, excluding /development-site file, then move all the contents of this file into the public HTML folder? Also, with the database being on the same server, I am

How to run a terminal command using python script, which is held through wsgi process?

雨燕双飞 提交于 2019-12-11 18:43:34
问题 I have a Centos 7 server with cPanel and I'm working on a Telegram bot for my business needs. The bot should be able to run a terminal command with os.system or subprocess.Popen, however both options do not work when configured through a webhook + wsgi process. I tested both with bot.polling method and they worked as a charm, however after I switched to webhook method served by flask and wsgi, both stopped working for me. I have tried the following: mycommand = "python3.6 GoReport.py --id 31