Jump to:

4952 Posts in 14381 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Fatal error: Call to undefined method HttpRequest::addHeader()

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

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

Page: 1
Go to End
Author Topic: 1576 Views
  • yaizo
    Avatar
    Community Member
    19 Posts

    Fatal error: Call to undefined method HttpRequest::addHeader() Link to this post

    hello,

    i have a strange problem that occured recently. i changed my Header.ss - i put an hart coded link in and uploaded the file. at first glance everything seems ok, because the link apeared and i did not get any error message. now after two days i visited my page again i get this message:
    Fatal error: Call to undefined method HttpRequest::addHeader() in /www/htdocs/xxx/xxx/xxx/sapphire/core/control/Director.php on line 115

    i tried this to fix the error:
    1.i uploaded "blackcandy" and changed the theme in mysite/_config.php. but it is still the same error in the frontend. (of course with /?flush=1 at the end)
    2. .../?flush=1 - still the same error
    3. ... /dev/build - still the same error (but i gues this is only possibel if iam loged in)
    4. ... i overwrote Header.ss to the previouse version as it was working - still the same error

    what is this? and how can i fix it. i am wondering if it would help to make an upgrade? because i am running 2.3.3 ....
    could it be an cache problem? an where?

    thank you for any help
    g.m.

  • martimiz
    Avatar
    Forum Moderator
    1067 Posts

    Re: Fatal error: Call to undefined method HttpRequest::addHeader() Link to this post

    You might already have found this thread: http://www.silverstripe.org/general-questions/show/281228

    Maybe the problem lies with your provider changing some server settings, and not with your code?

    [edit] Also I just remembered something about the HTTPRequest/HTTPResponse classname conflicting with the php HTTP extension your provider may have enabled recently. Here's another link: http://www.silverstripe.org/installing-silverstripe/show/255177

    Upgrading probably isn't such a bad idea anyway, since we're at 3.7...

    Good luck!

  • yaizo
    Avatar
    Community Member
    19 Posts

    Re: Fatal error: Call to undefined method HttpRequest::addHeader() Link to this post

    oh! thnks! i think this is it. i have changed my main domain-name and i think this is what is going wrong.
    but how can I chage the url, where can find it. i have looked inside main.php and discovered just a lot of variables. maybe this answer lise somewher in the DataBase or in an sapphire .php file?

    g.m.

    1576 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.