Remote install raises new problem

Remote install raises new problem

Postby nerak99 on Wed Oct 12, 2011 12:41 pm

Having fixed the depreacated mysql sql, I have tried to install remotely to a remote debian server with similar kernel, earlier mysql so should not have deprecation issue anyway.

php 5.3.8-ZS5.5.0 though as opposed to just 5.3.8

Anyway
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

I am assuming this is apache user access issue and have emailed my host service.

I will report back
nerak99
 
Posts: 12
Joined: Wed Oct 12, 2011 3:55 am
LifeType Version: 2.1.11

Re: Remote install raises new problem

Postby jondaley on Wed Oct 12, 2011 10:17 pm

Can you share your code so others can benefit from your work?

Usually 500 server errors can be seen in the apache error log, and you can usually diagnose them yourself - my guess would be a line in the .htaccess file needs to be commented out (for my hosting, I have to comment out a couple lines towards the top - the server is already setup correctly, and doesn't allow users to modify the settings)
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Remote install raises new problem

Postby nerak99 on Thu Oct 13, 2011 4:39 pm

Hey sorry, just got back, will post the code change as you asked. As for this issue, my very supportive hoster looked at my white screen of php failure and posted this back to me

On 13 October 2011 20:07, your friendly host service wrote:

To see the error message I added a line at the top of class/bootstrap.php:

ini_set('display_errors', true);

Here's the message:

Fatal error: Cannot redeclare class locale. If this code worked without the Zend Optimizer+, please set zend_optimizerplus.dups_fix=1 in your php.ini in /home/brian/www/public/lifetype/class/object/loader.class.php on line 7

So the code redeclared a class, using "include" rather than "include_once" in its autoloader which I think is technically wrong.

However changing the Zend Optimizer+ setting did fix the problem.

LifeType Installation will give a warning message about the file class/bootstrap.php because I had made the change above (now reverted).

From inside the LifeType folder I ran:

chmod o+w config/config.properties.php

because the installation wants that file to be writable by the web server. I expect you'll have to reverse that change after installation.

It looks like you're OK to proceed now.
nerak99
 
Posts: 12
Joined: Wed Oct 12, 2011 3:55 am
LifeType Version: 2.1.11

Re: Remote install raises new problem

Postby nerak99 on Fri Oct 14, 2011 6:31 am

Well not quite actually,
I am now getting this error

Fatal error: Call to undefined method Locale::getLocaleFolder() in /home/brian/www/public/lifetype/class/locale/localefinder.class.php on line 20

Which I am working on. I would be grateful for help as I am not a php programmer. It may be that php-xxx is not installed on the server.

While rerunning wizard.php at this point you will get another error due to the fact that all the tables exist by this time and so to rerun the wizard you need to clear all the tables.
I found a script which I will paste here for the benefit of others. The original source of the script is included in the script. The reason to use this script is that your cli access to mysql allows you to delete one table at a time or the whole database but not all the tables in one go unless you dropt the whole database. However, if you drop the whole database, you may not have the access rights to create a new empty database on your host server. You will be able to create tables.
Obviously, wizard,php could be edited to see if the tables are already there and drop them before proceeding. This also assumes that the only use of the database is for lifetype.

A line like this at the bash prompt will do the job for you for a database user called "dbusername", password "xpwpwpwx", database called lifetypedbname which is running on the localhost of your service provider.

droptable.sh dbusername xpwpwpwx lifetypedbname localhost

Code: Select all
#!/bin/bash
# A shell script to delete / drop all tables from MySQL database.
# Usage: ./script user password dbname
# Usage: ./script user password dbname server-ip
# Usage: ./script user password dbname mysql.nixcraft.in
# -------------------------------------------------------------------------
# Copyright (c) 2008 nixCraft project <http://www.cyberciti.biz/fb/>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# ----------------------------------------------------------------------
# See URL for more info:
# http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/
# ---------------------------------------------------

MUSER="$1"
MPASS="$2"
MDB="$3"

MHOST="localhost"

[ "$4" != "" ] && MHOST="$4"

# Detect paths
MYSQL=$(which mysql)
AWK=$(which awk)
GREP=$(which grep)

# help
if [ ! $# -ge 3 ]
then
        echo "Usage: $0 {MySQL-User-Name} {MySQL-User-Password} {MySQL-Database-Name} [host-name]"
        echo "Drops all tables from a MySQL"
        exit 1
fi

# make sure we can connect to server
$MYSQL -u $MUSER -p$MPASS -h $MHOST -e "use $MDB"  &>/dev/null
if [ $? -ne 0 ]
then
        echo "Error - Cannot connect to mysql server using given username, password or database does not exits!"
        exit 2
fi

TABLES=$($MYSQL -u $MUSER -p$MPASS -h $MHOST $MDB -e 'show tables' | $AWK '{ print $1}' | $GREP -v '^Tables' )

# make sure tables exits
if [ "$TABLES" == "" ]
then

        echo "Error - No table found in $MDB database!"
        exit 3
fi

# let us do it
for t in $TABLES
do
        echo "Deleting $t table from $MDB database..."
        $MYSQL -u $MUSER -p$MPASS -h $MHOST $MDB -e "drop table $t"
done

nerak99
 
Posts: 12
Joined: Wed Oct 12, 2011 3:55 am
LifeType Version: 2.1.11

Re: Remote install raises new problem

Postby nerak99 on Fri Oct 14, 2011 8:49 am

I collided with the Locale issue here and fetched the latest core release. This has renamed the classes involved to ltxxxx.
Anyway, this has worked OK and the php version was php 5.3.8
My local install installed OK initially but failed after restart and this is also php 5.3.8.
My remote host is mysql <5.5 and so the deprecations are not yet an issue but they are likely to become issues later.

Anyway, thanks for listening everyone.
Hopefully I have now got a blogging system that a) works and b) is not Wordpress.

Not that there is anything particularly wrong with Wordpress I just like using different stuff.
nerak99
 
Posts: 12
Joined: Wed Oct 12, 2011 3:55 am
LifeType Version: 2.1.11

Re: Remote install raises new problem

Postby jondaley on Tue Oct 18, 2011 12:40 pm

FYI: the trunk (version 2) code is not at all ready for release, and hasn't been checked for security or other issues in the new features. If you are up for working on it, that would be great. I wouldn't trust it to let other people login and use the administration interface. I know there are some CSRF issues, because the CSRF stuff from 1.2 haven't been ported yet.

(though now I realize you wrote "2.1" as the version you are using, and I think the trunk is still called 2.0 isn't it?
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Remote install raises new problem

Postby nerak99 on Thu Nov 03, 2011 8:09 am

lifetype-1.2_r7139 is my version, not 2.1 sorry to mislead you. I am happy to do some testing for you. I an rig up a variety of test scenarios as well as fault find and debug. so HTH
nerak99
 
Posts: 12
Joined: Wed Oct 12, 2011 3:55 am
LifeType Version: 2.1.11


Return to Configuration and Installation

cron