FAQ Database Discussion Community

Set html file as folder main page

i want to set html file as main page in folder. for example if file.html hosts here - www.domain.com/folder/file.html so the address will be only www.domain.com/folder. maybe someone know how? Thanks!

How to fix local IP in Nat Configuration on WHM/Cpanel on Centos 6 on Google Compute Engine

If you deleted a VM on Google Compute Engine on a Centos 6 Cpanel server and then create it with the same disk, you often are assigned a new local IP address even if you kept the static IP. This does not properly update in the NAT configuration on Cpanel/WHM...

How to remove mail queue from cpanel?

How to remove mail queue from cpanel? I want to remove only spammed mail. Other client data are never lost his mail data. From example: in my cpanel one domain is spamming and It will be affected to other client mail service. So, how to remove mail frozen email....

How to handle POST request to PERL from html

I am writing a small cPanel plugin which basically submit an html form to a perl file over ajax request to the perl file. The type of the request is POST as I need to send some data to the script. My Question is how can I handle the POST...

Mysql and NodeJS can't connect remotely to deployed app

I am trying to connect from a NodeJS app to a MySQL database (already deployed, not in a localhost), currently it throws an error saying: Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'user'@'' (using password: YES) at Handshake.Sequence._packetToError (C:\wamp\Respaldo Linux\Documentos\WebDev\misGastosApp\node_modules\mysql\lib\protocol\sequences\Sequence.js:48:14) at Handshake.ErrorPacket (C:\wamp\Respaldo Linux\Documentos\WebDev\misGastosApp\node_modules\mysql\lib\protocol\sequences\Handshake.js:101:18) at...

robots.txt allow all except few sub-directories

I want my site to be indexed in search engines except few sub-directories. Following are my robots.txt settings: robots.txt in the root directory User-agent: * Allow: / Separate robots.txt in the sub-directory (to be excluded) User-agent: * Disallow: / Is it the correct way or the root directory rule will...

Check whm root access logs in cpanel

Pardon me if it is a basic question, actually I am a novice in administrating cpanel but I want to see cpanel's root WHM login logs. How can I see that?

Programmatically inserting messages to an email account with CPanel API

I'm looking for a way to programmatically insert messages into a specific email account - created and maintained with CPanel. I have a website that provides a webmail interface for a video game's inner messsaging (using its API) and I would like to take this service one step further and...

Placing database on one host and PHP files on another [closed]

I'm trying to figure out if and how I can run PHP files on one host (ie: Hostgator) and run the database on a separate host (ie: Godaddy). I have cPanel Linux plans for both and want to do this as a privacy and security measure, so no one host...

rmdir/unlink not working through cron

I wrote a cron job that will delete folders (and files inside of it) with dates older than today - 14 days using DateTime. On my server, if I browse to the file (cleanup.php) in my web browser, it deletes the folders and files fine. The cron job runs because...

Matching a string with regex?

I am looking to match several full strings in regex for a cpanel filter, but cannot seem to get it working. I am wanting to match the string no matter where it is, even if its embedded or in strange casing like so.. embedSTriNgembed For instance this string: To view...

how to change public folder to public_html in laravel 5

I'm using a shared hosting which uses cpanel as its control panel and within the cpanel public_html is the default root directory, because of this I can't get my laravel application work properly. Is there any way to make laravel use public_html instead of public folder?

Over 4,000 Redirect 301 lines in .htaccess file

I have a re-design of my site happening shortly where all the URLs are changing. Here's what I have put together so far http://cricketweb.net/new-design%20htaccess Some research I've done has shown that this many lines within the .htaccess file is going to slow performance quite a lot. I asked my hosting...

External domain is not passing values through ajax request

I use server of CPanel and I have the domain name in the config fiele for my mobile app but when I upload the index and all the components (Javascripts, PHP files, SCSS, CSS) to the server and Phonegap and download it on my Mobile it does not retrieve the...

Trying to get cron.php working in Cpanel for Magento

I have been using this /usr/bin/php -q /home/username/public_html/sub.domain.com/cron.php as my command for the cron job, but I dont get anything. No customer emails, no errors, nothing. When I use php /home/username/public_html/sub.domain.com/cron.php I get the error (Or not error) X-Powered-By: PHP/5.4.37 Content-type: text/html and if I use /home/username/public_html/sub.domain.com/cron.php I get the...

Worried about potential performance issue with httpd.conf with thousands of 301 redirects

I've been doing further research about permanent 301 re-directs. I'm doing a site re-design and 4,000 pages are changing their URLs so I have a few thousand 301 re-direct statements where the URLs are changing so much that I can't do regular expressions. I've been researching about the performance differences...

How to create URL like http://api.example.com

I have bought domain at cpanel I need to create the API path like http://api.example.com to create API for my database. where I should create folder called API in cpanel?

