Search

I found in the past that working with a clean install gives me the best way to figure out how Symphony works by building from the ground up.

Based on the discussion about the database structure, I was wondering about how I might go about taking Symphony back to a clean install. Alistair mentioned that deleting fields and data is now as simple as dropping a table: DROP TABLE blah.

To zero out the data, then, I've run the following SQL:

 DROP TABLE `sym_entries_data_26` ,
 `sym_entries_data_27` ,
 `sym_entries_data_29` ,
 `sym_entries_data_30` ,
 `sym_entries_data_31` ,
 `sym_entries_data_34` ,
 `sym_entries_data_35` ,
 `sym_entries_data_36` ,
 `sym_entries_data_37` ,
 `sym_entries_data_38` ,
 `sym_entries_data_39` ,
 `sym_entries_data_40` ,
 `sym_entries_data_41` ,
 `sym_entries_data_43` ,
 `sym_entries_data_44` ,
 `sym_entries_data_45` ,
 `sym_entries_data_46` ,
 `sym_entries_data_47` ,
 `sym_entries_data_48` ,
 `sym_entries_data_49` ,
 `sym_entries_data_50` ,
 `sym_entries_data_51` ;

If there were 500 fields, how would I go about formulating a query? I know the following won't work:

 DROP TABLE `sym_entries_data_*`

What might I try instead?

Then, to remove data from all the other tables except for login info, I used TRUNCATE:

 TRUNCATE TABLE sym_cache;
 TRUNCATE TABLE sym_entries;
 TRUNCATE TABLE sym_extensions;
 TRUNCATE TABLE sym_extensions_delegates;
 TRUNCATE TABLE sym_fields;
 TRUNCATE TABLE sym_fields_author;
 TRUNCATE TABLE sym_fields_checkbox;
 TRUNCATE TABLE sym_fields_date;
 TRUNCATE TABLE sym_fields_input;
 TRUNCATE TABLE sym_fields_sectionlink;
 TRUNCATE TABLE sym_fields_select;
 TRUNCATE TABLE sym_fields_taglist;
 TRUNCATE TABLE sym_fields_textarea;
 TRUNCATE TABLE sym_fields_upload;
 TRUNCATE TABLE sym_forgotpass;
 TRUNCATE TABLE sym_pages;
 TRUNCATE TABLE sym_pages_types;
 TRUNCATE TABLE sym_sections;
 TRUNCATE TABLE sym_sections_association;

Then, I deleted all the files in the workspace, but retained the directory structure.

Does that sound about right to have a working clean install?

So far, it appears to be working well. Extensions are disabled, so the first thing to do would be to enable the Markdown extension. This could probably be avoided by keeping the extensions data by removing the TRUNCATE TABLE sym_extensions; command from the SQL listed above.

Deleting a section drops all the related table doesn't it? Is there a particular reason why you're dropping them manually via SQL?

Call me a freak, but I would like my sym_entry_data_xx table numbers to start at 1. No other reason really. I like to see what's going on in the database as I add sections, pages and entries to get a feel for what Symphony is doing in the database.

you aren't a freak bauhouse... :)

I was thinking the same thing when I saw those numbers, hehe...

Call me a freak, but I would like my symentrydata_xx table numbers to start at 1.

And I thought I would be a freak by saying that lol

You know, the condition of being a freak is that you're in the minority group. So far, you're amongst the majority!

you've got a ton of ANAL developers on your hands Allen...

I'm pretty sure that's a good thing...

/me giggles like a little school girl

There is an easier way. Via the Admin, delete everything (uninstall any extensions). Then, goto your DB and set the AUTO INCREMENT values on all your tables to 1.

ALTER TABLE  `sym_blah` AUTO_INCREMENT=1

Head back to Symphony, enable whatever extensions you want, and use the "Create Ensemble" action to create your own clean build. That should do it.

Thanks, Alistair. So all the tables need to be reset?

 ALTER TABLE sym_cache AUTO_INCREMENT=1;
 ALTER TABLE sym_entries AUTO_INCREMENT=1;
 ALTER TABLE sym_extensions AUTO_INCREMENT=1;
 ALTER TABLE sym_extensions_delegates AUTO_INCREMENT=1;
 ALTER TABLE sym_fields AUTO_INCREMENT=1;
 ALTER TABLE sym_fields_author AUTO_INCREMENT=1;
 ALTER TABLE sym_fields_checkbox AUTO_INCREMENT=1;
 ALTER TABLE sym_fields_date AUTO_INCREMENT=1;
 ALTER TABLE sym_fields_input AUTO_INCREMENT=1;
 ALTER TABLE sym_fields_sectionlink AUTO_INCREMENT=1;
 ALTER TABLE sym_fields_select AUTO_INCREMENT=1;
 ALTER TABLE sym_fields_taglist AUTO_INCREMENT=1;
 ALTER TABLE sym_fields_textarea AUTO_INCREMENT=1;
 ALTER TABLE sym_fields_upload AUTO_INCREMENT=1;
 ALTER TABLE sym_forgotpass AUTO_INCREMENT=1;
 ALTER TABLE sym_pages AUTO_INCREMENT=1;
 ALTER TABLE sym_pages_types AUTO_INCREMENT=1;
 ALTER TABLE sym_sections AUTO_INCREMENT=1;
 ALTER TABLE sym_sections_association AUTO_INCREMENT=1;

