Search results

  1. J

    Unable access database

    You should use prepared statements to help prevent SQL injection, etc. - the following guide is an intro to PHP PDO - Why you Should be using PHP’s PDO for Database Access | Nettuts+
  2. J

    Backup drive died

    If you setup and attached a scsi drive via Hyper-v, you'll likely need to restart your VM as you stated. Make sure you edit the /etc/fstab and remove the backup drive line before restarting or else you may be dumped to the maintenance shell upon reboot. Once you reboot, find which device is the...
  3. J

    Error with nginx cache: no space left on /tmp

    Nginx has a cache manager process that watches the nginx cache and removes inactive files after a certain period or when the cache limit has been reached. In order to keep /tmp from becoming full you'll need to adjust your 'proxy_cache_path' directive to use a smaller cache size. If /tmp is too...
  4. J

    How can we enable byte-range requests?

    I don't see this as a cpanel issue at all. Likely you're using apache, that is where you need to enable byte range requests. if mod_headers is loaded, you should be able to use the 'Accept-Ranges' directive for this.
  5. J

    PHP selector not taking effect without apache restart.

    You should also be able to gracefully restart Apache - what's wrong with Apache having to restart after PHP changes?
  6. J

    Question: Grant EVENT Privilege for Mysql User/Database

    See - MySQL :: MySQL 5.1 Reference Manual :: 19.4.6 The Event Scheduler and MySQL Privileges I've never seen the privilege turn into a security issue as the event query is ran as the mysql database user, not root or mysql. You do need to manually grant the event privilege as the default is 'N'.
  7. J

    Unable access database

    USERNAME_agents is the database name. What coding language are you using when attempting to access the database? Instead of accessing the database via the file path, your code will likely access the database over port 3306.
  8. J

    Sudden large increase in spam levels

    Are you sure spamd is successfully scanning messages? Watch /var/log/exim_mainlog - you'll see spamassassin notes on each incoming email, marking it as spam or marking it as not spam.
  9. J

    Emails disappearing after report delivery to mailbox

    Is the user connecting via POP3 unknowingly? Check /var/log/maillog for POP3 logins from the user.
  10. J

    i have problem with install nignx on vps

    Does apache's error log point in the right direction? How was nginx installed? Is nginx on the same system?
  11. J

    To iptables or not to iptables

    Always setup iptables on a cpanel host, there is no reason not to. I recommend using csf to manage iptables rules for you.
  12. J

    PHPMYADMIN restored .sql doesn't show up in MYSQL Database

    If you have root access, cd into /var/lib/mysql and make sure the database files have the same owner/group as other databases (should be mysql:mysql). If owner/group incorrect fix them with chown. If the owner/group are correct, trying using the database via mysql cli - run the following: #...
  13. J

    exim mail issues... all outgoing mails down

    What does `exim -bt EMAIL` return?
  14. J

    stop email spoofing

    You can enable Spamassassin outbound email scanning. If the from header in the email is external, and different than the actual sender Spamd should mark it as spam and reject.
  15. J

    New email account - SMTP connection refused

    It sounds like exim isn't listening on port 25. Run `# service exim restart` via SSH while running `# tail -f /var/log/exim_mainlog`. If there's an issue, it will be logged in exim_mainlog.
  16. J

    Solutions for handling symlink attacks

    That will then break other .htaccess directives needed for application to work correctly. I find that Rack911's Apache patch has been the most effective so far to prevent cross account symlinks.
  17. J

    Code search in all files

    There are multiple ways to do that - the following will work: # grep -ilr "pattern" /files/to/search
  18. J

    Script to monitor mail queue?

    If you use that script I recommend replacing the binary names with the full path to the binaries or you may end up a spool of 'command not found' cron emails. For example: replace 'exim' with '/usr/sbin/exim'.
  19. J

    Can't seem to send or receive mail?

    Does webmail eventually show an error? In Roundcube it may show the error for a few seconds only. If you run `exiwhat`, do you get an output saying SMTP is listening and exim is processing mail? Are you able to telnet to port 25 on the system and get a response from Exim?
  20. J

    Optimization: How to safely clean partitions?

    Yes, it is safe to delete those files. How large is your /tmp partition? If it's 1GB, you're likely to always see it above the 80% mark as many different services use tmp for temporary files. It's okay if /tmp is pretty full, but if you see that one cPanel user is consuming most of the space...