This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

Cannot Login to index.php after upgrade


  1. sjones
    Member

    I have a rather strange problem that I have not seen in the forum.
    I performed the upgrade from 2.1 to 3. I followed the instructions exactly as listed.

    I run upgrade.php page and am asked for my email and license number. I enter them and click okay and it appears the upgrade is performed. A blank page opens up.

    If i try to run the index.php page, it redirects to the installer.pgp page and I get the message "Your MachForm already installed and ready.You can login to the admin panel to create/edit your forms." There is a button below that says "Login to Machform" Clicking the button does nothing. It appears to try and go to the index.php page but is redirected back to the installer.php page.

    Any suggestions?

    Thanks

    Steve

    Posted 12 years ago #
  2. AMurray
    Pro Member

    I'm no expert on this stuff, but I believe the solution below may explain the behaviour you see.

    I would assume you are following these instructions to upgrade, not a clean install (?) : http://www.appnitro.com/upgrading-machform

    If you open up index.php, and go to the section below, it tells you that will direct to installer immediately if it doesn't find ap_forms table in your database.

    This suggests you are trying to upgrade to MF V3 using a new database (or at least the database, for some reason doesn't contain ap_forms - which would contain previously created forms data/information i.e. those created in previous MF version you are upgrading from) rather than your existing DB used for MF 2.x. You need to use the same database so V3 installation can migrate and upgrade the database to suit V3. That is, the details in the old config.php file used for version 2; copy/re-enter the same database/user/hostname detail into the new V3 config.php file.

    When upgrading, and you fill in this section of the new config.php, you need to define the details using those from the old config.php file used for V2

    define('MF_DB_NAME', 'your_DB_name'); //The name of your database. Note that this database must exist before running installer.php.
    define('MF_DB_USER', 'your_DB_user'); //Your database username
    define('MF_DB_PASSWORD', 'your_DB_Password'); //Your database users password
    define('MF_DB_HOST', 'your_db_host_name'); //The hostname for your database

    Once the install/upgrade is done you then republish in the existing 'data' folder to its original location (from your V2 install) ensuring you back it up/transfer it back to your PC from the server first).

    The code in index.php mentioned above is below, and the comment explains why it may be redirecting to the install.php constantly rather than allowing you to login.

    //immediately redirect to installer page if the config values are correct but no ap_forms table found
    	$query = "select count(*) from ".MF_TABLE_PREFIX."settings";
    	$sth = $dbh->prepare($query);
    	try{
    		$sth->execute($params);
    	}catch(PDOException $e) {
    		header("Location: http{$ssl_suffix}://".$_SERVER['HTTP_HOST'].mf_get_dirname($_SERVER['PHP_SELF'])."/installer.php");
    		exit;

    Can you open your database in phpMyAdmin and check for the existence of ap_forms table? If its not there, you would appear to be using a new database with no existing forms created in V2.

    So, to fix this, you need to change your config.php to the details of your DB used in V2.

    This may not be the only explanation so if it still causing trouble (after you have checked the DB as above), I suggest you submit an installation request to Yuniar.

    Yuniar: I think maybe the upgrade instruction need to make it clear that the upgrade should use the same database as used for V2.x and not a new DB.

    Posted 12 years ago #
  3. yuniar

    Steve -- if you only see a blank page instead of success message indicating completed upgrade, then most likely the upgrade wasn't successful.

    Try to run the upgrade.php file again. However, before doing so, edit your upgrade.php file around line 19:

    define('SKIP_DB_BACKUP',false);

    change that line of code to become:

    define('SKIP_DB_BACKUP',true);

    save the file and run the upgrade script again.


    MachForm Founder

    Posted 12 years ago #
  4. sjones
    Member

    Hi Yuniar: I did as you suggested and the upgrade went through properly.

    I now have another problem. I cannot edit any forms except for the first one. I have 4 pages of forms and if you click on any form other than the first one, or click on any of the 4 pages at bottom, nothing happens.

    Any suggestions for this?

    Thanks
    Steve

    PS If I click on the Settings Link, I do go to the settings page. License Information shows Custome ID - none and Name - none. I did enter my license code during the upgrade when asked.

    Posted 12 years ago #
  5. sjones
    Member

    After a little more digging, I realized a new version (3.1) was available as of yesterday. I downloaded and installed and now I can access my forms. I could also click on the ACTIVATE link and it worked.
    If I could make a suggestion that the top of the Forum have a reference to what version is available and the date released. I had just upgraded on the 17th and didn't think it would have had an upgrade already.

    Posted 12 years ago #
  6. AMurray
    Pro Member

    The announcement of Machform 3.1 is a 'sticky' post (which means it should remain at the top)....

    Posted 12 years ago #

RSS feed for this topic

Reply