Guess it isn't all the different to truncating hey. ;) but yea, that would do it.

I created a clean build with one author and a home page with a basic <h1>Hello World</h1>. Then I created an ensemble. The ZIP file appeared to have some problems, though. I could not open it (Mac OS X 10.5.1) in the finder.

 Unable to unarchive "symphony-2-beta-clean-ensemble.zip" into "ensembles". (Error 1 - Operation not permitted.)

I used terminal and the file structure was created, but all files were empty. I am getting errors like this in terminal:

 warning:  filename too long--truncating.
 [ install.php?\ys+Z????z?A?I^U?+-H-?7?+N?E,^F+h^C??}?6$^Y-D^R?g=?_^_-l^F^L^N?g&?T?t?O??_/g?+^M?-???-ܯ?f-????-^UͶ_?^XAb%]+?W^R++".?p^\?4??+^_s??^\?_??f?,]+-2?9f8?^\ۺ??gL+???U??? s^F?2/??j?_??^[??}??^W^U???9C`??#+?^P;?!O?+?~?/?????+sB????7ti?=\??i}?????+?^S\??^M-7^Z?1t^Q?~??g+?-}?r^W/U?O???ئ^^^_^]?z8?]??^G?^VuЧ?????k??+w?^F?X?K?p?b^Y+^[?a,J?Ld+,-^V^K??=ި4?/??F)?^Y-?8?ä>)C-ͦ^[,~??Bk????^G^Z+???@+>G?H?^P?+irA?+?v???+??>+%w?-S???+?^I^X8sv??3-?>>0\?-3 ^D^R?^L+-U6^[?r8^L+?30=wJ^R???d?hk4-???w,[?????^]^W^Ob?+^ZJ?r??mg? ]
 install.php:  mismatching "local" filename (install.php?\ys+Z????z?A?I^U?+-H-?7?+N?E,^F+h^C??}?6$^Y-D^R?g=?_^_-l^F^L^N?g&?T?t?O??_/g?+^M?-???-ܯ?f-????-^UͶ_?^XAb%]+?W^R++".?p^\?4??+^_s??^\?_??f?,]+-2?9f8?^\ۺ??gL+???U??? s^F?2/??j?_??^[??}??^W^U???9C`??#+?^P;?!O?+?~?/?????+sB????7ti?=\??i}?????+?^S\??^M-7^Z?1t^Q?~??g+?-}?r^W/U?O???ئ^^^_^]?z8?]??^G?^VuЧ?????k??+w?^F?X?K?p?b^Y+^[?a,J?Ld+,-^V^K??=ި4?/??F)?^Y-?8?ä>)C-ͦ^[,~??Bk????^G^Z+???@+>G?H?^P?+irA?+?v???+??>+%w?-S???+?^I^X8sv??3-?>>0\?-3 ^D^R?^L+-U6^[?r8^L+?30=wJ^R???d?hk4-???w,[?????^]^W^Ob?+^ZJ?r??mg?),
          continuing with "central" filename version
 install.php:  unknown compression method

Anyone having success with the "Create Ensemble" feature?

yikes. That is not normal. we've never had any problems. strange.. Does every file in the archive have the same issue?

Yeah, pretty strange. All the files were created, but all are 0 Kb.

But that only worked when I forced it through terminal.

The "Create Ensemble" file action worked fine on my remote server:

  • TextDrive Shared
  • PHP 5.1.4
  • MySQL - 4.1.18-log

Apparently, the not normal problems are happening only in my local hosting environment:

  • Mac OS X 10.5.1
  • Apache 2
  • PHP 5.2.4
  • MySQL 5.0.27-max

Is there something that I might be missing in my local PHP install that would be causing this problem?

Shouldn't be. Perhaps something isn't getting escaped correctly. Has anyone else had problems with creating Ensembles?

No.

Btw, I haven't had a look at Ensambles before: Do they include the database structure as well?

The easiest way to explain it is like this:

Symphony 2 Beta zip archive is an ensemble.

There you go. All the information you need. ;) It contains the table structure, data, extensions, workspace, symphony folders and a customised installer, all wrapped up into a zip archive.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details