Announcement

Collapse
No announcement yet.

Renaming a file with a script on Ubuntu Apache hosted site...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Renaming a file with a script on Ubuntu Apache hosted site...

    Hey guys, Hoping you all can help me figure this out. I am trying to rename our main page mvc file with a script. Our Credit card processor has been failing as of late. They are having a small issue with their generated transaction tokens. A lot of the time they return the token with a '+' in the string and when we call with that token it gets rejected. So for a small fix I am looping until i get a good token before i call. On Friday they made some change and all tokens had a '+' in them. We could not take payments for six hours. So i am trying to see if i can call a function if my loop maxes out that will rename my start page say 'Index.mvc' to 'Index_good.mvc' and rename my down page 'Index_down.mvc' to 'Index.mvc'.. In local testing all is fine. On my ubuntu server it is throwing an error trying to rename the files. I know you guys deal a lot with linux boxes and I am assuming this is a permissions error. Or is it just not possible to allow a script to have that much power?

    If anyone has any time for this i would appreciate it. If you need any information about the production server i will post whatever is necessary.

    Thanks.

    #2
    It sounds like your Miva Empresa is not running as the same UID as the website content owner on the system; you'd need to get that working, or set the file permissions to be world writable. The former would be preferred as the latter is a security issue. That being said, this sounds like an issue with mishandling data from POST or in variables in code, which likely means there are some huge security issues already. What some entity passes in a URL or as data should not cause a complete failure of a script/code.
    David Hubbard
    CIO
    Miva
    [email protected]
    http://www.miva.com

    Comment


      #3
      I agree with ILH. I'd also offer that you could simply do a loop on the call - if it comes back with a +, redo the call until it doesn't. No need to replace a script with a new one - God forbid you have multiple buyers at the same time.... also, check the encoding and/or decoding...
      William Gilligan - Orange Marmalade, Inc.
      www.OrangeMarmaladeinc.com

      Comment


        #4
        Thank you guys i figured it was a permissions issue. ILH - The script is not failing simply the rename() function is returning failed. Sorry should have been more specific. wmgiligan - That is exactly what i am doing, Just for added security if this happens again where they have a problem i am trying to switch my main page to not allow any attempts at payment, and display a message that my processor is down. Thanks again you guys i will try and go over all the ownership and permissions tomorrow and if i cant figure it out i will bug you guys again.

        Comment

        Working...
        X