Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » [SOLVED] WHERE TO PUT PHP SCRIPT

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 777 Views
  • servalman
    Avatar
    Community Member
    211 Posts

    [SOLVED] WHERE TO PUT PHP SCRIPT Link to this post

    Hello

    I'm trying to do the following :

    I have a flash embed using swfObject.

    In this swf I'm trying to call a simple php script that as nothing to with php for page type it is just there to store a variable in a textfile

    The script is located in mysite/code/mycodes/updatescript.php so the url I use in flash is mysite/code/mycodes/updatescript.php.
    The folders and file have the right authorisations

    It works on the same server but not in my ss install

    does anyone have a clue

    Thanks

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: [SOLVED] WHERE TO PUT PHP SCRIPT Link to this post

    Hello again ;)

    This is getting weirder :

    I can access any file (txt, other swfs) but not the php file I need

    Do I miss something regardind authorization or is there a special place for thirdparty scripts.

    It seems like something is preventing me from loading it ?

    Any ideas suggestion more than welcome

    Thanks

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: [SOLVED] WHERE TO PUT PHP SCRIPT Link to this post

    This is because SilverStripe contains a default .htaccess in mysite that prevents people from directly accessing PHP files. To get around this, create a .htaccess in mysite/code/mycodes that looks like:

    <Files updatescript.php>
    allow from all
    </Files>

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: [SOLVED] WHERE TO PUT PHP SCRIPT Link to this post

    Thanks !

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