dennis henry

ramblings of an IT professional

Follow me on TwitterRSS Feeds

  • Home
  • About
  • Linux Tutorials
  • Code
  • Docs
  • Gallery

Duplicate FTP Hosts in Show IP Usage

Dec 8th

Posted by dennis in cPanel

No comments

Ran into an issue today where a domain was showing in the cPanel “Show IP Address Usage” twice in the “FTP Usage” column. This was distressing the client so I looked into it and it appears this list is pulled from the /etc/pure-ftpd/ directory, which has the following directory structure:

root@server(/etc/pure-ftpd)$ ll
total 16
drwxr-xr-x  2 root root   4096 Dec  8 13:42 ./
drwxr-xr-x 90 root root  12288 Dec  8 13:42 ../
lrwxrwxrwx  1 root wheel    25 Dec  8 13:40 1.2.3.4 -> /home/user1/public_ftp/
lrwxrwxrwx  1 root wheel    24 Dec  8 13:40 2.3.4.5 -> /home/user2/public_ftp/
lrwxrwxrwx  1 root wheel    25 Dec  8 13:40 3.4.5.6 -> /home/user3/public_ftp/
lrwxrwxrwx  1 root wheel    25 Dec  8 13:40 4.5.6.7 -> /home/user4/public_ftp/
lrwxrwxrwx  1 root wheel    25 Dec  8 13:40 5.6.7.8 -> /home/user5/public_ftp/
lrwxrwxrwx  1 root wheel    23 Dec  8 13:40 6.7.8.9 -> /home/user3/public_ftp/

In my case, user3 had two IPs pointing to his public_ftp directory which caused the issue. I removed the symlink and then the IP Usage showed properly.

Just a quick fix for anyone else who experiences this issue!

cPanel, ftp, ftp accounts, ip usage, pure-ftpd

Issue with GeSHI and CakePHP

Nov 30th

Posted by dennis in CakePHP

No comments

So today I was having an issue where, for some reason, an incredibly long script in our script repository built using CakePHP would not display the GeSHI syntax-highlighted code. I tore apart the code looking for an answer and the only unique attribute to this script was its very long length (around 1k lines, over 50k characters). I eventually narrowed it down to the preg_replace that was being used in the CakePHP wrapper for GeSHI I was using and discovered that the pcre.backtrack_limit was too low at the default of 10000 (10 thousand). I upped the limit to 10000000 (10 million) and it’s now able to display the syntax highlighted code without issue.

Just thought I’d make a quick post because I could not find another blog with this solution. Hope this helps someone else in a similar predicament!

CakePHP, GeSHI, highlighting, pcre, preg_replace, syntax
«12345»...Last »
    • Recent comments
    • Popular posts
    • Archives
    • Tags
    • Categories
    • Common Issues (7)
    • Linux (18)
      • Apache (1)
      • CentOS (4)
      • cPanel (9)
        • Easyapache (1)
      • Drives (1)
      • Exim (1)
      • IPTables (1)
      • MySQL (1)
      • Networking (2)
      • OpenSSH (1)
      • OpenVZ (4)
      • Subversion (1)
      • Xen (2)
    • PHP (2)
      • CakePHP (1)
      • GeSHI (1)
      • suPHP (1)
    3.4.3 5.x Apache assign ip addresses CakePHP centos Common Issues configuration connections cPanel cpuwatch demo Drives Easyapache exim ftp ftp accounts full GeSHI highlighting interface iptables ip usage libperl Linux memory usage mode MySQL network networking OpenVZ overwriting defaults password pcre perl preg_replace pure-ftpd resolv.conf subversion suPHP syntax upgrade venet0 xen yum
    • July 2011 (1)
    • June 2011 (1)
    • May 2011 (1)
    • March 2011 (1)
    • December 2010 (1)
    • November 2010 (2)
    • September 2010 (1)
    • August 2010 (2)
    • July 2010 (1)
    • April 2010 (2)
    • October 2009 (1)
    • June 2009 (1)
    • April 2009 (2)
    • March 2009 (3)
    • Install Xen 3.4.3 on CentOS 5.x (4)
    • CPUwatch (3)
    • Common Issues – Easyapache failing (2)
    • Total Memory on a Xen Node (2)
    • Common Issues – MySQL Connectivity Issues (1)
    • Simple IPTables OpenVZ Setup (1)
    • Common Issues – Hostname A Record (0)
    • Common Issues – Main Drive Full (Mounting Issues) (0)
    • Allocate x IPs to OpenVZ VEs (0)
    • Common Issues – Maxed out Apache Connections (0)
    • dennis: I'm glad to hear my script could help you! Xen's memory management is indeed odd but, overall, I...
    • Sam: I too was caught out by the Xen hypervisor's method of memory management. The Dom-0 machine is...
    • dennis: CPUWatch completely pauses processes until the load decreases, so its not ideal for services like...
    • victor: I've read several sites that talk about cpuwatch where they use the word Pause or throttled. ...
    • dennis: Hey Ben! Thanks for the comment. That's odd it didn't work for you. I've used this same method...
    • Ben: This did not work as per below: cpan> install Acme::Spork CPAN: Storable loaded ok...
    • dennis: Thanks Jimmy! Glad you enjoyed it.
    • jimmy: finally an upgrade guide that just "works" thanks
  • My latest tweets

    Loading tweets...
    Follow me on Twitter!
  • User Login






    • Lost your password?
RSS Feeds XHTML 1.1 Top