Re: [Lazarus] FPWeb/Weblaz New Exemples: Error
The examples only work with FPC sources later than 4/30/2009 when the last patch (http://bugs.freepascal.org/view.php?id=13254) of fcl-web was implemented. You need to get the latest FPC fcl-web source codes for them to work. It is possible to just replace the files in your /packages/fcl-web/src/*.* and then recompile FPC and then Lazarus if that is easier for you. AB Osvaldo Filho wrote: urlsession.lpr(13,39) Error: Identifier not found "TFPWebModule1" urlsession.lpr(13,53) Error: Identifier not found "FPWebModule1" urlsession.lpr(17) Fatal: There were 2 errors compiling module, stopping webmodule.pas(151,33) Error: Identifier not found "Request" webmodule.pas(188,13) Error: identifier idents no member "CustomHeaders" ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] jQuery interface for fcl-web
Adding fcgi-support was only two hours work. Other systems can be added as wel. Next on my list is a native web-server using lnet, so that debugging is even easier. (I'm absolutely sure that posting all messages about fcl-web not supportinf fcgi was more work then actually adding the support) I thought the fcgi support is still a work in progress. The other day I was trying to create a "hello world" fcgi program just to see how it works but it did not compile. Getting a "fastcgi.pp(1,1) Fatal: Can't find unit BaseUnix used by custfcgi" error. (Latest Lazarus and FPC SVN, win32 /XP/) If it works, I would make the examples submitted in http://bugs.freepascal.org/view.php?id=13706 to work as FCGI also. BTW, there should be some explanation in Lazarus -> File -> New for people about the differences between Application - Program - Custom Program ; Simple CGI Application - CGI Application - Custom CGI Application ; FastCGI Application - Custom FastCGI Application ; I am positive, it is very confusing for a newcomer to chose between these. In fact, I'm sure it is random chance at the moment that decides which they are clicking on within one group. At least for apache modules there is only one choice (in my lazarus at least). -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Error while debugging: "No symbol in current context"
Hi Graeme, The debugger is not usable as it does not have been in the focus to be developed. Object property values cannot be seen either (dwarf or something external program used does not support properties). There were questions about the debugger functions in the past 2 years, same as yours both on the Lazarus forums and the mailing lists. If I remember correctly the answer was something like it is not priority until after 1.0 . IMO it is one of the most important aspects of RAD development to have a fully working IDE debugger. Currently in Lazarus the debugger is not usable for serious development because some of the most basic requirements are missing. Not to mention a CPU window, etc. It seems a new debugger should be developed that does not depend on non compatible external programs, but there were no resources to do it in the past years. AB Graeme Geldenhuys wrote: Hi, I just can't seem to debug anything inside the Lazarus IDE. Maybe my computer just doesn't like me or something. :-( See attached screenshot. "Slots" is a local variable which is a "record" structure. I can't seem to get any debug information about the fields in that record, using Lazarus IDE. Does anybody actually debug code inside the Lazarus IDE? Or do you all use external debugging tools or log files? I seem to get the feeling that debugging is the single biggest feature missing from the Lazarus IDE. Unfortunately debuging is a vital part of any IDE. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus unresponsive if Show Compiler dialog ON and trying to debug
Hi, If one checks the Show Compiler dialog in Lazarus and tries to debug to a line with f4, or place a breakpoint somewhere and execute with f9 Lazarus becomes unresponsive when exiting the application. This is due to 2 dialogs up at the same time, with the smaller one (Execution ended) being right behind the bigger one (Show compiler progress left there from the initial compilation). Nothing should be done until the show compiler progress dialog is closed manually (would be nice to have the focus on it after compilation too, instead of on the messages window so an enter would close it). No execution or debugging or source code editing or anything should happen until this dialog is closed. This major show stopper bug was reported in 2008 in mantis (http://bugs.freepascal.org/view.php?id=12020 and the dozen related reports) and no fixes done since then. I would think that these kinds of problems would have priority because people meet them in the first 10 minutes when starting to use Lazarus. But one and half years with no fixes seems a little bit too long when everyone is so upbeat with open source software getting fixes so faster than proprietary ones. If it cannot or will not be fixed, please remove the show compiler dialog check box from Lazarus so people will not get stumped on it every time they want to see compiler progress. Thank you, AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Debugging under windows
Properties with variable getters are shown. Properties with getter functions are not shown. The second one is greatly missed, making debugging tedious. Log files and such are not RAD debugging for GUI applications. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] bug report 12594
Sorry, it was posted in the wrong mailing list at first It seems it got closed, but I'm not sure if it is really fixed (can't add notes now). http://bugs.freepascal.org/view.php?id=12594 In D5 the DFM files are something like this with bitbuttons: . . . object BitBtn1: TBitBtn Left = 96 Top = 52 Width = 75 Height = 25 TabOrder = 1 Kind = bkOK end object BitBtn2: TBitBtn Left = 176 Top = 52 Width = 75 Height = 25 TabOrder = 2 Kind = bkCancel end . . . Because the "Caption" and "Modalresult" properties were not specified in there, the converter did not add them automatically for FPC using the "Kind" property (D5 did this automatically it seems). bkOK -> Caption = "OK" and Modalresult = 1 blCancel -> Caption = "Cancel" and modalresult = 2 etc. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus make me create better apps
On 5/7/2010 06:31, Marcos Douglas wrote: What do you use? Have you made any real app using some of these technologies and FPC? I would like to use FPC for my web apps, but I don't see many examples... Does anyone uses FPC for real web applications? Thanks Marcos Douglas My company also uses Lazarus/FPC for the whole system we have (an internet affiliate network) that was originally written in Kylix. It is Linux/Apache/MySQL server based. Most development and testing happens under Windows, then the web server part recompiled and retested under Linux before uploaded to the live server. The external utility programs are only used on Windows clients (customer service, system maintenance, etc.) using secure SSH tunnels to the web servers via Putty (to access the data on the MySQL databases, etc.). These could be compiled for Linux also, it is just most people are familiar with Windows better. All web pages are using the fpTemplate unit to generate the HTML responses. The web design layer this way is totally separated from the server programming side. The HTML people can beautify their pages as they like while using the available HTML tags provided on the server side to display live data from the databases. You can find some basic examples on using the fpTemplate unit and template tags under the Lazarus directory /lazarus/components/fpweb/demo/fptemplate/ Works like a charm. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus make me create better apps
On 5/7/2010 12:19, Marcos Douglas wrote: All web pages are using the fpTemplate unit to generate the HTML responses. The web design layer this way is totally separated from the server programming side. The HTML people can beautify their pages as they like while using the available HTML tags provided on the server side to display live data from the databases. You can find some basic examples on using the fpTemplate unit and template tags under the Lazarus directory /lazarus/components/fpweb/demo/fptemplate/ Works like a charm. Thanks for your example. I will see the fpTemplate unit. What about the server app. Do you use CGI, FastCGI... some libs or frameworks? Everyone talk about PWU. Thanks, Marcos Douglas The server side was an Apache mod but now it is simply CGI. We did not see any speed increase/decrease for the visitor traffic volume we have in either case. We might do it FCGI in the future, but it does not seem to be working on Windows (it was a few months ago so I do not exactly remember what was the problem, but I think it was something like many FCGI app instances got spawned and dragged the CPU like crazy all the time even between requests), so we probably need to move to Linux for the server development in case we try to do this again. No frameworks or libs were used, it is a normal website with screens, reports, etc., people need to click on things to get new content. The request goes to the web server and an HTML page is generated using a template, replacing the template-tags with content from files/databases, etc. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] CGI using weblaz
You can find demo programs for fpweb under your Lazarus directory in /components/fpweb/demo/ the fptemplate ones are particularly useful for building websites with FPC/Lazarus AB On 5/19/2010 05:45, Vannus wrote: Has anybody got query's to work with weblaz TCustomCGIApplication? ie. my.cgi?q=hello and my.cgi then outputs whatever q is? the AResponse.Fields don't get filled with the query and AResponse.URL doesn't contain the URL for me to parse myself :( -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] WebLaz Apache
Did. But in the current economy the traffic is down, and because of CGI doesn't require an Apache restart when anything changes in the app, we are just using CGI at the moment (with HTML templates and template tags using fpTemplate). Did not see speed difference between the two. However, any time the need arises, we can just recompile the app as an Apache module in minutes and us that. The web module source code is exactly the same for CGI programs and Apache mods, so no changes needed for the recompile at all. AB On 5/20/2010 05:49, Lee Jenkins wrote: OK, since everyone's talking about the web technologies in Laz/FPC lately, I have a question. Anyone currently running web site/app with WebLaz Apache module flavor. Any high traffic? I'm using a stand alone synapse based HTTP server now for testing, but I want to deploy eventually to apache via WebLaz. -- Warm Regards, Lee -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] WebLaz Apache
On 5/22/2010 08:27, Marcos Douglas wrote: (...) However, any time the need arises, we can just recompile the app as an Apache module in minutes and us that. The web module source code is exactly the same for CGI programs and Apache mods, so no changes needed for the recompile at all. No changes to transform CGI code in Apache_mod? Well, I never coded an Apache_mod, but I think it would be multi-thread, right? Your code is like that? Can you talk more about? Marcos Douglas We write all code as if it were an Apache module (or FCGI), even if we compile it as CGI at the moment. You just need to take care of the fact that web modules already in the memory can be reused for following requests (in case of Apache mods and FCGI), so the global variables, web module variables (private and public), etc. can have values left over from previous requests. Especially, need to take care of closing connections, files, free used memory, etc. after a request is finished and put back things to the initial state before leaving, so the next request that might get the same web module for action handling will find the same state as the previous. This is the same for Apache modules and FCGI. Only the .lpi and .lpr files (they are all very small and after creating them the first time no changes are needed at all) are different between Apache module, FCGI and CGI applications, the web module file is the same (example: under your Lazarus directory in /components/fpweb/demo/fptemplate/sessions/urlsessions-login/). AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb Apache2 Windows
On 5/22/2010 13:38, Leonardo Rame wrote: Hi, I'm trying to do some tests of fpWeb on Windows Seven 64bits using Apache2 (32bits). The first test I did was compiling the HelloWorld sample from c:\lazarus\components\fpweb \demo\helloworld\cgi and trying to execute it, but it doesn't work (500 Internal server error). This is what my Apache's logs in error.log file: [Sat May 22 17:12:34 2010] [notice] Child 996: Child process is running [Sat May 22 17:12:34 2010] [notice] Child 996: Acquired the start mutex. [Sat May 22 17:12:34 2010] [notice] Child 996: Starting 64 worker threads. [Sat May 22 17:12:34 2010] [notice] Child 996: Starting thread to listen on port 8080. [Sat May 22 17:21:37 2010] [error] [client 127.0.0.1] malformed header from script. Bad header= $000100015385: helloworld.exe Any hint? Make sure you compile for the right Apache version. In your FPC directory under /units/... there are 3 subdirectories .../httpd13 .../httpd20 and .../httpd22 Delete all but the version you have. For example, if you have Apache 2.2 then only leave the httpd22 directory there and delete the other two. This might not be the problem for CGI, but for Apache modules it was important when I played with it. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus CGI Sample
On 5/27/2010 13:52, Leonardo M. Ramé wrote: On the other hand, fpWeb has a more advanced templating engine, that maybe (I don't tested it) allows one to create rows of an HTML table right from the template, without creating it inside the program's code. Yes, this is true. See the demo program under your Lazarus diretory /components/fpweb/demo/fptemplate/listrecords/ You can use a tag in your template and complete eliminate html code in your pascal code. From the above demo program the template file contains: {+REPORTRESULT [-HEADER= class="Label"> ~Column1 ~Column2 -] [- ONEROW = ~Column1Value~Column2value -] . .snip, and so on more parameters if needed . [- NOTFOUND= There are no entries found. -] [-FOOTER=-] +} This is a single template tag with tag parameters to generate a full html table as you please. In the above example the pascal module only replaces the actual values in the table header and rows (marked by tilde "~"). AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb file download
On 6/10/2010 13:30, Leonardo M. Ramé wrote: El jue, 10-06-2010 a las 17:23 -0300, Leonardo M. Ramé escribió: Hi, I'm trying to implement file downloading for an fpWeb CGI without success, I'm doing this so far: procedure TFPWebModule1.TFPWebActions0Request(Sender: TObject; ARequest: TRequest; AResponse: TResponse; var Handled: Boolean); var lImage: string; lFileStream: TFileStream; begin lImage := '/home/leonardo/files/file1.dcm'; lFileStream := TFileStream.Create(lImage, fmShareDenyNone); try AResponse.ContentType := 'image/dicom3'; AResponse.CustomHeaders.Values['Content-Disposition'] := 'attachment; filename=' + ExtractFileName(lImage); AResponse.LoadFromStream(lFileStream, True); AResponse.SendContent; // not sure if this is needed. finally lFileStream.Free; end; Handled := True; end; And the results of curl are this: * About to connect() to localhost port 80 (#0) * Trying ::1... connected * Connected to localhost (::1) port 80 (#0) GET /cgi-bin/getstudy/StudyId?IdSeries=1 HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15 Host: localhost Accept: */* < HTTP/1.1 200 OK < Date: Thu, 10 Jun 2010 20:17:52 GMT < Server: Apache/2.2.14 (Ubuntu) < Content-Disposition: attachment; filename=MR_4c1139a4b76d62c2.dcm < Content-Length: 0 < Content-Type: image/dicom3 < * Connection #0 to host localhost left intact * Closing connection #0 As you can see, the Content-Lenght is 0, and the image isn't downloaded. What is the correct way of implementing this?. Sorry, I found the solution (I just needed to create an instance of AResponse.ContentStream): AResponse.ContentStream := TFileStream.Create(lImage, fmShareDenyNone); try AResponse.ContentType := 'image/dicom3'; AResponse.CustomHeaders.Values['Content-Disposition'] := 'attachment; filename=' + ExtractFileName(lImage); AResponse.ContentLength := AResponse.ContentStream.Size; AResponse.SendContent; finally AResponse.ContentStream.Free; end; The filename might need to be between double quotes, like AResponse.CustomHeaders.Add('Content-Disposition= attachment; filename="blah blah.csv"'); because there might be some spaces in the name for example. Also, I am not sure but does the AResponse.ContentStream need to be freed after the SendContent or SendResponse? If I remember right, back it old delphi days with the proper way, the stream was not freed. Not sure how it works in FPC/Lazarus though. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New website www.lazarussupport.com launched
On 6/18/2010 08:29, Hans-Peter Diettrich wrote: Joost van der Sluis schrieb: Our company has launched the new www.lazarussupport.com website. Please take a look and tell what you think about it. Nice, but it deserves more careful(l) proofreading. AFAIR the official name is "Free Pascal" and "Florian Klaempfl", not sure about "usefull". I also prefer "multi platform" over "cross platform", just to distinguish between Delphi "X" (which only is a *Windows based* cross-compiler) and the FPC/Lazarus tools, which run natively *on* a multitude of platforms. DoDi Also, on page http://www.lazarussupport.com/lazarus/Overview abailable -> available usefull -> useful all across the site please :) (true, there are 2 LLs when you say usefully, but useful is with only one) develpment -> development "After all, the Free Pascal and Lazarus projects itself are completely written in Freepascal" itself -> themselves "developers like to keep the control of the projects in the hands of the developers only" sounds odd and maybe a little funny :) on page http://www.lazarussupport.com/lazarus/Support assitence -> assistance on working hours -> during working hours (2 places) "Included is also the maintenance support." -> Maintenance support is also included. I think someone else also mentioned 0.9.29 appearing on this page. on page http://www.lazarussupport.com/lazarus/GetLazarus sometimes the links does not have the "Hand" mouse-over icon (I use Firefox), thought clicking on them works. on page http://www.lazarussupport.com/lazarus/About "And at the same time we want to help the development of these open source projects moving forward by providing patches and help where we can." -> At the same time we want to help the development of these open source projects to move forward by providing patches and help where we can. on page http://www.lazarussupport.com/lazarus/Compiler?section2=Overview "patches that are send by others" -> patches that are sent by others (or submitted) Unfortunately I ran out of time, so can not read more pages ATM. I will try to check some more... Of course, I'm also not a native English speaker... so please double check. :) AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] problem opening html help pages with spaces in path
On 9/14/2010 09:33, Mattias Gaertner wrote: On Tue, 14 Sep 2010 19:28:19 +0300 Alberto Narduzzi wrote: Is there already a function for this that can be used in the LCL? I may guess... S := StringReplace(S, ' ', '%20', [rfReplaceAll]); I meant for all special characters. Mattias You can use the HTTPEncode function from .../packages/fcl-web/src/base/httpdefs.pp and the HTTPDecode to convert things back if needed. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus and FPC versions for Ubuntu 10?
Hi, I would do a build of FPC and Lazarus from SVN trunk. It works for me superbly and I don't have to worry about updates or keeping up-to-date with FPC/Lazarus. Nor waiting years for the latest packages to be updated and included in Ubuntu. The 2.5.1 trunk of FPC has a ton of new features and fixes/updates which I need and use without a problem. Building FPC and Lazarus from SVN can be a little bit tricky until one gets it right, but once you have it you will not look back. I can list my step by step install if you need (the first PITA item on the list is to install the VMWare tools into your Ubuntu so you will have copy/paste for the build process commands. This requires some kernel sources, etc.). AB On 9/26/2010 14:29, Bo Berglund wrote: I have just installed Ubuntu 10.04.1 desktop in a VMWare virtual machine. I also did a full update of everything after the install. Now for Lazarus In the Synaptic Package Manager I see versions: Lazarus: 0.9.28.2-8ubuntu1 FPC: 2.4.0-2 I don't know if these are current or if there is another way to get the right versions. Please suggest the best way to proceed. -- Bo Berglund -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus and FPC versions for Ubuntu 10?
OK, here it is guys. These steps are a little bit raw and some additional apt packages might be needed, but it works for me. Also I did not detail how to extract tar.gz files and such. == Linux install (about 5.6GB disk space is needed to finish, recommended at least 10-12GB disk for future Linux/FPC/Lazarus updates): need VMWare tools for the network and copy/paste. I use midnight commander (the "mc" apt package) to copy files, change owners, create symlinks, edit files, etc., I find it easier. START: sudo aptitude install build-essential linux-kernel-headers linux-kernel-devel get the ubuntu updates system/admin../update manager (or "apt-get update" , then "apt-get upgrade" from a terminal window as root or sudo) need VM reboot for VMWare tools copy paste to work in the terminal window.(did not detail how to install/compile VMWare tools) fpc, lazarus START: as user xx: "sudo apt-get install gcc libgtk2.0-dev build-essential libgdk-pixbuf-dev" "sudo apt-get install mc apache2 mysql-server php5 phpmyadmin libapache2-mod-auth-mysql php5-mysql" etc. if needed "sudo apt-get install subversion" (some people might not need apache or mysql or php5, Im developing web apps, so I did) cd /home/xx as user xx: http://www.freepascal.org/download.var (this is a web page) binary downloads for latest stable(!) FPC release (needed to compile the latest SVN trunk the first time) ex: wget ftp://ftp.freepascal.org/pub/fpc/dist/2.4.0/i386-linux/fpc-2.4.0.i386-linux.tar extract: binary.i386-linux.tar from it into /home/xx/ for example then extract from it the "base" and "utils" tars into /home/xx/fpc-2.4.0-bootstrap/ then extract these tar.gz files in there. (owner and group needs to be xx:xx) //not nobody:nogroup (for windows: ftp://ftp.freepascal.org/pub/fpc/dist/2.4.0/...win64.exe or win32 and install it "custom" with utils, make, etc.) as root (after sudo su -): copied the bin and lib folders into /usr/local (the bin files will be overwritten after new recompile, and the rest are in their own dir in /usr/local/lib/fpc/2.4.0) symlink in /bin to the ppc386 in /usr/local/lib/fpc/2.4.0/ so the "make" can find it (will be overwritten during "make install") run "/usr/local/lib/fpc/2.4.0/samplecfg /usr/local/lib/fpc/2.4.0 /etc" (creates a sample fpc.cfg in /etc) cd /home/xx/ type "fpc" to see if it is working and starts FPC 2.4.0 as user xx (important!): "svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc_svn" (full fpc latest development source code into dir fpc_svn under user xx's home dir) (to refresh later at any time: from /home/xx as user xx: "svn update fpc_svn") as user xx: cd /home/xx/fpc_svn "make clean all" if it complains about fpcmake -> ../fpc-2.4.0-bootstrap/bin/fpcmake and then "make clean all again" "sudo make install" (everything goes to /usr/local/bin/ , /usr/local/lib/fpc/... and /usr/local/share/doc/fpc/.. etc.) change the symlink in /bin/ppc386 or /bin/fpc to point to /usr/local/lib/fpc/2.5.1/ppc386 (where 2.5.1 is the latest SVN version checked out) as root or sudo -> in /usr/local/lib/fpc/2.5.1/ run "./samplecfg /usr/local/lib/fpc/2.5.1/ /etc" (FPC done, now Lazarus) cd /home/xx as user xx: "sudo apt-get install libx11-dev" (..LX11 missing error during make if not installed) "sudo apt-get install libgtk2.0-dev" (...gdk_pixbuf error during make if not installed) "svn checkout http://svn.freepascal.org/svn/lazarus/trunk/ lazarus_svn" (full lazarus latest development source code) (for refreshing the sources in the future: from /home/xx as user xx: "svn update lazarus_svn") cd /home/xx/lazarus_svn as user xx: "make clean all" "sudo make install" (everything goes to /usr/local/share/lazarus/) "make clean" (if wanna free up some space, not really needed, next round of make compiling will do it again) Getting Synapse: in /home/xx as user xx svn checkout https://synalist.svn.sourceforge.net/svnroot/synalist/trunk synapse_svn Getting ZEOS: in /home/xx as user xx wget http://downloads.sourceforge.net/project/zeoslib/Zeos%20Database%20Objects/zeosdbo-6.6.6-stable/ZEOSDBO-6.6.6-stable.zip unzip ZEOS*.zip into a zeos directory there (docs, src, Examples, packages) "cd ~" //to get to your home dir "startlazarus" //to start lazarus , NOT with sudo or as user root !!!. Will complain about FPC sources, this is ok. set up the fpc source dir in the environment options //ex: /home/xx/fpc_svn/ exit from Lazarus "startlazarus" again (complaining about FPC sources is gone) ZEOS install in Lazarus: package -> open .lpk file -> zeos/packages/lazarus/zcomponent.lpk -> install (rebuilds Lazarus) package -> install/uninstall packages add the needed packages (weblaz, lazwebextra, etc.) if there are any and do the rebuild from inside Lazarus (if there is a problem with rebuilding saying that it can't find...blahblah then the timestamp is not ok for some files due to the first svn checkout time delays b
Re: [Lazarus] Lazarus won't build on Ubuntu x64
Check your paths in your fpc.cfg , it seems the fpc.cfg used by the compiler points to a different version of FPC, or something similar. AB On 9/28/2010 17:47, Andrew Brunner wrote: Free Pascal Compiler at revision 16060. Lazarus from SVN at revision 27521. Build gets as far as ... Compiling masks.pas PPU Loading /usr/lib/fpc/2.5.1/units/x86_64-linux/fcl-base/contnrs.ppu Recompiling contnrs, checksum changed for Classes Fatal: Can't find unit contnrs used by Masks Fatal: Compilation aborted make[1]: *** [alllclunits.ppu] Error 1 make[1]: Leaving directory `/Developer/Lazarus/lcl' make: *** [lcl] Error 2 Done. Anyone else with this problem? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Where to set project search paths in lazarus?
On 9/30/2010 12:08, Juha Manninen (gmail) wrote: On Thursday 30 September 2010 13:38:25 Bo Berglund wrote: But Tortoise just initializes and transfers about 6 kb of data and then nothing more happens. After some time of nothing happening I try to Cancel, but that does not work so I have to close the dialog completely using the X button. Then in order to try again I have to delete the Lazarus folder with its hidden .svn subfolder and create a new one because Tortoise does not allow checkout any longer. Tried it three times now, always the same end: nothing is retrieved. Don't delete the folder but update it using TortoiseSVN. Then it will download the rest. I remember having the same issue myself. I am not developing with Windows so I can't give any better advice. I had to install Tortiose because all other downloads I could find were for installing an SVN *server*, which I don't want to do. So the only client I found was TortoiseSVN... Yes, with Linux everything is easier. :-) I understood you got the Lazarus trunk version working on Linux. Juha I'm using TortoiseSVN on Windows (both WinXP 32 and Win7 64) and it works perfectly for both FPC and Lazarus. Yes, on the older XP machine it takes a while and sometimes slows the computer down significantly - sometimes even as if the computer just stopped -, but it works. I use "http://svn.freepascal.org/svn/fpc/trunk"; as the url for FPC, and "http://svn.freepascal.org/svn/lazarus/trunk"; for the Lazarus checkout/update. Then run a .bat file to run the compilation and update of FPC and Lazarus while having a drink. I would not say that with Linux everything is easier - that is far not the case - , because both OS-es work and once you did it right, you will find it easy the following times on either platform... On Linux I use manual commands because I am too lazy to even create a script for them :) AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Converting Pascal Client/Server application into Web Client?
On 10/1/2010 08:11, Michael Van Canneyt wrote: On Fri, 1 Oct 2010, Michael Schnell wrote: On 10/01/2010 02:22 PM, Michael Van Canneyt wrote: ExtJS has no such mechanism to my knowledge, but I'm not a reference. last time I checked some months ago it was said to be a new feature, but should work, even though I did not find anybody who has tested it. This is necessary to overcome the asymmetry of the http protocol. IMHO "Server-Events" are necessary to design a CGI program with some complexity. Well, I create seriously complex applications. No such mechanism was necessary till now. Hmm, How to do notify the user that the server has finished complex work in the background without blocking the interface and/or creating excessive http polling traffic ? Define excessive polling ? An easy to do (non complex) example for a good application for such a method is a server that allows tow client to chat. Moreover "server-Internal-Events" like from Timers, serial or "direct" TCP/IP communication, thread-notification, ... are very desirable and should be able to fire "server-events" towards the client. Why ? What could you possibly need to do that the server needs to contact the client ? Everything you need can be programmed in the client, in my experience. Above trivial example ("chat server") Real-world: Imagine an "embedded" program automatically working with some hardware interfaces and/or serial and/or TCP/IP connections. Now you want to provide it with a "web" interface that allows a "user" to connect to it and do configuration and monitoring. For monitoring this method is essential: many "states" in the program permanently change due to the work of the program and the external situation. These state changes need to be shown in the remote browser with low latency and without excessive communication overhead. In my experience: keeping a connection open IS excessive communication overhead and very unreliable to boot. I thought like you, 12 years ago. Till reality kicked in. Faulty switches, company firewalls and whatnot. Not all servers/firewalls support HTTP 1.1 (for a persistent connection) etc. Too many problems. So you end up with polling anyway. 10 polls per second is enough to fool the human eye and doesn't stress the server too much. Michael. Aren't ExtJS Ajax calls asynchronous? The JavaScript code continues after firing a call to the server. There is a "callback" event that we can use when the server sent the reply back (and process success/failure events on the call). At least I had to do some things to NOT give back the control to the user over the client side until the response arrives from the FPC server CGI/FCGI app (like disabling all controls for example). IMO Exjs and FPC/Lazarus works superbly (you need FPC and Lazarus from the trunk SVN at the moment for it). You do not need ExtPascal at all. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Converting Pascal Client/Server application into Web Client?
On 10/1/2010 23:33, duilio foschi wrote: Some kind of tutorial for a start... Leonardo Rame blog is full of precious gems http://leonardorame.blogspot.com/2010/02/web-20-programming-with-object-pascal.html (and many other articles) Rgds Duilio Since those articles, FPC's FCL-web and Lazarus' fpweb/lazwebextra has more native ExtJS support built in (SVN Trunk) Only a fraction of Lazarus/FPC side coding is needed compared to it. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Converting Pascal Client/Server application into Web Client?
On 10/2/2010 00:00, ABorka wrote: On 10/1/2010 23:33, duilio foschi wrote: Some kind of tutorial for a start... Leonardo Rame blog is full of precious gems http://leonardorame.blogspot.com/2010/02/web-20-programming-with-object-pascal.html (and many other articles) Rgds Duilio Since those articles, FPC's FCL-web and Lazarus' fpweb/lazwebextra has more native ExtJS support built in (SVN Trunk) Only a fraction of Lazarus/FPC side coding is needed compared to it. AB Forgot to mention that there are some basic demos created by Michael under fpc/packages/fcl-web/examples/webdata/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazWebData package
On 10/3/2010 14:05, Leonardo M. Ramé wrote: Hi, I was trying to play with the new demos from packages/fcl-web/examples and found that them require the package lazwebdata, where can I find it?. It is in Lazarus, called Lazwebextra -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazWebData package
On 10/3/2010 14:31, Leonardo M. Ramé wrote: On 2010-10-03 14:23:41 -0700, ABorka wrote: On 10/3/2010 14:05, Leonardo M. Ramé wrote: Hi, I was trying to play with the new demos from packages/fcl-web/examples and found that them require the package lazwebdata, where can I find it?. It is in Lazarus, called Lazwebextra Uh, ok. Then, I have to change the references to lazwebdata, in the examples, to lazwebextra? No, Lazwebextra is just the name of the package you have to install in Lazarus to have the additional components installed. After installing the package, you can forgot the name lazwebextra you will never use it in your code. Once you've installed the packages weblaz and lazwebextra and Lazarus is then recompiled, you can compile those example programs. BTW, I've already raised this naming confusion issue with the developers, hopefully they will standardize the package names with the feature names and components. Some different icons for the toolbar components would be nice to have also :) 1. Currently we have package named WEBLAZ that provides us with the Lazarus FPWEB components. 2. We now have a LAZWEBEXTRA package too, that is also part of the Lazarus FPWEB components, this is just in a separate package for now until the next Lazarus release, theoretically. 3. We have the FCL-WEB that is part of the FPC's (Free Pascal Compiler) FCL (fere component library) that contains all the base and non-design time components for web development (fpweb, namely the weblaz/lazwebextra packages are based on this) Confused enough yet? ;) AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] LazWebData package
On 10/3/2010 15:05, Leonardo M. Ramé wrote: On 2010-10-03 14:55:03 -0700, ABorka wrote: On 10/3/2010 14:31, Leonardo M. Ramé wrote: On 2010-10-03 14:23:41 -0700, ABorka wrote: On 10/3/2010 14:05, Leonardo M. Ramé wrote: Hi, I was trying to play with the new demos from packages/fcl-web/examples and found that them require the package lazwebdata, where can I find it?. It is in Lazarus, called Lazwebextra Uh, ok. Then, I have to change the references to lazwebdata, in the examples, to lazwebextra? No, Lazwebextra is just the name of the package you have to install in Lazarus to have the additional components installed. After installing the package, you can forgot the name lazwebextra you will never use it in your code. Once you've installed the packages weblaz and lazwebextra and Lazarus is then recompiled, you can compile those example programs. BTW, I've already raised this naming confusion issue with the developers, hopefully they will standardize the package names with the feature names and components. Some different icons for the toolbar components would be nice to have also :) 1. Currently we have package named WEBLAZ that provides us with the Lazarus FPWEB components. 2. We now have a LAZWEBEXTRA package too, that is also part of the Lazarus FPWEB components, this is just in a separate package for now until the next Lazarus release, theoretically. 3. We have the FCL-WEB that is part of the FPC's (Free Pascal Compiler) FCL (fere component library) that contains all the base and non-design time components for web development (fpweb, namely the weblaz/lazwebextra packages are based on this) Confused enough yet? ;) AB You are right...but, I have installed LazWebExtra (I can see all the new components), and when I try to open any of the examples on fcl-web/examples the project is requiring lazwebdata, just take a look at the lpi's: grep -rH "\"lazwebdata\"" * webdata/demo4/extgrid.lpi: webdata/demo2/extgrid.lpi: webdata/demo5/extgrid.lpi: webdata/demo6/extgrid.lpi: webdata/demo3/extgrid.lpi: I've just updated from svn's trunk version. Ahh yes, I remember now. That is the old name of that package, I had the same problem, it seems it was not fixed in the SVN. All you need to do is just remove that dependency from the project and it will compile. Just remove lazwebdata from everywhere it is mentioned, because that is just some leftover. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fp-Web and FastCGI
On 10/10/2010 11:51, Michael Van Canneyt wrote: On Sun, 10 Oct 2010, Leonardo M. Ramé wrote: On 2010-10-10 13:34:30 -0300, Leonardo M. Ramé wrote: exception at 00466EEA: Failed to open input-handle passed from server. Socket Error: 88. Now I'm stuck, somebody can help me with this?. I figured out that I was configuring wrongly my apache2. Instead of using FastCgiExternalServer I changed it for this: FastCgiServer /var/www/fcgi-bin/myfastcgiapp.fcgi -idle-timeout 3 Also, I was using a symbolic link to /var/www/fcgi-bin/myfastcgiapp.fcgi, and now I just copied my app to that directory. Then, I restarted apache2, and went to http://localhost/fcgi-bin/myfastcgiapp.fcgi and, got a *more friendly* response. I removed my TFPWebModule actions, and added just this global request handler: procedure TFPWebModule1.DataModuleRequest(Sender: TObject; ARequest: TRequest; AResponse: TResponse; var Handled: Boolean); begin AResponse.Content := 'Hello World!'; You're missing AResponse.SendResponse; Handled is supposed to be set only after the response has been sent. CGI additionally checks if content was sent, but fastcgi not. Maybe we should add this check to FastCGI. Michael. Yes, please :) it would be super. We should not have that ".SendResponse" line at all in our event handlers, just like with CGI and Apache modules with fpweb. Handled := true; should only be checked after the event handler finished, as an indicator that the request was handled and the response was generated and can be found in the ".Content" . What is the purpose of the Handled parameter if not this with cgi/fcgi/apache_module? AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] WebData
On 10/15/2010 05:40, Leonardo M. Ramé wrote: On 2010-10-15 14:24:48 +0200, Michael Van Canneyt wrote: After removing the TSqlQuery and TSQLTransaction components from my app, a new question came to my mind, in the case of complex inserts/updates that involves more than one database table, is it possible to use transactions?. Hm. Not if you use the TSQLDBWebDataProvider. To do that, you would have to use TSQLSuery and a regular TWebDataProvider, and hook into the Before/after post events of the TSQLQuery. But I'm certainly open for suggestions for improvements. Michael. Well, It's not an issue at all, I could create a stored procedure in charge of receiveing the params from the dataprovider, then adapt them to their respective tables. It's not an issue because I usually work with Firebird and PostgreSql, and they have stored procedures. I ask this because I'm thinking of adding a new layer of abstraction by letting the TFPWebProviderDataModule load a configuration from, say, an XML file with the list of Providers and its Select, Insert, Update, and Delete statements, like this: select * from customers select * from customers where IdCustomer=:IdCustomer insert into customers(Name, Age) values(:Name, :Age) update customers set Name=:Name, Age=:Age where IdCustomer=:IdCustomer delete from customers where IdCustomer=:IdCustomer With this data, the cgi/fcgi app could dynamically create the TPWebProviderDataModule and everything else. What do you think about this? But you can do these things already, I believe. I had multiple tables and some simple access rights to different people so my SQL statements had to be different for everyone to get different records from the tables. What I did is, I started from the first demo example found in fcl-web/examples/webdata/demo/ and created ONE action called "CRUD" that handles all the crud request from the extjs clients. However, I am passing some additional parameters that specifies which table is to be used and what needs to be done (Create, Read, Update, Delete). From the session I got who is the user, so I was able to prepare the proper SQL statements myself. For example, the extjs data store proxy looks like this in the client side extjs: === var myproxy = new Ext.data.HttpProxy ( { api : { //XML // create: GetCGIURL('/CRUD?format=xml&t=0&d=0'), // read:GetCGIURL('/CRUD?format=xml&t=0&d=1'), // update: GetCGIURL('/CRUD?format=xml&t=0&d=2'), // destroy: GetCGIURL('/CRUD?format=xml&t=0&d=3') //end of XML //JSON create: GetCGIURL('/CRUD?t=0&d=0'), read:GetCGIURL('/CRUD?t=0&d=1'), update: GetCGIURL('/CRUD?t=0&d=2'), destroy: GetCGIURL('/CRUD?t=0&d=3') //end of JSON } }); == You can see that I am passing the "t" and "d" additional parameters. "t" can be the table/database to use and "d" can be the action to be performed (create, read, update, delete), etc. In the web module "crud" action I just need a case statement for the different SQL statements based on these passed parameters. Of course it is more complicated to build the actually executed SQL statements in my app, because I also process the sort order, the number of records to be returned, and have some record filtering coming form the extjs client, and as mentioned above, based on the user different records needs to be returned, etc. Plus, I created some additional actions in the webmodule for other things like a "keepalive" call from the client so the session is not closed if the user uses the client for a long time but there are no server calls to refresh the session, and so on for other things and responses, web pages with templates, like login/logout, etc. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] WebData
On 10/15/2010 12:23, Joshua Lim wrote: Hi, fetching data from the database aside, how about web session management for a multiple user website? Web scripts like php come with session management built-in. What is the best way to do that using pascal? Thanks. Also built-in into fpweb (the cookie sessions management that is). You can see examples under /lazarus/components/fpweb/demo/session and /lazarus/components/fpweb/demo/fptemplate/sessions/cookiesessions... /lazarus/components/fpweb/demo/fptemplate/sessions/urlsessions... AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] WebData
On 10/16/2010 03:24, Michael Van Canneyt wrote: On Fri, 15 Oct 2010, ABorka wrote: On 10/15/2010 05:40, Leonardo M. Ramé wrote: On 2010-10-15 14:24:48 +0200, Michael Van Canneyt wrote: After removing the TSqlQuery and TSQLTransaction components from my app, a new question came to my mind, in the case of complex inserts/updates that involves more than one database table, is it possible to use transactions?. Hm. Not if you use the TSQLDBWebDataProvider. To do that, you would have to use TSQLSuery and a regular TWebDataProvider, and hook into the Before/after post events of the TSQLQuery. But I'm certainly open for suggestions for improvements. Michael. Well, It's not an issue at all, I could create a stored procedure in What do you think about this? But you can do these things already, I believe. I had multiple tables and some simple access rights to different people so my SQL statements had to be different for everyone to get different records from the tables. What I did is, I started from the first demo example found in fcl-web/examples/webdata/demo/ and created ONE action called "CRUD" that handles all the crud request from the extjs clients. However, I am passing some additional parameters that specifies which table is to be used and what needs to be done (Create, Read, Update, Delete). From the session I got who is the user, so I was able to prepare the proper SQL statements myself. Is there any chance to put this in a kind of component that does most of the boilerplate work ? I would imagine 2 events: OnGetConnection = Procedure (Sender : TObject; Var AConnection : TSQLConnection) of object; OnGetQuery = Procedure (Sender : TObject; UpdateKind : TUpdateKind; SQL : TStrings); of object; Michael. Yes, theoretically it can be made a bit cleaner and easier by improving the webdata components, but there are a lot of additional parameters that can come in from Extjs. For example, I am using Extjs grids and processing the following incoming parameters when creating my SQL statements: table(s) to use /an id number what data is needed/ operation to perform /c, r, u, d/ start /starting record/ limit /number of records to return/ sort /sort by this field, this can be tricky for calculated fields/ dir /sort order if needed: ASC DESC/ fields /filter on these fields/ query /value(s) to look for in the filtered fields/ So creating the proper SQL statements definitely involves some work for the different Extjs client grids I use. The access rights for the users for the different database records also need to be taken into account. Additionally, a separate SQL statement is needed to get the total number of records and properly replace it in the response that is returned to the Extjs client. That is, because not all the records are returned, just the ones that fit into one grid page. With thousands plus records it is necessary, so the communication and response time is relatively fast. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpweb - SessionDir bug?
It works here. I am also using session cookies from fpweb and they are working here (windows and ubuntu in VMWare). Even have some working projects on go daddy hosting where I even changed the session dir to be under the cgi program so I can check/delete the session cookie files. AB PS: Just a thought... you are allowing cookies in your browser from that site you are testing with right? On 10/21/2010 10:06, patspiper wrote: The cookiesession demo project does not create any files in the /tmp folder (Ubuntu 10.04). This could be a permissions issue. I uncommented and set S.SessionDir in the cookiesession demo project to a folder which is writable by all, with no results! Is it a bug? Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpweb - SessionDir bug?
On 10/21/2010 10:06, patspiper wrote: The cookiesession demo project does not create any files in the /tmp folder (Ubuntu 10.04). This could be a permissions issue. I uncommented and set S.SessionDir in the cookiesession demo project to a folder which is writable by all, with no results! Is it a bug? Stephano What is your FPC and Lazarus version btw? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] GUI development for web UI
On 11/24/2010 03:11, michael.vancann...@wisa.be wrote: On Wed, 24 Nov 2010, ik wrote: On Wed, Nov 24, 2010 at 12:46, wrote: I did some research on that some months ago. I found that this supposedly best would be done using "ExtJS". There are few problems with ExtJS. First it's not open source if you wish to use it in commercial apps (dual license is complicated). What is the problem with buying a license if you make a commercial product ? There are a lot of issues with it. Let's take MySQL for example, If you connect to it in a commercial app, then you require to buy a commercial license, but if you release the connection code it's GPL, however if you are using Connector/J or ConnectorC, you do not have to, and so does with PHP. Now If I use the FPC connection code (it's open source and available for all), do I require to release my code that works with MySQL or not ? I really do not know the answer here... Now if I build a web app for my clients and they have the source code, do I require to buy a commercial license of ExtJS ? Yes, because you make money on it, it is not open source. If I use some sort of "binding" for the code of ExtJS, that is my own API for the their code and release it in OpenSource, does a commercial web app that uses it, should buy a commercial license ? Yes, because they use ExtJS. It's not that simple as it sounds, and hence, it complicate everything, there are many scenarios that are not that simple to understand what you should do (in open source, and in commercial, so when it's dual license, it's even harder). I agree that dual-license is tricky, but that has never stopped me from using a toolkit, if it is good. MySQL I simply don't use because it is a bad database engine :-) I think you guys are not exactly correct regarding the ExtJS license. http://lazarus.freepascal.org/index.php/topic,10125.msg52756.html#msg52756 "According to the linked ExtJS licensing FAQ, you have obligations to publish the ExtJS JavaScript code that YOU have modified AND(!) you are distributing it. So, in-house projects are excluded by default, as well as all extensions you have downloaded from the Internet - since those are already published back to the community. As I've noted, I never needed to extend ExtJS so far, always found that someone else did what I needed already. Either case, it does not affect your FPC/Lazarus project parts." In my opinion ExtJS is absolutely the best framework to use on the client side GUI within a browser, and Lazarus/FPC 100% supports it right now (0.9.29/2.51). You do not need ExtPascal or any other additional libraries to build superb systems with it. You do not need to buy ExtJS licenses either. As for MySQL usage...I do not have any problem with using that either in my web projects (Im using ZEOS library to access the DB). It is still by far the most used and available DB for web apps/web servers. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] GUI development for web UI
On 11/25/2010 02:21, Michael Schnell wrote: On 11/25/2010 10:29 AM, ik wrote: http://www.sencha.com/products/license.php I don't see how the Open source (GPL) license should affect the Pascal code of an application that uses ExtJS (the pascal code same is obviously not "based on / derivative work of" the GPLed Java script code.) and the Java script code effectively used by the application is obviously distributed as source code. And the application is not a "development library" or "Tool Kit". If a future Lazarus (which supposedly could be considered a "toolkit") would contain an "ExtJS Widget Type" it would need to be distributed without any part of ExtJS itself, and thus the Application developer would need to fetch ExtJS from their Website himself. -Michael Exactly. IMO the FreePascal CGI/FCGI/Apache_module is not affected by the ExtJS License. If you, yourself, make changes to ExtJS and modify/extend it for your project, then that is a different matter. In that case you need to publish your ExtJS modifications (not your FreePascal CGI/FCGI/Apache_module). However, in my experience this is very very rare, because most modifications needed (custom classes, object modifications, etc.) in ExtJS are already done by someone somewhere and are published. All you need to do is download and use them in your JavaScript code. I always found the needed ExtJS extensions online, never needed to develop them myself (A custom GridView for example, a double click sorting functionality on the GridView header fields, etc.). Your end user/client can do the same (download and extract ExtJS and the needed extensions) during the installation process, so you are not distributing ExtJS with your application (modified or not). Of course, a "Powered by ExtJS" link on the bottom of your web pages is a nice-to-have. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] GUI development for web UI
On 11/25/2010 02:21, Michael Schnell wrote: > On 11/25/2010 10:29 AM, ik wrote: >> >> http://www.sencha.com/products/license.php >> > I don't see how the Open source (GPL) license should affect the Pascal > code of an application that uses ExtJS (the pascal code same is > obviously not "based on / derivative work of" the GPLed Java script > code.) and the Java script code effectively used by the application is > obviously distributed as source code. And the application is not a > "development library" or "Tool Kit". > > If a future Lazarus (which supposedly could be considered a "toolkit") > would contain an "ExtJS Widget Type" it would need to be distributed > without any part of ExtJS itself, and thus the Application developer > would need to fetch ExtJS from their Website himself. > > -Michael Exactly. IMO the FreePascal CGI/FCGI/Apache_module is not affected by the ExtJS License. If you, yourself, make changes to ExtJS and modify/extend it for your project, then that is a different matter. In that case you need to publish your ExtJS modifications (not your FreePascal CGI/FCGI/Apache_module). However, in my experience this is very very rare, because most modifications needed (custom classes, object modifications, etc.) in ExtJS are already done by someone somewhere and are published. All you need to do is download and use them in your JavaScript code. I always found the needed ExtJS extensions online, never needed to develop them myself (A custom GridView for example, a double click sorting functionality on the GridView header fields, etc.). Your end user/client can do the same (download and extract ExtJS and the needed extensions) during the installation process, so you are not distributing ExtJS with your application (modified or not). Of course, a "Powered by ExtJS" link on the bottom of your web pages is a nice-to-have. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb and templates
On 12/17/2010 05:34, ik wrote: Can I load sub template inside the main template ? Ido LINESIP - Opening the source for communication http://www.linesip.com http://www.linesip.co.il On Fri, Dec 17, 2010 at 15:30, Michael Van Canneyt mailto:mich...@freepascal.org>> wrote: On Fri, 17 Dec 2010, ik wrote: Hello, I'm trying to Create a template that only the content changes inside, like I do with Sinatra and Rails, using fpWeb. In Sinatra for example you have a file called layout.erb that contains the layout, and inside there is a yield for the content. How can I do the same using fpWeb ? In much the same way, I expect ? In an action, configure the template property: - Set filename - In the OnReplaceTag event, set the content. Michael. There are examples for using templates in ...lazarus/components/fpweb/demo/fptemplate/... also, there is a discussion that contains info about how to do nested templates at http://www.lazarus.freepascal.org/index.php/topic,10814.0.html AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Next FPC official release
On 3/4/2011 09:54, Vincent Snijders wrote: 2011/3/4 Vincent Snijders: If you use lazarus trunk svn head,with fpc trunk, you must use fpc trunk *svn head* too. You did not, so your fpc 2.5.1 was too old. So, if you update lazarus and compilation fails with fpc 2.5.1, you must update fpc too. Vincent Just as a note, sometimes there can be additional problems with compiling FPC/Lazarus from SVN. In both the case of FPC and Lazarus, sometimes a file or two gets moved between directories in the SVN directory tree and when someone does a "make clean..." after an "svn update..." the clean will not remove the older one from the install "units" directory and that can cause problems with future compiles, rebuilds. Sometimes I got "checksum changed" error in a file at rebuild, sometimes packages did not compile, sometimes the rebuild did not find things, etc. I just had this problem a few days ago when after 2-3 months I updated my FPC and Lazarus SVN from the trunk and tried to recompile both. 1. First of all I had to delete the target directories of the installed versions of FPC and Lazarus ("make clean" should do this but since the moved file is now in a new directory, it tries to delete it from the new place instead of from the old place therefore leaving the old one there) 2. Then I deleted all SVN checkouts for both FPC and Lazarus and checked them out again into a clean directory 3. I used the last stable FPC version to compile the new FPC trunk first (sometimes you can not successfully compile the latest FPC 2.5.1 with a one or two months old FPC 2.5.1) 4. Then I could compile the latest SVN FPC again with itself (compiled a 2.5.1 with a 2.5.1 made by a 2.4.xconfused enough yet?) 5. Checked out Lazarus from SVN into a clean dir and built it, installed it 6. Removed the Lazarus settings directory before 1st start and then tested a rebuild from within Lazarus after setting the FPC dir in the environment menu. If this works without a problem, you can start adding the packages you use. 7. I had a problem with the latest stable Zeos 6.6.6 because it did not compile. After looking it up on the net, I found the necessary changes needed for Zeos to compile (changes were needed in one of the source files, ZClasses.pas) under FPC 2.5.1. After a few hours I had a newly working FPC/Lazarus installation. This all is not for the faint heart... but can be done. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus missing sqlite.dll after recompile, when sqlite was never used before
I refreshed Lazarus and FPC from the SVN trunk and recompiled them. Now, suddenly, rebuilding Lazarus does not work, because upon restart it is saying "This application has failed to start because sqlite.dll was not found. ..." Of course it does not find it, I never used sqlite in my life, it is not in the system. Why is this suddenly happening? And most importantly, how can this be fixed? Thanks for any help, AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus missing sqlite.dll after recompile, when sqlite was never used before
Well, I was able to start lazarus.old.exe and remove the sqlite package that was there (for what reason I have no idea). Also, it would be great if all the packages would have some package info text so we actually know what to remove and add before rebuilding. printers4lazide 0.0 weblaz 0.0 lazcontrols 0.0 fpcunitide 0.1 and a dozen others have zero information about them, not to mention their names are sometimes very cryptic. One example from the many packages: What "exploreidemenu 0.0" package does or good for if someone installs it? Is there a list somewhere about what are the basic packages one needs to have the vanilla Lazarus? AB On 4/8/2011 23:15, ABorka wrote: I refreshed Lazarus and FPC from the SVN trunk and recompiled them. Now, suddenly, rebuilding Lazarus does not work, because upon restart it is saying "This application has failed to start because sqlite.dll was not found. ..." Of course it does not find it, I never used sqlite in my life, it is not in the system. Why is this suddenly happening? And most importantly, how can this be fixed? Thanks for any help, AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FCL-web and bandwidth usage
michael.vancann...@wisa.be schrieb: Javascript is not something you can avoid. People have come to expect a certain functionality from a website, which can only be delivered with Javasvript. If you don't provide it, your product will not sell. It's as simple as that. I doubt that. Just the opposite: A web page which uses scripting will not be displayed when NoScript is on. So you don't reach all possible customers. Believe me, I will reach far less customers by not using Javascript, namely: zero. I make a distinction between websites and webapps. We do not make general purpose websites, but web applications for a specific audience. There is a huge difference. These applications must behave and act as a desktop application, this is a requirement. This is not possible without Javascript. Then you may ask, why not simply program a desktop application ? Simple: people do not want an installer or updater. If it was not for that small detail, I would not touch web programming with a long stick. No set standards, different and ever-changing browsers, a language that sucks big time. But alas... Michael. ...And it does not matter what platform they are using, it will work without problems. No drivers needed, no libraries needed, no version issues. Javascript will not go away, it will become more popular over time. This is the trend the last ten years and it just gets more popular as more and more Java apps are ported over. It saves huge bandwidth (not to mention responsiveness and client side speed)to use javascript apps client side with modern browsers. You download the data and until it changes you do not need to talk to the server other than some update checks on the data if it is multi-user. I can not emphasize enough how much time it saved for me to do my projects as javascript (ExtJS based) web apps (using fpweb server side back-end). No matter if the client is Mac, PC or mobile device, it works. As for NoScript addon usage, I am using it too. If the web app I need to use needs Javascript, I enable that one website (but not letting google, and the other crap ad companies to run scripts). You can not get around this. But you need to be pretty aware of this and manage it manually which is not for 99% of web users. A few million NoScript users does not hold a candle to the hundreds of millions without it who does not even know what Java or Javascript is. This is the way the internet works, and it will not change people as the past 30 years show. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Package: Adding httpd.pas link error in linux
I did not check this, but is it possible that - due to fpc.cfg or directory ordering, etc. - on Linux it pulls httpd from the wrong directory? There are multiple httpd directories in FPC packages for different Apache versions. You should delete all but the one you actually need so the compiler finds that one for sure (httpd13, httpd20, httpd22). Also, if you have your own httpd.pas unit there can be conflict because all above dirs have httpd.ppu AB On 7/6/2012 16:48, Mattias Gaertner wrote: On Sat, 7 Jul 2012 02:34:16 +0300 Zaher Dirkey wrote: On Sat, Jul 7, 2012 at 1:03 AM, Mattias Gaertner wrote: Have you installed the libapr on your system? Have you installed the development package of libapr? Mattias It is already installed The problem not happned if i used httpd.pas in the project directly, but in package it give me that error when linking Lazarus. Are you aware that fpc has a httpd.ppu? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus assembler debug window format
Is there a way to see the assembler debug window in Intel format instead of AT&T? It seems the code is always displayed in AT&T syntax. Tried in Win32/Win64, latest SVN Lazarus and FPC build. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus assembler debug window format
Thanks, this helped. Using this "disassembly-flavor" variable I found this old thread on the forums http://www.lazarus.freepascal.org/index.php?topic=8741.0 and from there I was able to figure it out and set this in Lazarus -> Tools -> Options -> Debugger -> General The "Debugger_Startup_Options" value to -eval-command="set disassembly-flavor intel" and voila, it works. AB On 8/24/2012 21:50, leledumbo wrote: I don't see any way to interact with the debugger, so it's not possible ATM. GDB can be set to display disassembly in intel syntax through "set disassembly-flavor intel" but we need a way to feed it to GDB. Please file a feature request. -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Lazarus-assembler-debug-window-format-tp4025922p4025923.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] SVN compile of Lazarus has a problem with "make install" on Windows
Windows 8 64bit Latest Lazarus SVN 1. make all (works OK) 2. make install gives error when the copying of startlazarus.exe, lazbuild.exe, lazarus.exe comes, because it tries to copy these files without extension and that does not exist. Renaming them to do not have extension fixes the issue (obviously) but after the install finishes we need to name them back in the destination directory to .exe . AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazweb / fpWeb apache module initial project does not compile
Lazarus can not compile the initial project after File->New->Project->Apache Module, because it gives mod_apache1.lpr(35,15) Error: identifier idents no member "SetModuleRecord" Created a bug report about it: http://bugs.freepascal.org/view.php?id=19176 Also, is the word "idents" correct in the error message? The spell checker here does not seem to know it. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus SVN 30328 is not compiling
C:/pp/bin/i386-win32/ppc386.exe -MObjFPC -Scghi -O1 -gl -vew -l -dLCL -dLCLwin32 -Fu../lcl/units/i386-win32/win32 -Fu../lcl/units/i386-win32 -Fu../packager/units/i386-win32 -Fu. -FE. -FUunits/i386-win32 -di386 ideintf.pas Free Pascal Compiler version 2.5.1 [2011/04/16] for i386 Copyright (c) 1993-2011 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling ideintf.pas Compiling actionseditor.pas Compiling objinspstrconsts.pas Writing Resource String Table file: objinspstrconsts.rst Compiling componenteditors.pas Compiling lazstringgridedit.pas Compiling checklistboxeditordlg.pas Compiling ideimagesintf.pas Compiling checkgroupeditordlg.pas Compiling propedits.pp Compiling texttools.pas Compiling frmselectprops.pas Compiling idewindowintf.pas Compiling stringspropeditdlg.pas Compiling columndlg.pp Compiling collectionpropeditform.pas Compiling propedits.pp Compiling propeditutils.pp propedits.pp(1781,5) Error: Expected another 1 array elements propedits.pp(6673) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted . . . -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus SVN 30328 is not compiling
On 4/17/2011 00:14, Juha (gmail) wrote: Paul Ishenin kirjoitti sunnuntai, 17. huhtikuuta 2011 08:00:04: 17.04.2011 7:13, ABorka wrote: propedits.pp(1781,5) Error: Expected another 1 array elements propedits.pp(6673) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted Fixed in r30332. Ok, it wasn't caused by my commit (r30328) then, it was a new FPC trunk version. Juha It is OK now, it compiles. There is one little issue I noticed, and it is that Norton AV says that there is a Mad.5011 virus in "syngutterchanges.ppu" :) and it always removes it. So if anyone gets this, just suspend the AV until Lazarus is fully compiled and installed. Not sure how can this be fixed... AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb & fcgi
On 5/8/2011 20:41, Lee Jenkins wrote: I have a web type project coming up and decided to poke around in the fpWeb stuff. My, you guys have been busy, I never took a good look around the fpweb/laz web sources till today. I was thinking of using php with symfony or one of the smaller frameworks, but its a bit overkill for my project. I'm considering using fpweb/lazarus so I'm writing a small test application. I thought I saw mention of a embedded web server available? I currently have a pretty simple embedded server using synapse that is a modified version of the demo that comes with the sources. I was thinking of writing a TCustomWebApplication to use that. But I did remember somewhere in a recent thread, there was mention of an existing embedded server...? Also, if its not too much trouble, a sample of someone's declaration, etc for httpd.conf, I'd appreciate it. I'm looking at samples on the web now for setting up apache for fcgi, but most of its for php fcgi setup and I'm trying to get my head around setting apache to look for fpweb fcgi apps to handle requests. What I'd like to do is work through the process of writing a small sample app (easy peasy) and then setting up the environment to start testing right away so if I ask a lot elementary questions... I'll be documenting the creation of a small web app that will be using some of the basic stuff in fpweb like templates, sending xml/json, using content producers, etc including setting up for the different host environments like apache vs fcgi, etc. I'll put it on the wiki or submit it over the tracker when I'm finished. Thanks, -- Warm Regards, Lee http://www.lazarus.freepascal.org/index.php/topic,12817.msg66447.html#msg66447 has some info on the apache FCGI config. Use FPC and Lazarus from the latest SVN sources to get the latest updates and fixes. (note, that currently Apache modules are not compiling properly /no errors, only the modules does not work/, so only use CGI or FCGI). AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb - Redirects
Is it enough to change AResponse.Code := 3xx and AResponse.Location := 'http://..."; from within a handler to cause a redirect? Thanks, -- Warm Regards, Lee Response.SendRedirect('http://...'); takes care of everything. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb FCGI Setup
Hi all, I'm trying to get fcgi setup and running on my windows box so I can test some of modules and I'm still try to figure out what I need to do. A sample fcgi project produces an exception when run "Failed to open input handle passed from server. Socket error 10038.". I had thought that the fcgi server just started and waited for connections from the webserver but it looks like it is trying to connect to an assume socket as soon as it starts. Sorry, I can't tell exactly, the ide won't let me debug down passed Application.Run line in the .lpr. Not sure how I would debug like without it being started already... Windows Vista, Lazarus snapshot a week or so old. Thanks, -- Warm Regards, Lee You need to specify the port your FCGI application will be listening on in your project main file (.lpr): . . . Application.Title:='My FCGI Application'; Application.Port:=2015;//Port the FCGI application is listening on Application.Initialize; Application.Run; . . . AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb FCGI Setup
Hi all, I'm trying to get fcgi setup and running on my windows box so I can test some of modules and I'm still try to figure out what I need to do. A sample fcgi project produces an exception when run "Failed to open input handle passed from server. Socket error 10038.". I had thought that the fcgi server just started and waited for connections from the webserver but it looks like it is trying to connect to an assume socket as soon as it starts. Sorry, I can't tell exactly, the ide won't let me debug down passed Application.Run line in the .lpr. Not sure how I would debug like without it being started already... Windows Vista, Lazarus snapshot a week or so old. Thanks, -- Warm Regards, Lee You need to specify the port your FCGI application will be listening on in your project main file (.lpr): . . . Application.Title:='My FCGI Application'; Application.Port:=2015;//Port the FCGI application is listening on Application.Initialize; Application.Run; . I know its a bit off topic, but I've been trying to get fastcgi configured with apache off and on for a week now and I have yet to figure out the specific combination. My httpd.conf looks like this for fcgi: LoadModule fcgid_module modules/mod_fcgid.so SetHandler fcgid-script Options execCGI AllowOverride None Order allow,deny Allow from all AddHandler fastcgi-script .fcgi .fcg Alias /fastcgi-bin "M:\LazProjs\test_projects\test_fpweb\www\pos.fcgi" FastCgiExternalServer "M:\LazProjs\test_projects\test_fpweb\www\pos.fcgi" -host 127.0.0.1:2015 I've downloaded the fcgid .so and put it in the modules folder. I've tried all manner of combination of directories, changing directories vs. settings in httpd.conf, etc. Just can't seem to get apache configured correctly. Most of what I've been able to find is scattered around in terms of any real examples of setting up fastcgi on apache. The apache server never hits the fcgi server for requests. I convinced the client to let me put a prototype together and I'm about 5 days of trying at this point so any suggestion anyone might have about getting fastcgi with apache connecting to the lazarus fcgi server would be really appareciated. :-) -- Warm Regards, Lee It seems you are trying to use the fcgid module that comes with Apache and Linux distributions. That will not work most probably. You need the original fastcgi from the official website http://www.fastcgi.com/dist/ . I did list steps for both Windows and Linux (you have to compile from sources on Linux) in this forums thread somewhere: http://www.lazarus.freepascal.org/index.php/topic,12817.0.html AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TFPWebModule.ActionVar
What is it used for? -- Warm Regards, Lee There can be many uses for it, but not always necessary of course. It is basically a way to pass the action name to fpweb as a parameter. From the simplest query parameter passing the action name, to the more difficult way of handling encrypted action names and parameters, etc. I have a project using the latter for example. In that project all the URLs are looking something like: https://www.somewebsite.com/mymodule/2C5DC93248CB271880F576D6F1D9?4384498578034E573B4796C1 No cookies used for anything at all for example, for security reasons. Everything is encoded in the action parameters. Both the action name and action parameters are encrypted, and encrypted differently every time. To pre-process this kind of URL (basically decrypt) the action var is used (not directly from the URL) on the fly at runtime after decryption, to pass the called action name to fpweb. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb and static content
What is the typical strategy to server up static content with fpWeb? JS, css files, given that its handler centric. Create a default handler that checks for file extension in the .PathInfo? -- Warm Regards, Lee Why would you need fpweb to serve static content? Your web server does that. CGI/FCGI and apache modules (fpweb) are to generate dynamic content. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb FCGI Setup
On 5/26/2011 09:30, silvioprog wrote: Hi. I could never run a FastCGI module. :( My steps (without success): 1. Download and install lasted XAMPP; 2. Download "http://www.fastcgi.com/dist/mod_fastcgi-2.4.6-AP22.dll"; em copy to "C:\xampp\apache\modules\mod_fastcgi-2.4.6-AP22.dll"; 3. Edit the "C:\xampp\apache\conf\httpd.conf" to: LoadModule rewrite_module modules/mod_rewrite.so LoadModule fastcgi_module modules/mod_fastcgi-2.4.6-AP22.dll FastCGIConfig -autoUpdate -idle-timeout 120 -killInterval 3600 -maxClassProcesses 3 -maxProcesses 15 -startDelay 30 AddHandler fastcgi-script .fcgi 4. Restart Apache; 5. Create, compile and copy the my demo (in attached) to "C:\xampp\cgi-bin\test.fcgi"; 6. Open in Firefox the link "http://localhost/cgi-bin/test.fcgi";; And not works. When I open the link, Firefox freezes, as if the module was on infinity loop. How do I fix it? Thx. Do not pull (all) your hair yet :) I was testing FCGI with fpweb the past day or so on Windows, and it seems to be broken and only the FastCgiExternalServer way is working. In fact, you are correct that there is an infinite loop, and that is Apache trying to start up the FCGI application continuously at startup, but it keeps exiting. You can see it in the apache error logs. On Linux, everything works OK for both mod_fastcgi (sources from fastcgi.com/dist) and mod_fcgid that the Apache project develops. For now, I suggest you use the FastCgiExternalServer way on Windows and specify a port in your FCGI app/Apache conf. You need to start the FCGI application before sending the requests to it though because this way Apache does not do it for you. In any case, this is the best way to develop and debug an FCGI application anyway because you can just use breakpoints and the debug facilities from within Lazarus. It will be fixed on Windows as soon as the problem is found, I am sure. We are still trying to find the issue. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb FCGI Setup
On 5/26/2011 10:28, silvioprog wrote: 2011/5/26 ABorka: [...] For now, I suggest you use the FastCgiExternalServer way on Windows and specify a port in your FCGI app/Apache conf. You need to start the FCGI application before sending the requests to it though because this way Apache does not do it for you. Hm..., and how I do it? (is there any article?) :/ Thx AB. 1. Specify a port number in your project main file (.lpr) .. Application.Title:='My FCGI Application'; Application.Port:=2015;//Port the FCGI application is listening on Application.Initialize; Application.Run; .. 2. In your apache config file (ex: httpd.conf) put something like LoadModule fastcgi_module "C:/path to the dll/mod_fastcgi-2.4.6-AP22.dll" ScriptAlias /myfcgi "C:/path to your fcgi application/yourfcgi.exe" SetHandler fastcgi-script Order allow,deny Allow from all FastCgiExternalServer "C:/path to your fcgi application/yourfcgi.exe" -host 127.0.0.1:2015 -idle-timeout 30 -flush Note, the port number in the .conf file and in your app must match 3. Restart your Apache 4. Start up your FCGI application in a command prompt window or from Lazarus if you want to run in debug mode 5. Open your web browser and go try to call your FCGI application (ex: http://127.0.0.1:8080/myfcgi/ActionName ) AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb FCGI Setup
On 5/26/2011 11:44, silvioprog wrote: 2011/5/26 ABorka: 1. Specify a port number in your project main file (.lpr) .. Application.Title:='My FCGI Application'; Application.Port:=2015;//Port the FCGI application is listening on Application.Initialize; Application.Run; .. 2. In your apache config file (ex: httpd.conf) put something like LoadModule fastcgi_module "C:/path to the dll/mod_fastcgi-2.4.6-AP22.dll" ScriptAlias /myfcgi "C:/path to your fcgi application/yourfcgi.exe" SetHandler fastcgi-script Order allow,deny Allow from all FastCgiExternalServer "C:/path to your fcgi application/yourfcgi.exe" -host 127.0.0.1:2015 -idle-timeout 30 -flush Note, the port number in the .conf file and in your app must match 3. Restart your Apache 4. Start up your FCGI application in a command prompt window or from Lazarus if you want to run in debug mode 5. Open your web browser and go try to call your FCGI application (ex: http://127.0.0.1:8080/myfcgi/ActionName ) AB Yes, I followed all these steps, but error again. My steps: 1. Stop Apache; 2. Download the "mod_fastcgi-2.4.6-AP22.dll" and copy to "C:\xampp\apache\modules"; 3. Adds in the "C:\xampp\apache\conf\httpd.conf": LoadModule fastcgi_module "C:/xampp/apache/modules/mod_fastcgi-2.4.6-AP22.dll" ScriptAlias /myfcgi "C:/xampp/htdocs/fcgi/test.fcgi" SetHandler fastcgi-script Order allow,deny Allow from all FastCgiExternalServer "C:/xampp/htdocs/fcgi/test.fcgi" -host 127.0.0.1:2015 -idle-timeout 30 -flush 4. Start Apache; 5. Open CMD, and run command "C:\xampp\htdocs\fcgi\test.fcgi"; 6. Open the link "http://127.0.0.1:8080/fcgi/test.fcgi"; (tested "http://127.0.0.1:2015/fcgi/test.fcgi"; too, without success); The result of steps above: "Not found The requested URL /fcgi/test.fcgi was not found on this server". I send my new demo (source and .fcgi) here: http://www.sendspace.com/file/hk29na My Apache is: Apache Version Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o mod_fastcgi/2.4.6 PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 Apache API Version 20051115 Hostname:Port localhost:80 Max RequestsPer Child: 0 - Keep Alive: on - Max Per Connection: 100 TimeoutsConnection: 300 - Keep-Alive: 5 Virtual Server No Server Root C:/xampp/apache Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_actions mod_alias mod_asis mod_auth_basic mod_auth_digest mod_authn_default mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dav_lock mod_dir mod_env mod_headers mod_include mod_info mod_isapi mod_log_config mod_mime mod_negotiation mod_proxy mod_proxy_ajp mod_rewrite mod_setenvif mod_ssl mod_status mod_fastcgi mod_php5 mod_perl AB, thanks for your step by step. :) Try http://127.0.0.1:8080/myfcgi/index instead, because that is why we did the ScriptAlias, so the calling URL is simpler. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fpWeb FCGI Setup
On 5/26/2011 12:35, silvioprog wrote: 2011/5/26 ABorka: Try http://127.0.0.1:8080/myfcgi/index instead, because that is why we did the ScriptAlias, so the calling URL is simpler. Same error. x( Please, see: http://imagebin.org/155296 OK, here is what I did to make your downloaded project work (was not trivial): 1. Unzipped it and moved everything to the same directories 2. Edited the project main .lpr file and changed it to .. uses fpFCGI, Unit1, iniwebsession {for the error message}, custfcgi {for the poStripContentLength}; begin Application.Port := 2015; //Port the FCGI application is listening on Application.ProtocolOptions := Application.ProtocolOptions + [poStripContentLength];//on windows, without this the response can be cut short Application.Initialize; Application.Run; end. .. Note, without the iniwebsession we just get an exception complaining about it (this requirement should be removed from fpweb). Also, custfcgi is needed so we can add the protocolotions line, so on Windows the reply is not cut short by Apache (like error messages about the iniwebsession, for example). 3. in the httpd.conf LoadModule fastcgi_module "C:/xampp/apache/modules/mod_fastcgi-2.4.6-AP22.dll" ScriptAlias /myfcgi "C:/xampp/htdocs/fcgi/test.exe" Order allow,deny Allow from all FastCgiExternalServer "C:/xampp/htdocs/fcgi/test.exe" -host 127.0.0.1:2015 -idle-timeout 30 -flush 4. Start apache 5. Start the test.exe application from a cmd window 6. Navigate to http://127.0.0.1:8080/myfcgi/index from my browser to see: Test Note, your response generation only sends back the text "Test" instead of a proper web page. It should be at least something like Handled := True; AResponse.Content := 'Test'; AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Simple embweb project hangs
It will not fix your crash, but you are missing Handled:=True; from your action handler. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New application type: HTTP standalone server
On 6/2/2011 10:46, Leonardo M. Ramé wrote: Michael, I added a webmodule to testhttp and got two problems. 1 - Could not determine HTTP module for request "". Even if I call it the same way as I use with fpCGI and fpEmbWeb. This error usually happens when the project main program does not have the webmodule unit in it's uses statement. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New application type: HTTP standalone server
On 6/2/2011 10:46, Leonardo M. Ramé wrote: Michael, I added a webmodule to testhttp and got two problems. 1 - Could not determine HTTP module for request "". Even if I call it the same way as I use with fpCGI and fpEmbWeb. This error usually happens when the project main program does not have the webmodule unit in it's uses statement. I managed to reproduce the error; The error is only apparent if there are multiple modules registered. I committed a fix in 17647. This raises the question again of the FPWeb behaviour for http://somehost/path Now, 'Path' is interpreted as the name of the action for the default module. For an embedded server, this is not logical. This should be the module name, not the action name. Michael. I disagree. The vast majority of web applications do not need multiple web modules (usually the default module is used), but they use multiple actions. Therefore, action names should have priority over module names if only one of them is passed. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New application type: HTTP standalone server
> > > On Fri, 3 Jun 2011, ABorka wrote: > >>>> On 6/2/2011 10:46, Leonardo M. Ramé wrote: >>>>> Michael, I added a webmodule to testhttp and got two problems. >>>>> >>>>> 1 - Could not determine HTTP module for request "". Even if I call it >>>>> the same way as I use with fpCGI and fpEmbWeb. >>>> >>>> This error usually happens when the project main program does not have >>>> the webmodule unit in it's uses statement. >>> >>> I managed to reproduce the error; The error is only apparent if there >>> are >>> multiple modules registered. I committed a fix in 17647. >>> >>> This raises the question again of the FPWeb behaviour for >>> >>> http://somehost/path >>> >>> Now, 'Path' is interpreted as the name of the action for the default >>> module. >>> >>> For an embedded server, this is not logical. This should be the module >>> name, not the action name. >>> >>> Michael. >> >> I disagree. The vast majority of web applications do not need multiple >> web >> modules (usually the default module is used), but they use multiple >> actions. >> Therefore, action names should have priority over module names if only >> one of >> them is passed. > > Hm. My experience is very different: > I didn't make a web application yet that had a single module. > All had at least 3 or 4... And they're all in production. > > Except some demo applications for FPC, they usually have 1 :-) > > Maybe we should introduce 'TWebHandler.PreferModuleName : Boolean', which > is > False by default. And you do not specify the actions in the URLs when multiple web modules are in your application? I think actions are always specified when web modules are in the calling URL. But it is not true the other way around. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New application type: HTTP standalone server
On 6/2/2011 10:46, Leonardo M. Ramé wrote: Michael, I added a webmodule to testhttp and got two problems. 1 - Could not determine HTTP module for request "". Even if I call it the same way as I use with fpCGI and fpEmbWeb. This error usually happens when the project main program does not have the webmodule unit in it's uses statement. I managed to reproduce the error; The error is only apparent if there are multiple modules registered. I committed a fix in 17647. This raises the question again of the FPWeb behaviour for http://somehost/path Now, 'Path' is interpreted as the name of the action for the default module. For an embedded server, this is not logical. This should be the module name, not the action name. Michael. I disagree. The vast majority of web applications do not need multiple web modules (usually the default module is used), but they use multiple actions. Therefore, action names should have priority over module names if only one of them is passed. Hm. My experience is very different: I didn't make a web application yet that had a single module. All had at least 3 or 4... And they're all in production. Except some demo applications for FPC, they usually have 1 :-) Maybe we should introduce 'TWebHandler.PreferModuleName : Boolean', which is False by default. And you do not specify the actions in the URLs when multiple web modules are in your application? I think actions are always specified when web modules are in the calling URL. But it is not true the other way around. Well, I never use actions. I always use the OnRequest handler of the module itself. Michael. Heh, then we use fpweb differently (as I am sure other people prefer doing it in many additional ways). :) I use one single web module with dozens of actions compared to multiple web modules with a single request handler that sorts out things. Much simpler and shorter calling URLs needed this way (an important thing when encrypting the action name and request Query parameters), and for me this way gives a nice organized source code in the web module, as all functions are nicely separated into action event handlers. I am sure there are many perfectly good ways - other that the two of us are using - to use fpweb. In my humble opinion, if someone uses Web Actions (and they are there and highly visible in the object inspector - not like web modules -, as well as Delphi-converts most probably know about them already) then Actions have higher priority than web modules in the calling URLs. Logically, - as a design paradigm - a web application has more actions than web modules (not that I can really put a definition on why and when multiple web modules would be needed...). However, if someone is not using Web Actions at all, then this is not true in the case they use multiple web modules. But, since your suggestion to add a TWebHandler.PreferModuleName (Default is False) - or similar - would not break any current projects, it would be an easy addition for the above cases. I also have a question: Could you please list the function of the multiple web modules in your web applications? I never really saw a good use for multiple web modules, but they were implemented more than 10 years ago in Delphi already too, so there must be a reason for that. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Uses Clause in LPR
I found the same bug in the LazSolutions, and i reported to the developer, who has answered me. http://code.google.com/p/lazsolutions/issues/detail?id=22 He said, that bug is a IDE bug. It is not a bug. It is correct behaviour. The LazSolutionsRT should have the 'add to uses clause' flag not set: in the package dialog, choose options. then 'Package options' - 'Usage' and then uncheck the 'Add package unit to uses section' (no check mark should be present). For Zeos, the same is probably true, but I do not know how the zeos package works. It can be that after this, the same error occurs. If so, it means that somewhere in the zeos code, the lazarus 'interfaces' unit is used, or a unit that depends on the LCL. This unit must be rewritten if you want to use zeos in a CGI or any webserver project. Michael. I am not sure what is the problem in this case, but I am using Zeos for CGI applications since years without any issues. Even gave the 7.0.0 Alpha version a try, though it does not handle the strings properly with FPC/Lazarus unlike the stable 6.6.6 release. With 7.0.0 alpha, sometimes just ?? comes back for string fields due to fpc/lazarus requiring UTF8 strings. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] EmbWeb: Moving between webapp type caveats
Back to the problem, using relative URL is not a solution as well. When I do http://localhost/proj/proj.cgi/module/action then if somewhere I put public/style/style.css then the link becomes: http://localhost/proj/proj.cgi/module/public/style/style.css, regardless of the webapp type (at least on Chrome, don't know about other browsers). Isn't there really a way somehow? Because you need /public/style/style.css indicating that it is a static file from the virtual path starting from document root. public/style/style.css is relative from the current virtual path, which can be anything physically in the file system, depending on the OS or weather you use CGI or Apache module, etc. Also, if your CGI program opens files, it will need full physical paths, we can not use relative paths with it either, because it can be the main root dir on Linux or the Apache main dir (not the document root) on Windows. Usually not the physical path the CGI program resides in. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] EmbWeb: Moving between webapp type caveats
Set it in some constant? When the webmodule still wasn't working good enough, I used defines with a constant. I use an .ini file, but the same idea. There can be a lot of things that a web app needs as a constant. static paths, email server settings, template paths, url generation parameters (https or http, ports for development computer, etc.), db connection settings, etc. This way it is the easiest to move from a development environment to a live system. All you need is to remove the .ini file (or constants by defines), or change its values. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Little problem with FPWeb
I found a problem that i think it's a bug in FPWeb FW. Steps to reproduce 1 - Create a new CGI Aplication; 2 - Create an action in the FPWebModule; 3 - Click on the OnRequest event button (to procedure create), dont write any thing in procedure. 4 - Click on the save all button in IDE (in my Lazarus options, i set true, the remove empty methods) 5 - Compile and test on apache. It's generate an AV, because in object inspector, the call to method doesn't cleared when the method is removed. ps: Sorry my google english (hehehe) best regards Rafael Tuim Elias Please, create a bug report on this. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Little problem with FPWeb
.. It is removed here. Linux x86_64/qt, fpc 2.5.1, lazarus 31233. ps: Sorry my google english (hehehe) Mattias Win32 has the problem here with latest SVN FPC and Lazarus. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] GetTempDir return impartial path
On 6/15/2011 12:09, silvioprog wrote: Oops, the correct title is: "GetTempDir return a partial path". 2011/6/15 silvioprog: Hi. I trying to use the GetTempDir, but I get only partial result, e.g.: \xampp\tmp\ Was to be: C:\xampp\tmp\ How to I get the complete path of temp dir of server (Apache)? Thx. ps. Sorry for my english. ^^' It might be that your TEMP or TMP environment variable does not have the drive letter. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] GetTempDir return impartial path
.. I trying to use the GetTempDir, but I get only partial result, e.g.: \xampp\tmp\ Was to be: C:\xampp\tmp\ How to I get the complete path of temp dir of server (Apache)? GetTempDir returns the contents of the TEMP or TMP environment variable. If you get one without drive, it is what Apache passes to your CGI program. .. Michael. One note on that: Apache does not pass the TEMP environment variable to CGI programs automatically, you need to tell it to do that in the Apache configuration file with a PassEnv TEMP (passes the TEMP environment variable as it is defined) or SetEnv TEMP "c:/path/to/tmp/dir" (sets the TEMP variable with the given value for the CGI program) AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] webmodule.pas(133, 11) Error: Identifier not found "Template"
On 7/25/2011 16:57, silvioprog wrote: Hi. I'm trying to compile the "fileupload" demo of package fpweb, but I have the following error: - webmodule.pas(133,11) Error: Identifier not found "Template" - My environment: Lazarus 0.9.31 r31782 FPC 2.5.1 i386-win32-win32/win64 TTemplate no more published? Thx. The examples for fpweb under the Lazarus directory are all obsolete (and should be removed from the repository). The updated ones are found with FPC now, under .../packages/fcl-web/ AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] webmodule.pas(133, 11) Error: Identifier not found "Template"
On 7/25/2011 18:21, silvioprog wrote: 2011/7/25 ABorka: On 7/25/2011 16:57, silvioprog wrote: Hi. I'm trying to compile the "fileupload" demo of package fpweb, but I have the following error: - webmodule.pas(133,11) Error: Identifier not found "Template" - My environment: Lazarus 0.9.31 r31782 FPC 2.5.1 i386-win32-win32/win64 TTemplate no more published? Thx. The examples for fpweb under the Lazarus directory are all obsolete (and should be removed from the repository). The updated ones are found with FPC now, under .../packages/fcl-web/ AB Thx AB. ^^ Forgot to mention that the change was done, so people do not get confused between the Web Actions' template property with the Web Module global template property which both were named the same: "Template". Now the Web Actions all have a "Template" property (no change here), while the Web Module has a global "ModuleTemplate" property (Template was renamed to ModuleTemplate). AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] getting started with ExtPascal
On 8/11/2011 13:38, Marc Santhoff wrote: Am Donnerstag, den 11.08.2011, 21:04 +0200 schrieb Marc Santhoff: I know from memory there are some rich client support techniques, but I forgot the names. Found it it is ExtJS / ExtPascal. Since I'm planning a program being some sort of feasibility study in the first stage and only eventually will go into production use, I'd like to keep the amount of work small. Can someone comment on the efford of getting started using the two? TIA, Marc You do not need extpascal to use extjs with FPC. There are working examples on using ExtJS directly with FPC in the /packages/fcl-web/examples/ directory of FPC (might be the latest SVN only) The /examples/combined as well as all the /examples/webdata/ contains multiple demos. AB -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] debug hints in lazarus [Re: [fpc-devel] Status and ideas about debug info (stabs, dwarf / dwar3)]
<...snip...> Because I use the watch window. I display: . And the output looks quite good as well The "Watch List" window is rather broken as far as I'm concerned. http://bugs.freepascal.org/view.php?id=20230 http://bugs.freepascal.org/view.php?id=18380 http://bugs.freepascal.org/view.php?id=18379 http://bugs.freepascal.org/view.php?id=18035 http://bugs.freepascal.org/view.php?id=17619 <...snip...> Or as far back in time as http://bugs.freepascal.org/view.php?id=12111 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Developing with fcl-web
There is some information on what Michael mentions below here: http://forum.lazarus.freepascal.org/index.php/topic,13312.15.html It might help a little. The linked post has some explanation on the different (3 ways) FCGI solutions with apache and fpc/lazarus. AB On 7/26/2014 05:47, Michael Van Canneyt wrote: On Sat, 26 Jul 2014, Reimar Grabowski wrote: Hi, first of all, sorry if the information is out there, but I did not find anything usefull to help me along. I need to build a server-side application (fcgi is my choice) that gets send some json, processes it and communicates with a mysql database, simple enough. Looks like all this is perfectly doable without any problems with Lazarus and fcl-web, at least the 'gets send some json and processes it'-part I have already done for another project. But it was a pain to develop. For such kind of projects I am used to Java and development in Eclipse. My major problem with Lazarus is where is my server? That depends. In Eclipse I just configure my Tomcat or whatever other container I want to use, press 'run on server' and voila, eclipse starts Tomcat and my application with full logging working inside the IDE to be found at 'http://localhost:8080/myapp'. If I need breakpoints or single stepping, I just start the server in debug mode and all is well. So how do I configure Lazarus to do about the same? It depends on how you set it up. I found some mentioning of fpembweb or lazaruswebdesign packages but nothing concrete about where to find or how to use them. Surely some of you guys do such kind of development with Lazarus and I cannot believe that everybody runs a local apache and copies his executable around after every compile (my apache is on a VM which made it even more work to copy the files around and there was no debugging capability to speak of). So it boils down to let Lazarus run the fcgi app (can be another app type if it is easy to switch it to fcgi for deployment) on an (embedded) server, with logging output shown in the IDE and the option to use a debugger with breakpoints and single stepping. There are 2 options: 1. Use embedded server to do the debugging; that part is easy, it's like running a normal executable. You don't need apache for this. 2. You can run the fastcgi server if you use mod_fastcgi.so, but then you must use the ExternalFastCGIServer option, and configure the fastcgi application to listen on this port: In Apache, configure FastCgiExternalServer /home/michael/public_html/testht -host 127.0.0.1:10020 -idle-timeout 3 -flush Here 10020 is the port to listen on, and /home/michael/public_html/testht is the URL that will be the 'base' url for your fastcgi app. In that case, your fastcgi application must be configured to listen on the same port: Set Application.Port:=10020; in the project source file. Restart apache, run your executable, and do a request through the browser. That's it. Note that you cannot do this with the mod_fcgid module. I do believe that in Apache 2.4, mod_proxy can handle this situation, but I haven't tried yet. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus