cpanel

Mysql cannot connect - Access denied (using password yes)

ぐ巨炮叔叔 提交于 2019-11-28 03:41:56
问题 I have hosting provided by eleven 2 and I just created a new MySQL user and gave it access to every action listed. I'm getting the following error Warning: mysql_connect() [function.mysql-connect]: Access denied for user '(username is here, removed for posting)' (using password: YES) in /home/.../public_html/config.php on line 10 Here is my config file //connection details have been removed for posting purposes <?php define('SQL_SERVER',''); // Database Server define('SQL_USER',''); // User

How to run artisan command schedule:run on hosting server? (Laravel)

若如初见. 提交于 2019-11-27 17:29:26
问题 I have statusUpdate.php file in the xampp\htdocs\project\app\Console\Commands folder. statusUpdate.php : <?php namespace App\Console\Commands; use Illuminate\Console\Command; use DB; class statusUpdate extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'status:update'; /** * The console command description. * * @var string */ protected $description = 'Update Job status daily'; /** * Create a new command instance. * * @return void *

Run node.js on cpanel hosting server

爷,独闯天下 提交于 2019-11-27 13:47:44
问题 It is a simple node.js code. var http = require('http'); http.createServer(function(req, res) { res.writeHead(200, { 'Content-Type' : 'text/plain'}); res.end('Hello World!'); }).listen(8080); I uploaded it on cpanel hosting server and installed node.js and run it. If a server is normal server I can check script result by accessing 'http://{serverip}:8080'. But on cpanel is hosting domain and sub domain and every domain is matched by every sites. Even http://{serverip} is not valid url. How

Subdomains leading to Codeigniter Controllers?

时光总嘲笑我的痴心妄想 提交于 2019-11-27 10:09:05
问题 This seems like a common request, but I haven't been able to find definitive instructions on doing something like this. I'd like a subdomain to trigger a certain controller on my CI installation. For example: students.mysite.com : would open mysite.com/students (technically: mysite.com/index.php/students . controller: students ) teachers.mysite.com : would open mysite.com/teachers While preserving the subdomain when traversing deeper. For example: students.mysite.com/help : would open mysite

what is the use of “~” tilde in url? [closed]

允我心安 提交于 2019-11-27 08:13:18
what is the use of ~ tilde in URL? I am using cPanel, and have link including tilde, why is tilde there? When we buy server space but do not have dns or don't want to use it for development purposes,we use the like http://serverip/~foldername . vkrams Actually tilde '~' represents home directory. When you place tilde in url, It will access from home directory T.E.D. Well, a webserver is free to use any character after the leading URI part for whatever purpose it wants. That being said, the use of ~ generally hearkens back to the early days of the web, when just about every web server ran on

Cron jobs in codeigniter

别来无恙 提交于 2019-11-27 03:37:42
问题 I am trying to do a cron job with a site built in CodeIgniter - I've got access to the CPanel cron feature can anyone suggest the best way to setup a cron job using CPanel? I am using CodIgniter so cannot be sure how to call a controller within a cron job? E.g http://admin.com/sites/publish/ How would I access this publish function within the sites controllers using a cron job? 回答1: Best way is to call from the command line in the cron job... php /path/to/index.php controller >> /dev/null You

onchange file input change img src and change image color

坚强是说给别人听的谎言 提交于 2019-11-27 01:11:09
问题 onchange event is not working. What am I supposed to do to get result on same page. I dont want to redirect to any other page to upload image. Is this issue is because of opencart? I dont know if it is correct to write like this in cpanel. I am using opencart and cpanel. Is there any other way? HTML <input type='file' id="upload" onchange="readURL(this.value)" /> <img id="img" src="#" alt="your image" /> script function readURL(input) { var url = input.value; var ext = url.substring(url

what is the use of “~” tilde in url? [closed]

最后都变了- 提交于 2019-11-26 17:44:46
问题 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 6 years ago . what is the use of ~ tilde in URL? I am using cPanel, and have link including tilde, why is tilde there? When we buy server space but do not have dns or don't want to use it for development purposes,we use the like http://serverip/~foldername . 回答1: Actually tilde '~' represents home directory. When you place

Using CRON jobs to visit url?

泄露秘密 提交于 2019-11-26 06:19:33
问题 I have a web application that has to perform a repeated tasks, Sending messages and alerts, I, already, use a script page do those tasks when it loaded in the browser i.e http://example.com/tasks.php and I included it by the mean of iframe in every page of my web application. Now I want to change this to use CRON jobs because the first approach may leads to jam performance, So How could I make a CRON job that visits http://example.com/tasks.php. However, I don\'t want this CRON job creating

Run a PHP file in a cron job using CPanel

旧时模样 提交于 2019-11-26 02:29:28
问题 I am just trying to run a PHP script using a cron job within CPanel - is this the correct syntax: /usr/bin/php -q /home/username/public_html/cron/cron.php >/dev/null I am not getting any email notifications stating a cron has been completed, do I need to do anything specific with the PHP file? 回答1: In crontab system : /usr/bin/php is php binary path (different in some systems ex: freebsd /usr/local/bin/php , linux: /usr/bin/php ) /home/username/public_html/cron/cron.php should be your php