Announcement

Collapse
No announcement yet.

Read DBF files with PHP

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

    Read DBF files with PHP

    I am trying to write a PHP script to determine if a username/password is valid reading from the customer.dbf file.

    I was originally trying to use PHPs dbase functions
    http://php.net/manual/en/ref.dbase.php
    but its not active on my server so I am just reading in the dbf files nad parsing it.

    I am having problems with permissions reading the dbf files though. Is there a way I can read the dbf files from miva with PHP and not make them world readable. The usernames/passwords are stored there so they still need to be secure.

    Has anyone else tried to do read the DBF files with PHP? and succeeded?

    #2
    Re: Read DBF files with PHP

    In theory it will work, but only on dbf databases that do not make use of the proprietary memo fields that Miva Merchant uses. The customer database is not one of those so it should be able to be read; never try to write to it using php.

    The other issue you're having, besides dbase support rarely being found in php these days, is that your mivadata directory is likely intentionally set with permissions to keep php scripts out because the last thing you want to have happen is a vulnerable php script be used to read all the credit card numbers out of the database file. Your host may be able to add dbase support and change the permissions but I'm not sure if I'd recommend having them do that. Can you go to MM5 where everything moves into mysql?
    David Hubbard
    CIO
    Miva
    [email protected]
    http://www.miva.com

    Comment


      #3
      Re: Read DBF files with PHP

      Can I ask why you want to do it? there might be a module out there that will do what you want.

      And as David said, you should really think about upgrading to Miva Merchant 5.5 - it is SOOOOOOOO much better / faster / more stable / cheaper than Merchant 4.
      Mark Romero
      ~~~~~~~~

      Comment


        #4
        Re: Read DBF files with PHP

        or maybe, use mivascript to read the dbf files since it's native in mivascript.

        Scott
        Need to offer Shipping Insurance?
        Interactive Design Solutions https://www.myids.net
        MivaMerchant Business Partner | Certified MivaMerchant Web Developer
        Competitive Rates, Custom Modules and Integrations, Store Integration
        AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
        My T-shirt Collection is mostly MivaCon T-shirts!!

        Comment


          #5
          Re: Read DBF files with PHP

          We have some custom modules that will not work with Miva 5.5, so we are stuck on 4 for the time being. That was my first thought/suggestion as well. But not really possible.

          I guess I might have to look into mivascript... but learning a whole new language for something this simple just didn't seem time worthy.

          Comment


            #6
            Re: Read DBF files with PHP

            My first suggestion was to upgrade to miva 5.5. And I really wish we could, however we have some specialized plugins that will not work with 5.5 so we are stuck for the time being.

            I really do not think I am trying to do anything complicated I just need to be able to open the dbf file with PHP... Because it feels like nothing complicated it does seem like I would need to learn a whole new language(mivascript).

            Comment


              #7
              Re: Read DBF files with PHP

              When you say specialized plug-ins, were these developed in house or by a third party developer? If it was by a third party developer, have you contacted them about updating them?
              Leslie Kirk
              Miva Certified Developer
              Miva Merchant Specialist since 1997
              Previously of Webs Your Way
              (aka Leslie Nord leslienord)

              Email me: [email protected]
              www.lesliekirk.com

              Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

              Comment


                #8
                Re: Read DBF files with PHP

                Because I don't want to see you hit your head against a wall...

                I am trying to write a PHP script to determine if a username/password is valid reading from the customer.dbf file.
                Could you let us know WHY you want to do that? Maybe there is a module out there that already does something similar to what you want to accomplish.
                Mark Romero
                ~~~~~~~~

                Comment

                Working...
                X