cpanel

How to maintain command after exiting SSH?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 18:22:19
问题 I am using PuTTy to run a node.js server on a shared host (cPanel). My question is whether it is possible to maintain a command even after I completely close PuTTy? My issue is that when I for example type 'nohup node server.js &' and my server runs successfully, the moment I close down PuTTy, my node server goes down again. I would love it if there was a way to continously have my node server running even after exiting PuTTy completely or even shutting down my computer. I have tried the

My PHP While(true) automatically stopped in cpanel

喜你入骨 提交于 2019-12-11 18:19:59
问题 I have tested this script in my localhost a whole day and it's still working. But in cpanel this script is stopped automatically set_time_limit(0); ini_set('memory_limit', '-1'); $run = TRUE; $nowtime = date("Y-m-d H:i"); while($run){ $stop = GetSetting("Stop"); $time = date("Y-m-d H:i"); if($stop){ $run = FALSE; // stopped when setting changed continue; } if($time != $nowtime){ log_message("debug","Still Running On ".$time); //checking if it still running every minute } $nowtime = $time; }

Remote Mysql IP access

佐手、 提交于 2019-12-11 16:36:39
问题 I wish to grant permissions to various users for my databases using a .php script But it seems that GRANT command is denied when accessed via PHPMYADMIN or a .php file Is there a way out to achive this? 回答1: You have to have some kind of rights to do that, This is how you can check them: show grants for 'youruser'@'localhost'; If you cannot find anything like WITH GRANT OPTION it is very likely that you cannot do that. It's not a limitation of PHP. More on the GRANT command: http://dev.mysql

How to create ftp in php?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 14:29:55
问题 Hello i want to create ftp for particular users.. I have searched on google but nothing found. So i have decided to put question on stackoverflow. I have tried below code but not working at all :- $cpaneluser = "xxxxx"; // i have entered my cpanel user $cpanelpass = "xxx"; //pwd $domain = "testing.domain.com"; //here i have entered the domain $fuser = "testing@domain.com"; $fpass = "mypwd"; $homedir = "/direcctorypath"; $url = "http://$cpaneluser:$cpanelpass@$domain:2082/json-api/cpanel?";

How can I check if I have mysqli in my web server using cPanel?

我的梦境 提交于 2019-12-11 13:40:19
问题 I'm using... PHP version 5.4.28 Filezilla Wordpress cPanel MediaTemple hosting I get this error Fatal error: Call to undefined function mysqli_connect() , after trying to connect to my database with mysqli functions. I've read online that either mysqli isn't enabled, it may not be installed. I know I have to check my php.ini file located in /usr/local/lib/, but I don't how know look for that. I'm using cPanel's WHM and it looks like this... cpanel WHM Any suggestions? 回答1: If you have WHM you

PDOException in Connector.php line 47: SQLSTATE[HY000] [1045] Access denied for user 'hassan'@'localhost' (using password: YES)

房东的猫 提交于 2019-12-11 10:49:13
问题 I am trying to upload website on cpanel. The following error is encountering PDOException in Connector.php line 47: SQLSTATE[HY000] [1045] Access denied for user 'hassan'@'localhost' (using password: YES) My .env file contains: APP_ENV=local APP_DEBUG=true APP_KEY=4ZuW70AMILLsnvHkTJ1yraRoGqmx4Dzg DB_HOST=localhost DB_DATABASE=campaign DB_USERNAME=hassan DB_PASSWORD=password CACHE_DRIVER=file SESSION_DRIVER=file QUEUE_DRIVER=sync MAIL_DRIVER=smtp MAIL_HOST=mailtrap.io MAIL_PORT=2525 MAIL

How i can use cPanel to upload php files and database? [closed]

若如初见. 提交于 2019-12-11 10:26:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . For couple of days i am trying to upload my php files and database to WebsitePanel but i can't. If anybody is familiar with WebsitePanel please help me. 回答1: If you use cPanel then follow this step: Login to cPanel Click on File Manager Select Web Root (public_html/www) and clock on Go. Click on Upload on the

Apache mod_security blocking country

五迷三道 提交于 2019-12-11 09:54:42
问题 I used this rule to block country in Mod_security : (I already configured @geoLookup with the maxmide lite database .dat) # Test IP address and block by country code SecRule REMOTE_ADDR "@geoLookup" "phase:1,chain,id:10,drop,log,msg:'Blocking China IP Address'" SecRule GEO:COUNTRY_CODE "@streq CN" But it doesn't work, no ip logged. I tried with a different country and it does not work. Any help? Thank you. 来源: https://stackoverflow.com/questions/33611280/apache-mod-security-blocking-country

Piping email to php script

跟風遠走 提交于 2019-12-11 08:53:11
问题 I've been searching for an answer for 2 days now and have found so much, but still can't get this to work. I have a WHM server with a cPanel account. I have created the following php script under public_html at /home/USERNAME/help-system/parse.php for testing: #!/usr/local/bin/php -q <?php mail('****@davidslack.co.uk', 'Test email', 'Test email to get an email into the script'); ?> I have also created a forwarder in cPanel that forwards to: |/home/USERNAME/help-system/parse.php The php script

Allow a PHP script access to PDFs in a folder - but prevent direct URL references

烈酒焚心 提交于 2019-12-11 07:58:22
问题 On a godaddy hosted website using CPanel, I have a small PHP script that shows each line in a text file that's on the server. Each line contains a private href link to a PDF that only the logged-in user can see. The links points to various PDFs in the same folder on the server. The code works fine and I can click on the link and see each PDF. The problem is that each PDF can also be seen by using a direct URL query (i.e. website/folder/pdfname.pdf). As these are private PDFs, I don't want