Jump to:

4945 Posts in 17751 Topics by 1494 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » PHP 5 is required

Getting SilverStripe up and running on your computer and on your web server.

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

Page: 1 2 3 4
Go to End
Author Topic: 6908 Views
  • JZM
    Avatar
    Community Member
    34 Posts

    PHP 5 is required Link to this post

    Hello,

    i'm trying to install Sliverstripe for a client.

    The issue that i'm having is when I go to install it comes up with PHP 5 is required and the following warnings:

    Warning: fopen(/tmp/silverstripe-cache-home-amoneypr-public_html-Site/manifest-main) [function.fopen]: failed to open stream: Permission denied in /home/amoneypr/public_html/Site/sapphire/core/ManifestBuilder.php on line 101

    Fatal error: Cannot write manifest file! Check permissions of /tmp/silverstripe-cache-home-amoneypr-public_html-Site/manifest-main in /home/amoneypr/public_html/Site/sapphire/core/ManifestBuilder.php on line 105

    Below is the phpinfo():

    http://amoneyproblem.hostwebsite.co.nz/info.php

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: PHP 5 is required Link to this post

    That looks like a security issue. Maybe open_basedir restrictions are in effect or your host has locked up the tmp directory.

    I believe you can override the default temp dir by creating a file "_ss_environment.php" in your website root, and defining TEMP_FOLDER there to be some other writable directory.

  • JZM
    Avatar
    Community Member
    34 Posts

    Re: PHP 5 is required Link to this post

    I have just spoken to the host and have been told open_basedir should be fine

  • Willr
    Avatar
    Forum Moderator
    5511 Posts

    Re: PHP 5 is required Link to this post

    I believe if you make a 'silverstripe-cache' folder in your root (same level as cms, sapphire etc folders) It will use this rather then /tmp/

  • JZM
    Avatar
    Community Member
    34 Posts

    Re: PHP 5 is required Link to this post

    i'm now getting

    Parse error: syntax error, unexpected $end in /home/amoneypr/public_html/Site/mysite/code/Page.php on line 55

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: PHP 5 is required Link to this post

    Hrm, check that the mysite/code/Page.php file looks the same as this one:
    http://svn.silverstripe.com/open/phpinstaller/tags/2.3.0/mysite/code/Page.php

    If not, please let us know what it contains so that we can see if there's a bug lurking here.

  • JZM
    Avatar
    Community Member
    34 Posts

    Re: PHP 5 is required Link to this post

    Sam,

    Used your code still the same the code seems dead from here on - line 18

          
    // Note: you should use <% require %> tags inside your
    templates instead of putting Requirements calls here. However
          // these are included so that our older themes still
    work
          Requirements::themedCSS("layout");
          Requirements::themedCSS("typography");
          Requirements::themedCSS("form");
       }
       
       /**
        * Site search form
        */
       function SearchForm() {
          $searchText = isset($_REQUEST['Search']) ?
    $_REQUEST['Search'] : 'Search';
          $fields = new FieldSet(
           new TextField("Search", "", $searchText)
           );
          $actions = new FieldSet(
           new FormAction('results', 'Search')
           );

           return new SearchForm($this, "SearchForm", $fields,
    $actions);
       }
       
       /**
        * Process and render search results
        */
       function results($data, $form){
           $data = array(
           'Results' => $form->getResults(),
           'Query' => $form->getSearchQuery(),
           'Title' => 'Search Results'
           );

           return
    $this->customise($data)->renderWith(array('Page_results', 'Page'));
       }
       
    }

    ?>

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: PHP 5 is required Link to this post

    Hi JZM,

    It looks like this is due to PHP's asp_tags setting. Normally, it's off, but your host seems to have it set on.

    For now, remove the "<% require %>" bit out of the comment. We'll fix this bug in 2.3.1.

    6908 Views
Page: 1 2 3 4
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.