Strange error in Installer

Archived from the Xataface Users forum.

jonbfl — Sat Sep 10, 2011 12:08 pm

Hello All

I was doing pretty good I thought then ka-boom.

I’ve built another test DB, to test using the Xataface relationship construct. Database seems OK, created with MySQL WB, then forward-engineered, looks OK in phpMyAdmin.

I’m doing this on one of the two Linux workstations I have, one with multiple Xataface apps already working. In fact, its my ‘working installer’.

When I make the connection, everything goes AOK. I get a connection, pick the database - then I pick ‘tarball’ for the method.

When the output downloads and I try to open it I get an error/squawk -

gzip: stdin: not in gzip format
/bin/gtar: Child returned status 1
/bin/gtar: Error is not recoverable: exiting now

I tried the ‘clear_cache’ thingy - nope -
I’m pretty sure I checked the permissions and ownership of files and folders in xataface correctly.

I haven’t built a new app in about ten days, so I can’t say when this went boom.

OK, I tried a different browser (Firefox instead of Chrome) and re-booted also. Also tried different Archive tool - corrupt.

Good news is - I have learned enough that I really don’t have to have the app generator. But it is handy. Edited - (Yay, the app launched)
Still have the installer spitting bad tarballs though.

Any and all thoughts are welcome.

Thanks!


jonbfl — Fri Sep 16, 2011 11:52 am

Hi

I took the time today to dig out the error -

[10-Sep-2011 20:26:46] PHP Notice: Undefined variable: compression in /opt/lampp/htdocs/xataface/installer.php on line 389

This installer ‘used to work’. Gzip seems to be intact, I just used phpMyAdmin to export a gzipped .SQL and I was able to open and extract OK.

Oh well, as I said ‘not critical’ at this point, but I am weirded out a bit by it..

Thanks again


shannah — Fri Sep 16, 2011 12:10 pm

The following diff should fix this issue:

Code: Select all
macbook:xataface-1.3.x shannah$ svn diff -r 2743:2744 . Index: installer.php =================================================================== --- installer.php   (revision 2743) +++ installer.php   (revision 2744) @@ -315,7 +315,8 @@       require_once 'Archive/Tar.php';       $tarpath = tempnam('/tmp',strval($values['database_name']));       //echo $tarpath; -      $archive = new Archive_Tar($tarpath,'gz'); +      $compression='gz'; +      $archive = new Archive_Tar($tarpath,$compression);       $path = strval($values['database_name']);       $archive->addString($path.'/.htaccess', '<FilesMatch "\.ini$"> Deny from all

jonbfl — Thu Sep 29, 2011 4:20 pm

Hello Steve

Heh - a little humility needed here - I DO need the installer for some tasks.

Sooo - I ran into a problem with that diff -

[root@localhost xataface]# patch –dry-run <installer.patch
patching file installer.php
patch: **** malformed patch at line 16: Deny from all

Code: Select all
function db2app__process($values){       require_once 'Archive/Tar.php';       $tarpath = tempnam('./tmp',strval($values['database_name']));       //echo $tarpath;       $compression='gz';         $archive = new Archive_Tar($tarpath,$compression);       $path = strval($values['database_name']);       $archive->addString($path.'/.htaccess', '<FilesMatch "\.ini$"> Deny from all </FilesMatch>');

OK I did fix it - I think what screwed things was that embedded linefeed in the part that apparently is supposed to ‘tag on’ the .htaccess.ini - BUT - importantly for me - I was able to generate a good tarball that got my full-size project enumerated

“never put off what you can do today and all that” strikes again -

Thanks for all your help.