Thanks Silvio, I Will try but, why you don't get error using FPC 2.6.2? Don't understand :/
Enviado desde mi iPad /Giuseppe > El 26/02/2014, a las 15:04, silvioprog <[email protected]> escribió: > > 2014-02-26 6:31 GMT-03:00 Giuseppe <[email protected]>: >> El 26/02/2014 4:57, silvioprog escribió: >>> 2014-02-25 18:22 GMT-03:00 Giuseppe <[email protected]>: >>>> Hi all, >>>> >>>> I'm trying demos on Brook 3 (from github), and simple demos works fine, >>>> but with DB demos I get the error: >>>> Error 405 >>>> HTTP method not allowed for the requested resource. >>>> >>>> Some idea? >>>> >>>> Regards. >>> >>> >>> Oh, is you Giu of Lazarus forum? Sorry, I could only see it now hehe... >>> >>> Please delete all old files, like .ppu etc. These examples are working >>> fine, I tested it on Windows and Linux. >>> >>> If problem persists, please say step by step how you are doing the test as >>> well as your environment. >> Yes, I am. >> Lazarus 1.2RC2, FPC 2.6.2 rev.43696, 32 bits. >> brookframework downloaded from github. >> Opened brookex and brookrt lpk and compiled. >> dopf downloaded from github, opened and compiled. >> >> Open brookframework\demos\simple\helloworld\cgi project >> Build. >> Copy to cgi-bin folder >> http://localhost:8080/cgi-bin/cgi1.bf returns Hello World! >> >> Open brookframework\demos\simple\static project >> Build. >> Execute test.exe >> http://localhost:8000/index returns static page opening a dialog as expected. >> >> Open \brookframework\demos\simple\entity project >> Build. >> Copy to cg1.bf to cgi-bin folder >> http://localhost:8080/cgi-bin/cgi1.bf returns "HTTP method not allowed for >> the requested resource." >> >> Created postgres database with table person. >> Open brookframework/demos/db/dopf/cgi1.lpi >> Changed db configuration from dbutils.pas pointing to my database >> Copied all postgres dll from postgres/bin folder to project folder. >> Changed on Brokers.pas BrookFCLCGIBroker -> BrookFCLHttpAppBroker >> http://localhost returns "HTTP method not allowed for the requested >> resource." >> >> Shell: >> D:\DevAux\LazComp\brookframework\demos\db\dopf>cgi1.exe >> exception at 0043A79E: >> Missing HTTP protocol version in request. > > > Exactly how Canneyt said: It is a known bug in FPC 2.6.2. > > RESTful uses all HTTP methods (GET/POST/PUT/DELETE), and old FCL-web does not > supports it, but it is fixed in new FCL-web. > > Try it now in a new environment, I'll show my environment to you: > > 0. use a stable release of Lazarus/FPC: Lazarus 1.0.14 r43446 FPC 2.6.2 > i386-win32-win32/win64 (http://sourceforge.net/projects/lazarus); > 1. install Apache server in your system > (http://archive.apache.org/dist/httpd/binaries/win32/httpd-2.2.22-win32-x86-openssl-0.9.8t.msi), > choosing the "c:\websrv" folder instead of default Apache folder in "Program > Files", after install, you will have the "c:\websrv\cgi-bin" folder; > 2. undo all changes in your Brook demos (in SmartGIT, I select all files and > use "Revert" button), and keep using BrookFCLCGIBroker instead of > BrookFCLHTTPAppBroker broker that you changed; > 3. install the best browser in your system: Google Chrome; > 4. install a complete REST client plugin in your Chrome: > https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo; > 5. with your database and "person" table already created, open the project > "C:\repository\git\brookframework\demos\db\rest\cgi1.lpi" and, in your > project options (Ctrl+Shift+F11), set "c:\websrv\cgi-bin\cgi1.bf" in > "Compiler Options > Paths > Target file name", and uncheck the "Apply > conventions" option; > 6. compile your project (Ctrl+F9); > 7. configure your REST plugin to: http://imagebin.org/295955; > 8. enjoy; > > -- > Silvio Clécio > My public projects - github.com/silvioprog > -- > _______________________________________________ > Lazarus mailing list > [email protected] > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
