We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24393
    • 83 Posts
    nevermind, must have been a ram issue or something... please delete topic

    okay this actually is a legitimate issue...

    i am intermittently getting the following error when 1 viewing my website or 2 trying to log into the manager:
    « MODx Parse Error »
    
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Table 'modx_maxigallery' already exists »
          SQL: CREATE TABLE `cueartfo_modx`.modx_maxigallery ( `id` int(10) unsigned NOT NULL auto_increment, `gal_id` int(10) unsigned NOT NULL, `filename` tinytext NOT NULL, `title` text NOT NULL, `date` datetime NOT NULL, `descr` text default NULL, `pos` int(10) default NULL, `own_id` int(10) default NULL, `hide` int(1) default 0, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ; 
          [Copy SQL to ClipBoard]
     
    Parser timing
      MySQL:	0.0085 s	(22 Requests)
      PHP:	0.1072 s	 
      Total:	0.1157 s



    also, after trying to log into the manager the URL looks really bizarre:

    %3Cbr%20/%3E%3Cb%3EWarning%3C/b%3E:%20%20Unknown:%20write%20failed:%20No%20space%20left%20on%20device%20(28)%20in%20%3Cb%3EUnknown%3C/b%3E%20on%20line%20%3Cb%3E0%3C/b%3E%3Cbr%20/%3E%3Cbr%20/%3E%3Cb%3EWarning%3C/b%3E:%20%20Unknown:%20Failed%20to%20write%20session%20data%20(files).%20Please%20verify%20that%20the%20current%20setting%20of%20session.save_path%20is%20correct%20()%20in%20%3Cb%3EUnknown%3C/b%3E%20on%20line%20%3Cb%3E0%3C/b%3E%3Cbr%20/%3E

      stevesunderland.com
      GRAPHICS | INTERACTIVE | MARKETING
      xhtml + ajax + seo websites powered by modx
      • 7923
      • 4,213 Posts
      In maxigallery.php there is a section at the top of the file to check maxigallery database table:

      <?php
      //validate gallery table
      $mgtbl = $modx->db->query("show tables like '".$modx->db->config['table_prefix'].$mg->mgconfig['gtable']."'");
      if($modx->db->getRecordCount($mgtbl) == 0) {
      	if($mg->createTable() && $mg->checkCustomFields()) {
      		$descvalid = 1; 
      		$custposvalid = 1;	
      		$customfieldsvalid = 1;	// added by Bruno
      	}else{
      		$output = $mg->strings['database_error'];
      		return;
      	}
      } else {
      	$desc = $modx->db->query("DESC $mg->pics_tbl");
      	if($mg->isDescValid($desc)) {
      		$descvalid = 1;
      	}
      	if($mg->isPosValid($desc)) {
      		$custposvalid = 1;
      	}
      	if ($mg->checkCustomFields()) { // added by Bruno
          	$customfieldsvalid = 1;	
          }
      	if(!$mg->isOwnIDValid($desc)) {
      		$output = $mg->strings['database_error_field'].'own_id';
      		return;
      	}
      	if(!$mg->isHideValid($desc)) {
      		$output = $mg->strings['database_error_ownid'].'hide';
      		return;
      	}	
      }
      


      So it seems that the show tables query isn’t working for you and maxigallery tries to create that db table on every run. To fix it, you can just comment out that whole block as you already have the db table created.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 10449
        • 956 Posts
        Your 2nd error message suggests you don’t have enough hosting space anymore:

        write failed: No space left on device
        Failed to write session data (files). Please verify that the current setting of session.save_path is correct ()
        


        And something seems wrong with the session directory. It’s either not specified, or the system can’t write new session files to the hard drive anymore.