I "kinda" thought I understood the basics of getting Xataface going on a new server, but something seems to have eluded me.
I installed the latest incarnation - 1.3rc6 (from the tarball)
on a Centos VPS running PHP Version 5.1.6
After FTP'ing the files into place, I used SSH to chown the /xataface/Dataface/templates_c folder to apache:apache, and chmod'ed 775.
I did the installation test, no problems (apparently) - Got the AOK (who knows)
Dataface 1.3rc6 2510
Installed at /xataface
Installation status INSTALLED CORRECTLY
Templates Dir /var/www/vhosts/argituz.org/subdomains/ml/httpdocs/xataface/Dataface/templates
Templates Compile Dir /var/www/vhosts/argituz.org/subdomains/ml/httpdocs/xataface/Dataface/templates_c
set up my new database and local user with phpMyAdmin - gave user all privileges on the new database.
OK, time to run web setup
navigated to http://ml.argituz.org/xataface
Got prompted for MySQL user and PW, no problem
Xataface asked me to select database, no problem
I first tried the tarball method -
I got an odd thing - a zero-byte tarball.
so, of course, I suspect (as I really don't know that much) that the xataface/Dataface/templates_c folder is the culprit.
but plinking on that doesn't seem to have an effect.
Somewhere in my head, I think this is a PHP session or a permissions for workspace issue
Got it
It 'sorta' is - its related to PHP Safe Mode - which I don't seem to be able to control, although my php.ini now says:
- Code: Select all
safe_mode = Off
; By default, Safe Mode does a UID compare check when
; opening files. If you want to relax this to a GID compare,
; then turn on safe_mode_gid.
safe_mode_gid = Off
I checked my phpinfo(), and that (/etc/php.ini) is the config file in use, and zero others found on server. Although safe_mode was 'Off', I tried things with the sage_mode_gid = On also - no dice.
and YES - I restarted each time, even took the container down.
- Code: Select all
[Tue Aug 16 12:23:25 2011] [error] [client 70.88.58.12] PHP Warning: set_time_limit() [<a href='function.set-time-limit'>function.set-time-limit</a>]: Cannot set time limit in safe mode in /var/www/vhosts/argituz.org/subdomains/ml/httpdocs/xataface/installer.php on line 24, referer: http://ml.argituz.org/xataface/installer.php
I guess I could comment that out - while I query the host's help desk.
BUT - I'm also still getting this (which seems to be what is killing the tarballs)
- Code: Select all
[Tue Aug 16 12:23:45 2011] [error] [client 70.88.58.12] PHP Notice: Undefined variable: compression in /var/www/vhosts/argituz.org/subdomains/ml/httpdocs/xataface/installer.php on line 389, referer: http://ml.argituz.org/xataface/installer.php?-action=db2app
this appears to be the offender:
looks like $compression is not set - must be failing that regex
- Code: Select all
function archive2app__process($values){
require_once 'Archive/Tar.php';
if ( preg_match('/\.gz$/', $_FILES['archive']['name']) ){
$compression = 'gz';
} else {
$compression = null;
}
$archive = new Archive_Tar($_FILES['archive']['tmp_name'], $compression);
...
default: // download_tarball
//$tarpath = $_FILES['archive']['tmp_name'];
if ( $compression == 'gz' ){
$mimetype = 'application/x-gzip';
} else {
$mimetype = 'application/x-tar';
}
header('Content-type: '.$mimetype);
header('Content-Disposition: attachment; filename="'.basename($tarpath).'.tar.gz"');
echo file_get_contents($tarpath);
exit;
(the following both caused by Safe Mode issue, I guess)
- Code: Select all
[Tue Aug 16 13:04:20 2011] [error] [client 70.88.58.12] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: SAFE MODE Restriction in effect. The script whose uid is 10002 is not allowed to access /tmp/quotations_baseqlaAbV owned by uid 48 in /var/www/vhosts/argituz.org/subdomains/ml/httpdocs/xataface/installer.php on line 396, referer: http://ml.argituz.org/xataface/installer.php?-action=db2app
[Tue Aug 16 13:04:20 2011] [error] [client 70.88.58.12] PHP Warning: file_get_contents(/tmp/quotations_baseqlaAbV) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: Success in /var/www/vhosts/argituz.org/subdomains/ml/httpdocs/xataface/installer.php on line 396, referer: http://ml.argituz.org/xataface/installer.php?-action=db2app
---------------------------------------------------------------------------------------
OK, I'm at the tag end of what I know to fix this,
Oddly enough - the FTP client won't attach, although I am quite sure I handed over good credentials. Oh well - I'm going to check out the 'script method' here in a bit while this gets sorted out. Really quite odd. (no errors drawn, it just doesn't think the credentials are good.)
Thanks to all