How to make server recognize global filenames

Let's say the file and folder structure is as below: public_html/interface/index.php public_html/includes/EliteScript.php public_html/interface/site/template.php In 1st one, I should be able to put this require_once("includes/EliteScript.php"); and it must look for includes/EliteScript.php in the server, without forcing me to changing it to ../includes/EliteScript.php in public_html/interface/index.php In 3rd one, I should be able...

display Subdomain address on URL bar

I create a sub domain and must add link to redirect. now, when someone click the new link - sub.domain.com the url on the top change to the redirection link like: www.domain.com/folder/folder/index.html. if i want that when someone click on the sub.domain.com the link in the top still be the...

cPanel with Tomcat 7 installation successful but not showing /usr/local/jakarta folder under root

I have successfully installed Tomcat 7 using cPanel on IWEB server. I got the installation successful message too. I am able to hit the tomcat home page using www.domain.com:8080 and it directs me to Tomcat's home page. You may take a look at The main challenge is, in order...

When a cron job is set to “run every 5 minutes”, does it run every 5 minutes from the moment it's added?

When a cron job is set to "run every 5 minutes", does it run a) every 5 minutes from the moment it's added, or b) every 5 minutes from the zero-minute mark? For example, if a 5-minute cron job is added at 10:17, does it run as per schedule a):...

#1273 - Unknown collation: 'utf8mb4_unicode_ci' Cpanel

I have a wordpress database on my local machine that I want to transfer to a hosted phpMyAdmin on Cpanel. However when I try to import the database into the environment, I keep getting this error #1273 - Unknown collation: 'utf8mb4_unicode_ci' I have tried to google around and the only...

Getting rid of the /cpanel after the URL?

Basically I'm in process of creating a site, however for security reasons I would like to get rid of /cpanel (as in www.domain.com/cpanel) and just make it so site admins have to access via the IP. This means users can't just type /cpanel and access the cPanel login page. Much...

How to change php configuration directory of php.ini file on a subdomain

I have a FTP access to subdomain.website.com and not to the cPanel of website.com I want to change some settings on php.ini file, but I am unable to find one. And the php info says Configuration File (php.ini) Path /usr/local/lib Loaded Configuration File /usr/local/lib/php.ini ...

Make Mysql database that exists manageable with phpmyadmin

I have a Mysql database on my server. I can get into it via the command line, so it does exist. However, when I go into cpanel and open up phpmyadmin, it is not there. What do you have to do to make an existing database manageable with phpmyadmin?...

cpanel function deldenyip() is not working

php,cpanel I got error like this Array ( [apiversion] => 1 [type] => event [module] => Module [func] => deldenyip [source] => module [data] => Array ( [result] => ) [event] => Array ( [reason] => Module::deldenyip() failed: Can't use string ("") as a subroutine ref while "strict refs" in...

Creating a subdomain with dot(.) symbol

Can we create a subdomain on our web server without the dot symbol? For e.g I have domain name www.example.com. Now if I want to create a subdomain www.myexample.com. Is it possible? Recently, we have option to create subdomain with dot symbol only....

.htaccess redirection keeping my orginal URL

I would like to have the following setup using .htaccess. domain.com/test/hello.php or domain.com/index.php or any other link must show only domain.com in the URL. Kindly share your views on this....

403 Error when trying to remove products from Cart

I am using a cPanel host and running PHP 5.5. Opencart version 1.5.1. When I try to remove a product from the cart I am getting a 403 forbidden error. This only seems to happen with products that have a lot of options and include text input options. I have...

Recloning a json-document by scheudule

I have a json-document on my host called: "weatherData.json". The data in that data is going to be cloned from another page called: "www.example.com/whatWeather.json". The "wheaterData.json" on my host should be recloned from the external page automaticly every 10 minutes. (I have cpanel if that's make any difference) What would...

Database Error - Only in certain browsers

I recently switched web host to a new company (chosting.dk), and now I've run into an odd phenomena. In certain browsers (currently Chrome and IE) I get the following error when I try to access my website, www.e-drift.dk: A Database Error Occurred Unable to connect to your database server using...

Switching back to old cPanel on another hosting package

I have a HostGator hosting package and recently decided to move to a new hosting package with SimpleServers. The move was completed successfully, however I have decided to move back to HostGator, for reasons I won't disclose here. So - here's the situation: I have a cPanel with SimpleServers now...

How to temporary disable cpanel/WordPress mailing abilities

Quick question since i'm in a rush, my WordPress install has been hacked and is spamming how can i temporary disable the sites mailing abilities while i look for the malicious code.

BASH Script to SSH to another server and run commands as user

I read a lot though the forums and Google however I wasn't able to locate a workaround for this particular one. Basically my script is running on my local machine, then is SSH-ing onto a server with a different username (it works up until here), and on that machine I...