Results 1 to 8 of 8

Thread: pconnect talk

  1. #1

    Join Date
    Apr 2005
    Posts
    99

    Arrow

    They are trying to hack my site again

    Webalizer:
    http://www.zone-h.org/component/opti...cks/Itemid,43/
    http://www.spyhackerz.com/forums.php

    ... few visits today!

    I'm on Hostforweb now and register_global OFF (not admin-site)

    I'm getting those error-messages (today 50 errors in inbox!):

    Error in /member.php: Access denied for user 'nobody'@'localhost' (using password: NO)

    Error in /index.php: Access denied for user 'nobody'@'localhost' (using password: NO)

    Error in /profile_photos.php: Access denied for user 'nobody'@'localhost' (using password: NO)

    ...and every other pages!

    Seems that they visit/crawl each page ... Every day I get more error messages. WHAT DO DO??

  2. #2
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    You sent me a PM with more information - and in there - the key problem appears to be your mysql server is running out of connections - then all hell breaks loose.

    You may want to ask your host to turn off pconnect in php.ini - or you can mod your db.inc.php file to not use pconnect.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  3. #3

    Join Date
    Apr 2005
    Posts
    99

    Default

    I asked my host to disable it, but I'm on a shared server... so I do not know they are willing to do that.

    I searched through db.inc.php and find this part

    function connect()
    {
    if ( $this->connected )
    return;
    if (strlen($this->port)) $this->port = ":".$this->port;
    if (strlen($this->sock)) $this->sock = ":".$this->sock;
    $this->link = mysql_pconnect( $this->host . $this->port . $this->sock, $this->user, $this->passwd );
    if ( $this->link )
    $this->connected = TRUE;
    else
    $this->connected = FALSE;
    }

    How can I properly disable this function? I tried several things with no luck...

    --> the answer I just get from hostforweb:

    Does this software was developed for both versions of mysq_connect and mysql_pconnect? We have a limit max_user_connections=30 on the server. And I am not sure that I will be able to turn off mysql_pconnect via php.ini... I suppose that software should take care about this how to use mysql server.
    Last edited by raeyo; 09-25-2006 at 12:34 PM.

  4. #4
    ijk
    ijk is offline

    Join Date
    Apr 2005
    Posts
    340

    Default hi

    thought you would be interested in this thread

    Disable pconnect system wide
    AE Version 4.0 IQ

  5. #5

    Join Date
    Apr 2005
    Posts
    99

    Default

    I already read that but it gives me no solution how to disable pconnect in the script itself db.inc.php...

  6. #6
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    Quote Originally Posted by raeyo
    I already read that but it gives me no solution how to disable pconnect in the script itself db.inc.php...
    I added instructions for this to that thread:
    Disable pconnect system wide

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  7. #7
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    I need to split this pconnect thread off of How To Turn Off Register Globals

    The thread above is about register_globals

    This thread you are looking at now is some talk about pconnect.

    People are getting confused between pconnect and register_globals.

    Smoge
    Last edited by Smoge; 09-27-2006 at 11:59 PM.
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  8. #8
    rr1024's Avatar
    Join Date
    Mar 2005
    Posts
    152

    Default Why remove pconnect it works fine

    The main problem I have found with pconnect is the host does NOT know how to set up correctly but once it's set up right it works great. However I made this little for loop in my pconnect section of db.inc.php to handle the problem until the host finally found and fixed their problem.

    My moded version with Pconnect adding a for loop to retry conections.
    PHP Code:
                   for ( $i 0$i 75$i++ ) {
                         if ( !
    $this->link = @mysql_pconnect$this->host $this->port $this->sock$this->user$this->passwd ) ) {
                              
    usleep(50000);  #Not available on windows before PHP 5.0
                         
    }else{
                              BREAK;
                         }
                   }
    #[ END ] 1st for ( $i = 0; $i < DB_ATTEMPTS; $i++ ) 
    To remove Pconnect use
    PHP Code:
                   for ( $i 0$i 75$i++ ) {
                         if ( !
    $this->link = @mysql_connect$this->host $this->port $this->sock$this->user$this->passwd ) ) {
                              
    usleep(50000);  #Not available on windows before PHP 5.0
                         
    }else{
                              BREAK;
                         }
                   }
    #[ END ] 1st for ( $i = 0; $i < DB_ATTEMPTS; $i++ ) 
    Note I left the for loop in, this is because there are others on the same server and when their scripts go wild and hog connections I don't want to display an error until I've made at least 75 attempts to connect with a 50millisecond delay between attempts.

    Pconnector works great! There is no reason to remove it, if you are having problems more than likely it's not with Pconnect it's the way your host has it set up which is not correct.

    Pconnect reuses already open connections which is good and reduces connection resources.

    If you disable pconnecat as above then you will need to modify each page and add the mysql_close to the bottom of every page in Aedating
    Windows defined as 32 bit extensions and a graphical shell for a 16 bit patch to an 8 bit operating system originally coded for a 4 bit microprocessor, written by a 2 bit company that can't stand 1 bit of competition.
    -----------------------------------------------------
    My Aed site
    Adult Sex Toys My Web Real Estate Web Hosting Real Estate Realtors fed state taxes

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Disable pconnect system wide
    By Smoge in forum Database
    Replies: 17
    Last Post: 09-22-2007, 02:03 AM
  2. Replies: 1
    Last Post: 04-03-2007, 06:54 PM
  3. AEDating phpBB mod not showing up/pconnect issue
    By CiarraRose in forum General Troubleshooting
    Replies: 8
    Last Post: 12-12-2006, 12:09 PM
  4. Script Wide pconnect errors
    By mtaborn in forum Database
    Replies: 4
    Last Post: 08-09-2006, 11:03 AM
  5. Hosting Talk Guidelines
    By ModMySite in forum Web Hosting Talk
    Replies: 0
    Last Post: 08-14-2005, 05:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •