Installation failed on windows machine
  • Hi!

    I recently discovered your software and I liked the online demo. I decided to jump to next step and install it on my own computer to try it further.

    When installing Campsite on my developer's environment (Windows 7 x64, Apache 2.2.15 x86, PHP 5.3.2 VC9 x86, MySQL 5.1.44 x64) it fails after clicking next on 'Sample Site' step.

    Fatal error: Call to a member function Execute() on a non-object in D:\wwwfiles\testing\test_camp\install\classes\CampInstallati onBase.php on line 430

    Looks like $g_db is not initialized in 'finish' case of 'CampInstallationBase->execute'. When crontab fails on function 'saveCronJobsScripts' and database value 'ExternalCronManagement' is updated, $g_db is a non object and fails.

    Also, due to the way the 'loaddemo' template and steps are designed, looks like the sample site is not installed in windows because the installation is done in case 'cronjobs' and this step is skipped in windows platform because the template for 'loaddemo' conditionally skips it on all platforms but linux.

    I successfully installed Campsite with a minor modification to CampInstallationBase.php duplicating the code on case 'cronjobs' and copying it to start of 'finish' case.

    The modified code for case 'finish' is:
            case 'finish':
                if (isset($input['install_demo']) && $input['install_demo'] == 1) {
                    $session->setData('config.demo', array('loaddemo' => true), 'installation', true);
                    if (!$this->loadDemoSite()) {
                        break;
                    }
                }
                $this->saveCronJobsScripts();
                if ($this->finish()) {
                    $this->saveConfiguration();
                    self::InstallPlugins();
    
                    // clear all cache
                    require_once($GLOBALS['g_campsiteDir'].'/classes/CampCache.php');
                    CampCache::singleton()->clear('user');
                    CampCache::singleton()->clear();
                    CampTemplate::singleton()->clearCache();
                }
                break;
            }
    


    I was not sure if it was better to open a bug or a blog post, finally I decided for a post.
    Hope this helps.

    Francesc
  • 5 Comments sorted by
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    hi Francesc,

    first of all thanks for the report. I just tested and it looks like a windows specific bug. Under linux the installation process works w/o issue. As I can see you have not installed demo site too. You can use the backup data from demo site (use backup/restore operation) and restore on the own to get demo data.

    We will fix that issue soon.
  • I've installed the demo site after the modification I made to the code. It worked and installed fine on my windows machine.

    Right now I was trying to install it on our hosting services but I can't. The server is configured to use PHP as CGI and I found a page where it says that installing it is not straightforward on PHP+CGI but I cannot find the instructions as pointed by the page http://en.flossmanuals.net/Campsite/InstallingOnPHPCGI

    Whenever I try to access the installation, CPU and Memory usage increase, the server becomes unresponsive and dies.
  • Dear Francesc,

    Thank you for your help!

    I made the following changes to the CampInstallationBase.php file:
    http://code.sourcefabric.org/changelog/campsite/?cs=14373318 ed900c3bb8e614cb7dde56a84e5d5129

    I attached it here too. Please check if this fixes the Windows bug.

    Mugur Rus
    Senior Software Developer, Sourcefabric
    mugur.rus@sourcefabric.org

    Cluj-Napoca, Romania
    +40 (0)720 528408
    Skype: mugur_rus

    http://www.sourcefabric.org
    http://www.twitter.com/Sourcefabric


    On Mon, Jul 12, 2010 at 6:38 PM, Francesc Juhe <
    campsite-support@lists.sourcefabric.org> wrote:

    > Hi!
    >
    > I recently discovered your software and I liked the online demo. I decided
    > to jump to next step and install it on my own computer to try it further.
    >
    > When installing Campsite on my developer's environment (Windows 7 x64,
    > Apache 2.2.15 x86, PHP 5.3.2 VC9 x86, MySQL 5.1.44 x64) it fails after
    > clicking next on 'Sample Site' step.
    >
    > Fatal error: Call to a member function Execute() on a non-object in
    > D:\wwwfiles\testing\test_camp\install\classes\CampInstallati onBase.php on
    > line 430
    >
    > Looks like $g_db is not initialized in 'finish' case of
    > 'CampInstallationBase->execute'. When crontab fails on function
    > 'saveCronJobsScripts' and database value 'ExternalCronManagement' is
    > updated, $g_db is a non object and fails.
    >
    > Also, due to the way the 'loaddemo' template and steps are designed, looks
    > like the sample site is not installed in windows because the installation is
    > done in case 'cronjobs' and this step is skipped in windows platform because
    > the template for 'loaddemo' conditionally skips it on all platforms but
    > linux.
    >
    > I successfully installed Campsite with a minor modification to
    > CampInstallationBase.php duplicating the code on case 'cronjobs' and copying
    > it to start of 'finish' case.
    >
    > The modified code for case 'finish' is:
    >
    > case 'finish':
    > if (isset($input['install_demo']) && $input['install_demo'] == 1) {
    > $session->setData('config.demo', array('loaddemo' => true), 'installation', true);
    > if (!$this->loadDemoSite()) {
    > break;
    > }
    > }
    > $this->saveCronJobsScripts();
    > if ($this->finish()) {
    > $this->saveConfiguration();
    > self::InstallPlugins();
    >
    > // clear all cache
    > require_once($GLOBALS['g_campsiteDir'].'/classes/CampCache.p hp');
    > CampCache::singleton()->clear('user');
    > CampCache::singleton()->clear();
    > CampTemplate::singleton()->clearCache();
    > }
    > break;
    > }
    >
    >
    >
    > I was not sure if it was better to open a bug or a blog post, finally I
    > decided for a post.
    > Hope this helps.
    >
    > Francesc
    >

  • Vote Up0Vote Down Micz FlorMicz Flor
    Posts: 184Administrator
    good call, thanks for pointing to the broken link, i fixed it. the information can be found here:

    http://wiki.sourcefabric.org/display/CS/Install+on+Shared+Ho sting+Using+PHP-CGI

    we migrated all our content and code and there are still broken links in the manual. going to the wiki in such a case (url above) is your best shot.
  • Thank you. I tried a clean install with the modified file and it installed correctly on my windows machine.

    Thanks for the link on PHP-CGI installation. I'm waiting for support on our hosting server and if possible I will try the instructions on the page and change directory permissions. But right now I don't have any logs from the server that point to a possible cause for the memory and cpu usage.