PHP with dbase

PHP with dbase

Postby Otto » Fri Jul 27, 2018 5:34 am

Hello,
has someone compile php with --enable-dbase option.

Best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

Re: PHP with dbase

Postby Antonio Linares » Fri Jul 27, 2018 5:51 am

Dear Otto,

dBase support for php is very limited
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: PHP with dbase

Postby Marcelo Via Giglio » Mon Jul 30, 2018 1:14 pm

Hola,

Otto, you can use ADS, and you can use many options to do a serious web interface, PHP, Perl, Python, etc, and the best, SQL with your DBFs

regards

Marcelo
Marcelo Via Giglio
 
Posts: 1050
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: PHP with dbase

Postby Otto » Mon Jul 30, 2018 2:22 pm

Hello Marcelo,
can you explain how SQL works with dbf?
Thank you in Advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

Re: PHP with dbase

Postby Silvio.Falconi » Mon Jul 30, 2018 3:08 pm

I used Sql (Mdb) With Asp many year ago for make a shop on line and it run good
I not found any source good with php and dbf
there is a product of a Brasilian Boy he made a system Fwh+Php+Dbf and run ok . I tried his system of Doctor 'shop on a website and it run ok
But he wanted many USD ....without garances!!! ( without tried his product)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6768
Joined: Thu Oct 18, 2012 7:17 pm

Re: PHP with dbase

Postby Marcelo Via Giglio » Mon Jul 30, 2018 4:34 pm

Otto,

this is sample posted many years ago

https://app.box.com/s/t2vd0tfrov42usp1kzgucxxs642bmigx

Code: Select all  Expand view
#include "ads.ch"
#include "fivewin.ch"   

REQUEST ADS
REQUEST DBFFPT

function main()
LOCAL oDlg, consulta := SPACE(400), oLbx, path := "                            ",;
      connect, tipo := "ADT"

   RddRegister("ads",1)
   RddSetDefault("Ads")
   AdsSetServerType ( 1 ) // local
   AdsSetFileType(3)

   SET DELETED ON
   adsRightsCheck( .F. )

   DEFINE DIALOG oDlg RESOURCE "consulta"

          REDEFINE GET path ID 102 OF oDlg

      REDEFINE BUTTON ID 103 OF oDlg  ACTION ( AdsDisconnect(AdsConnection()),;
                                               IF ( AdsConnect60( path , 7,"ADSSYS"), ;
                                connect:setcolor(CLR_GREEN, CLR_GREEN),;
                                                    connect:setcolor(CLR_HRED, CLR_HRED ) ;
                              ),;
                                               connect:refresh() ;
                          )
      REDEFINE SAY connect PROMPT "  " ID 110 OF oDlg COLOR CLR_HRED, CLR_HRED
          REDEFINE GET consulta ID 104 OF oDlg
      REDEFINE BUTTON ID 106 OF oDlg ACTION  resultado( consulta )
                               
      REDEFINE BUTTON ID 107 OF oDlg ACTION oDlg:end()

   ACTIVATE DIALOG oDlg

   AdsDisconnect(AdsConnection())

return  nil

FUNCTION resultado( consulta )
    LOCAL oDlg, oLbx,e

   
    ADSCreateSQLStatement("SQLarea",2)
   
    IF ADSExecuteSQLDirect( consulta )
       TRY
         
         DEFINE DIALOG oDlg RESOURCE "resultado"

      REDEFINE LISTBOX oLbx FIELDS ALIAS "SQLarea" ID 101 OF oDlg
          REDEFINE SAY PROMPT "RESULTADO : " + ALLTRIM( STR ( SQLarea -> ( LASTREC() ) ) )  ID 200 OF oDlg COLOR CLR_BLUE
      REDEFINE BUTTON ID 102 OF oDlg ACTION oDlg:end()
      REDEFINE BUTTON ID 103 OF oDlg ACTION oLbx:report()

         ACTIVATE DIALOG oDlg
     sqlarea -> ( DBCLOSEAREA() )

       CATCH e
         ? "COMANDO EJECUTADO"
       END
    ELSE
        MSGINFO("Error en la ejecución de la consulta")
    sqlarea -> ( DBCLOSEAREA() )
    ENDIF
       
RETURN NIL
 


to download the sample

https://app.box.com/s/r0w5vgxzugucoavqjzpba9he6625gvgu

To test

1.- put in Local Path .
2.- press conectar
3.- put SQL sentence ej. select * from customer order by first
4.- Ejecutar

Regards

Marcelo
Marcelo Via Giglio
 
Posts: 1050
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: PHP with dbase

Postby Carlos Mora » Wed Aug 08, 2018 6:59 pm

Hi Marcelo
Marcelo Via Giglio wrote:Otto, you can use ADS, and you can use many options to do a serious web interface, PHP, Perl, Python, etc, and the best, SQL with your DBFs

