Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Installation Fatal Error

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 6779 Views
  • chiefie
    Avatar
    Community Member
    22 Posts

    Installation Fatal Error Link to this post

    I have done a search in regards to fatal error during installation for SS 2.2.1 on Web Drive shared PHP5 hosting.

    It went alright except it gets to this error: Fatal error Cannot redeclare class Form ...

    I cannot find any solution at all! Anyone care to give help on how to install SS on Web Drive?

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

    Re: Installation Fatal Error Link to this post

    Sorry to hear you're having installation woes. It's always tricky given the variance in how webfarms set up their servers.

    So, I see a bunch of advice, including;

    http://www.silverstripe.com/site-builders-forum/flat/1733
    http://www.silverstripe.com/site-builders-forum/flat/2837

    Which point to
    (a) Increasing memory limit beyond 32MB

    (b) Manually setting the .htaccess file's rewrite rule;
    (-)RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    (+)RewriteRule .* /<<subfolder>>/sapphire/main.php?url=%1&%{QUERY_STRING} [L]

    c) Noting that WebDrive uses Mod Vhost Alias:
    http://httpd.apache.org/docs/1.3/mod/mod_alias.html
    VirtualDocumentRoot /home/httpd/vhlinks/%0/
    "I assume the VirtualDocumentRoot is causing the problem for SilverStripe." says a poster.

    (d) A developer here sorted the issue by changing the core/ManifestBuilder.php line 39
    // Config manifest
    //   $baseDir = dirname($_SERVER['SCRIPT_FILENAME']) . "/..";
    $baseDir = '/path/to/files';

    If you do get it solved (item d could be your savior) we would love to know precisely what you needed to do so that we can patch the software with a fix. Until someone does this, others will stub their toe on webdrive which is a shame.

    Finally, do note that "cannot redeclare" implies it is including the same file or code twice, so I'd hope you didn't accidently unzip SilverStripe twice and that its somehow embedded in itself.

  • chiefie
    Avatar
    Community Member
    22 Posts

    Re: Installation Fatal Error Link to this post

    it was virgin SS installation so couldn't possibly be any duplication.

    I will step through the suggestion and hopefully I could be of help to find the cause and the workaround/solution as to SS on WebDrive.

    Thanks so much with a reply, at least it allows me to start my troubleshooting.

  • chiefie
    Avatar
    Community Member
    22 Posts

    Re: Installation Fatal Error Link to this post

    Okay, point (A), I think it is fixed by your latest SS 2.2.1 code, so it is automatically set to 32M (as my phpinfo reported the server setting is at 20M)

    I've added "php_flag allow_call_time_pass_reference on" on .htaccess so I get all green for installation.

    point (B), if i add that line in into .htaccess before the installation, I get error 500. If I remove it, I get the installation screen.

    point (C), I do not understand what you suggest there, it doesn't get me far.

    point (D), no such line at core/ManifestBuilder.php line 39. However a search for "dirname($_SERVER['SCRIPT_FILENAME'])" found it at line 85 and 382.

    So I'm back to square one that it doesn't help me with the solution from 2007. I need a solution that is for SS 2.2.1.

    Please help again.

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

    Re: Installation Fatal Error Link to this post

    Hmm. Scanning through my email I see this comment, as well, from Nicolaas... maybe he can shed some light?

    Change .htaccess

    FROM
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    TO
    RewriteRule .* /www.mywebsiteurl.co.nz/sapphire/main.php?url=%1&%{QUERY_STRING} [L]

  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: Installation Fatal Error Link to this post

    This is what I had in my .htaccess file with the site running in PREVIEW mode:

    RewriteBase /
    php_value memory_limit 64m
    php_value allow_call_time_pass_reference 1
    ### SILVERSTRIPE START ###
    RewriteEngine On

    RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$

    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* /www.mysite.org.nz/sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    ### SILVERSTRIPE END ###

    Nicolaas

  • chiefie
    Avatar
    Community Member
    22 Posts

    Re: Installation Fatal Error Link to this post

    Now... do I add those into the .htaccess before I perform the installation? or after? Because the installation didn't seem to complete, and no database created, so when or how do I know when to add those lines into .htaccess?

  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: Installation Fatal Error Link to this post

    I would try before. Sorry, I cant be of more help here. It is usually easier to contact the ISP - they can help you.

    6779 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.