1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Can open the plesk page - mysql php error

Discussion in 'Plesk for Linux - 8.x and Older' started by robstarox, Jul 11, 2005.

  1. robstarox

    robstarox Guest

    0
     
    I get this error when i attempt to open the plesk page

    Im thinking this could be bad and the mysql db is gone.. I dont no where the db is located. Can someone help me please? Can i fix it?

    Unable to query: Can't find file: 'sessions.MYD' (errno: 2)

    --------------------------------------------------------------------------------
    0: /usr/local/psa/admin/plib/class.Session.php:1 psaerror(string "Unable to query: Can't find file: 'sessions.MYD' (errno: 2)")
    1: /usr/local/psa/admin/plib/class.Session.php:1 session->isexpired()
    2: /usr/local/psa/admin/auto_prepend/auth.php3:1 session->init()
    ----------------------------------------------------------------
     
  2. voodoochile

    voodoochile Guest

    0
     
    There's been corruption of your sessions table.

    you can get into mysql by running /usr/local/psa/mysql/bin/mysql -u admin -p

    It'll prompt for a password and this is usually your admin login password.

    do a
    Code:
    use psa; 
    check table sessions; 
    This has cleared it up for me in the past. Also, I can't stress this enough, you should do a complete dump of the database (or what you can) before you do anything, you don't want to damage anything further.
     
  3. robstarox

    robstarox Guest

    0
     
    Screwed ? Help!

    I take it this is pretty bad... Any way to recreate the tabless ?

    Didn't find any fields in table 'sessions'
    Connection id: 405
    Current database: psa

    mysql> check table sessions;
    +--------------+-------+----------+--------------------------------------------+
    | Table | Op | Msg_type | Msg_text |
    +--------------+-------+----------+--------------------------------------------+
    | psa.sessions | check | error | Can't find file: 'sessions.MYD' (errno: 2) |
    +--------------+-------+----------+--------------------------------------------+
    1 row in set (0.00 sec)
     
  4. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Did you just try an upgrade to 7.5.3? I have seen several posts similar to this.
    [Edit] Sorry my brain is not working. The others appear to have been related to upgrading mySQL or some such.
     
  5. robstarox

    robstarox Guest

    0
     
    Another idea?

    Well the problem occured due to disk space.
    Disk utilization is @ 100% , So im assuming that was the cause of the failure to begin with. I am using 7.5.3 , can i just clear up some disk space and re-install plesk? Will I lose all the setting etc? Or would that work out ok?

    Or is it possible for me to just recreated the tables on sessions.myd?
     
  6. jamesyeeoc

    jamesyeeoc Guest

    0
     
  7. hardweb

    hardweb Guest

    0
     
    Free some diskspace and recreate the sessions table, that's all you must do.
     
  8. robstarox

    robstarox Guest

    0
     
    How to recreate sessions db

    What do i need to do to recreate it?
     
  9. jamesyeeoc

    jamesyeeoc Guest

    0
     
  10. voodoochile

    voodoochile Guest

    0
     
    Dude, really, postcount is not everything.

    If you don't know, don't post, really.*





























    *Not kidding. Disk space has NOTHING to do with database issues like that. Don't throw BS into the ring and confuse people that may not know better.


    edit: for some bit of relevancy... According to james, Plesk doesn't use that table anymore. If so, what the PSA dude above me said has no bearing. I'm not sure how PSA handles it's sessions, so I can't really offer any help here. Sorry. If it's a MySQL problem, holla though. =)
     
  11. robstarox

    robstarox Guest

    0
     
    Well I read the other post

    I read the other post but it really didnt help.

    I tried all the commands to re-do the DB but here is what i get

    mysql> connect psa;
    mysql> show tables;
    +-------------------+
    | Tables_in_psa |
    +-------------------+
    | Cards |
    | ClientsTraffic |
    | Components |
    | DomainServices |
    | DomainsTraffic |
    | IP_Addresses |
    | Limits |
    | ListsParams |
    | Logos |
    | MailLists |
    | Notes |
    | Notifications |
    | Parameters |
    | Permissions |
    | Repository |
    | SiteAppPackages |
    | SiteAppResources |
    | SiteApps |
    | Skins |
    | Templates |
    | TmplData |
    | WebApps |
    | accounts |
    | actions |
    | anon_ftp |
    | badmailfrom |
    | certificates |
    | cl_param |
    | client_reports |
    | clients |
    | cp_access |
    | custom_buttons |
    | data_bases |
    | db_users |
    | disk_usage |
    | dns_masters |
    | dns_recs |
    | dns_recs_t |
    | dom_level_usrs |
    | dom_param |
    | domain_reports |
    | domains |
    | event_handlers |
    | forwarding |
    | hosting |
    | locales |
    | lockout |
    | log_actions |
    | log_components |
    | log_rotation |
    | mail |
    | mail_aliases |
    | mail_redir |
    | mail_resp |
    | mailer_queries |
    | misc |
    | mn_param |
    | pd_users |
    | protected_dirs |
    | resp_attach |
    | resp_forward |
    | resp_freq |
    | sa_conf |
    | sa_list |
    | sessions |
    | slave_params |
    | slaves |
    | smtp_poplocks |
    | stat |
    | subdomains |
    | sys_users |
    | tts_cats |
    | tts_conf |
    | tts_priorities |
    | tts_queues |
    | tts_reporters |
    | tts_slave_info |
    | tts_ticket_events |
    | tts_tickets |
    | upgrade_history |
    | web_users |
    +-------------------+
    81 rows in set (0.00 sec)

    mysql> describe sessions;
    ERROR 1017: Can't find file: 'sessions.MYD' (errno: 2)



    I tried all the commands to
    4. ALTER TABLE `sessions` ADD `type` SMALLINT( 5 ) UNSIGNED DEFAULT '0' NOT NULL ,
    ADD `ip_address` VARCHAR( 15 ) NOT NULL ,
    ADD `login_time` DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL ,
    ADD `click_time` TIMESTAMP( 14 ) ;



    mysql> CREATE TABLE sessions (
    -> sess_id CHAR(33) PRIMARY KEY -- cookie value
    -> , type SMALLINT UNSIGNED NOT NULL -- session type (IS_ADMIN, IS_RESELLER, IS_CLIENT...)
    -> , login VARCHAR(255) NOT NULL
    -> , ip_address char(15) NOT NULL -- IP Address number in a dot notation
    -> , login_time DATETIME NOT NULL
    -> , click_time TIMESTAMP NOT NULL
    -> ) TYPE=INNODB;
    ERROR 1050: Table 'sessions' already exists



    So what do i do now.. I assume I need to delete the table to start from scratch?
     
  12. voodoochile

    voodoochile Guest

    0
     
    Code:
    DROP TABLE IF EXISTS `sessions`;
    CREATE TABLE `sessions` (
      `sess_id` varchar(33) NOT NULL default '',
      `type` smallint(5) unsigned NOT NULL default '0',
      `login` varchar(255) NOT NULL default '',
      `ip_address` varchar(15) NOT NULL default '',
      `login_time` datetime NOT NULL default '0000-00-00 00:00:00',
      `click_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
      PRIMARY KEY  (`sess_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    
    
    That'll drop and rebuild the table right there for ya. It also appears as if sessions is being activley used for tracking, well, sessions, so my apologies to PSA dude up above.

    edit: this is for 7.5.3 under FreeBSD, I dunno if the schema changes between the OS builds. :shrug: Also, I'd forgotten that they changed over to innodb tables, which would explain why the standard 'check table' wouldnt' work
     
  13. robstarox

    robstarox Guest

    0
     
    ah ****... that fix sort of worked and sort of didnt

    I decided to try and upgrade plesk to 7.5.3 after i fixed the db, because i was having other issues...now I got a different issue...damnit... the upgrade was from 7.0.4 to 7.5.3 ...
    now when i open the plesk page is says version 7.0.4 even though i tried an upgrade to 7.5.3 and it gives me these errors.


    ERROR
    Table 'psa.ControlVisibility' doesn't exist
    0: /usr/local/psa/admin/plib/visibility.php:148 psaerror(string "Table 'psa.ControlVisibility' doesn't exist")
    1: /usr/local/psa/admin/plib/visibility.php:291 getvisibilitycustomizations(string "/login_up.php3")
    2: /usr/local/psa/admin/plib/visibility.php:300 getvisibility(string "login", boolean true, NULL "")
    3: /usr/local/psa/admin/plib/elements.php3:180 iscontrolvisible(string "login", boolean true)
    4: /usr/local/psa/admin/plib/elements.php3:106 fetch_hideable_button(string "commonButton", string "login", string "", string "", boolean false, string "", string "return login_oC(document.forms[0], document.forms[1])", boolean true, integer "3", boolean false, boolean false)
    5: /usr/local/psa/admin/htdocs/login_up.php3:765 comm_button(string "login", string "", string "return login_oC(document.forms[0], document.forms[1])", boolean true, integer "3")



    Am I screwed or is there a way to remove 7.5.3 and convert back to 7.0.4 ? Or can I just fix those errors I am recieving some how? I think i was gettting those errors prior to the upgrade attempt anyways....hhmm
     
  14. robstarox

    robstarox Guest

    0
     
    disregard the last post... i fixed it.... but the plesk license is now gone and nothing works.... great... i guess its time for a fresh clean install....wonder f'n ful ....


    Should of done that from the get go... wasted alot of time..
     
Loading...