AFAIK, Advantage for PHP is an old version supporting PHP 5, not sure if it can work with 2.0 or 7.2, am I wrong?
I wasn't be able to find a reference to a new versions since 2015, that in PHP timeline is a _lot_.
IMHO if that's the case, probably it isn't worth it to invest in that solution.

KR
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Carlos Mora
 
Posts: 988
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: PHP with dbase

Postby reinaldocrespo » Thu Aug 09, 2018 7:24 pm

Hello Carlos/Everyone;

Advantage has focused more on oData and Json with Advantage web api service they introduced with version 11. So you can use any web development platform and still be able to access .dbf data all the same via Json or oData. Having said that, Advantage does have a PHP extension for Linux and windows so you can use pure PHP to connect and access your data any time.

Here is a link that shows how to access dbf/cdx data under Advantage using open protocol oData:
http://jdmullin.blogspot.com/2010/09/advantage-web-api.html

Keep in mind Advantage is fully ISAM as well as SQL. Most web development languages are only SQL. What I'm trying to say is that you will probably have to learn some SQL in order to access your dbfs/cdxs across the web using PHP with Advantage but that limitation is imposed by the web developing language and not Advantage. Advantage speaks both just the same. With time, you realize SQL is better structured to access remote data, but I digress.

Here is a link to a complete non-oData PHP system accessing Advantage data (dbfs/cdxs) :
http://devzone.advantagedatabase.com/dz/WebHelp/Advantage11.1/index.html?devguide_accessing_advantage_using_the_advantage_php_extension.htm

I have a couple PHP portals accessing Advantage data across the internet where the web server is in one continent and the Advantage data (ADTs and DBFs) server is on another. It works great. The beauty is you can have FW-Win32 apps writing/reading/ reporting on the same data you also have PHP web portals doing the same on the same data. Likewise, the remote client doesn't have to be a browser, it could be an Android tablet pulling oData via the Advantage Web API.

I know all this sounds confusing. If paying for the server software is an option, then I would explore Advantage one step at a time. Eventually it all makes sense. Keep in mind that Advantage has free 2 user licenses of the server where you can write and test.

Hope that helps,



Reinaldo.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: PHP with dbase

Postby Lailton » Fri Aug 10, 2018 12:25 am

Otto,

You can to use Harbour + DBFCDX without needed extern application with CGI.

Contact me on skype and I can show you the power Harbour for Web!

I have a full application using a lot of DBFCDX working perfect with my FiveWeb!
Regards,
Lailton Fernando Mariano
User avatar
Lailton
 
Posts: 125
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil

Re: PHP with dbase

Postby reinaldocrespo » Fri Aug 10, 2018 1:11 am

Lailton wrote:Otto,

You can to use Harbour + DBFCDX without needed extern application with CGI.

Contact me on skype and I can show you the power Harbour for Web!

I have a full application using a lot of DBFCDX working perfect with my FiveWeb!


But you have to host the web server on your own server manage it and be responsible for everything including security. I don't think hosted servers will allow you to execute any code on their server. Correct?

Reinaldo.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: PHP with dbase

Postby fraxzi » Fri Aug 10, 2018 1:39 am

reinaldocrespo wrote:Hello Carlos/Everyone;

Advantage has focused more on oData and Json with Advantage web api service they introduced with version 11. So you can use any web development platform and still be able to access .dbf data all the same via Json or oData. Having said that, Advantage does have a PHP extension for Linux and windows so you can use pure PHP to connect and access your data any time.

Here is a link that shows how to access dbf/cdx data under Advantage using open protocol oData:
http://jdmullin.blogspot.com/2010/09/advantage-web-api.html

Keep in mind Advantage is fully ISAM as well as SQL. Most web development languages are only SQL. What I'm trying to say is that you will probably have to learn some SQL in order to access your dbfs/cdxs across the web using PHP with Advantage but that limitation is imposed by the web developing language and not Advantage. Advantage speaks both just the same. With time, you realize SQL is better structured to access remote data, but I digress.

Here is a link to a complete non-oData PHP system accessing Advantage data (dbfs/cdxs) :
http://devzone.advantagedatabase.com/dz/WebHelp/Advantage11.1/index.html?devguide_accessing_advantage_using_the_advantage_php_extension.htm

I have a couple PHP portals accessing Advantage data across the internet where the web server is in one continent and the Advantage data (ADTs and DBFs) server is on another. It works great. The beauty is you can have FW-Win32 apps writing/reading/ reporting on the same data you also have PHP web portals doing the same on the same data. Likewise, the remote client doesn't have to be a browser, it could be an Android tablet pulling oData via the Advantage Web API.

I know all this sounds confusing. If paying for the server software is an option, then I would explore Advantage one step at a time. Eventually it all makes sense. Keep in mind that Advantage has free 2 user licenses of the server where you can write and test.

Hope that helps,



Reinaldo.


Great Source! :wink: :wink: :wink:

Thanks for these..
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 66 guests