h a l f b a k e r yApply directly to forehead.
add, search, annotate, link, view, overview, recent, by name, random
news, help, about, links, report a problem
browse anonymously,
or get an account
and write.
register,
|
|
|
Please log in.
Before you can vote, you need to register.
Please log in or create an account.
|
PHP and MySQL work well together to produce dynamic web pages. PHP (the programming language) pulls information from MySQL (the database) and spits out web pages in HTML so that your browser can see them. Lovely.
That all works fine if you're online as PHP and MYSQL sit on the web server and do
all the work there. What about when you're offline, say looking at some HTML help pages? Wouldn't it be nice to be able to have to power of PHP/MySQL to provide an index and search functions?
Optionally you could be able to add to the database storing things like serial numbers and software settings. The offline web application could even interract with a web site when you're online creating a whole now class of online/offline web application.
[later] (stolen from one of IvanIdea's annotations)
Ivanidea: ...you are suggesting that what we could do with is a standard browser, available for all platforms, which would read a database on disc, and provide inbuilt search and formatting facilities for the presentation of that information without all the hassle of setting up a local server.
st3f: Yes, that's an excellent description of what would probably be the primary use of this technology.
Curl Corporation
http://www.curl.com/html/ Curl clientside stuff [IvanIdea, Mar 22 2002, last modified Oct 04 2004]
PHP rollback
http://www.mysql.co...nsaction_model.html for bris. [st3f, Mar 23 2002, last modified Oct 04 2004]
Encryption and Decryption using PHP and GnuPG
http://www.zend.com...utorial-brogdon.php Why not ask Andi Gutmans and/or Zeev Suraski? They rewrote PHP4 from the ground up. Here's Zeev's email: zeev@zend.com [thumbwax, Mar 24 2002, last modified Oct 04 2004]
cross referenced display
http://lxr.php.net/ of the PHP source code. The pages here are generated by the LXR tool, , which was originally written to display the source code of the Linux kernel. [thumbwax, May 10 2002, last modified Oct 04 2004]
MySQL Files
http://lxr.php.net/find?string=MySQL on PHP [thumbwax, May 10 2002, last modified Oct 04 2004]
Client-side ASP browser idea
http://msdn.microso...ssues/0900/cutting/ Ideas for doing this with ASP were suggested in September 2000 [Flanners, Oct 04 2004]
Web-server on CD-ROM
http://www.indigostar.com/microweb.htm Run a very simple web-server from a CD-ROM. It can run cgi's and MySQL databases. Not tried it so can't comment. [Flanners, Oct 04 2004]
Web Server - MySQL and PHP
http://www.dwebpro.com/products.php Web-server stand-alone, with support for CGI, ISAPI, database MySQL and now PHP. Free for non commercial use license. Once again, not tried it so can't comment. [Flanners, Oct 04 2004]
[link]
|
|
I'm not sure if I follow this st3f. Fair enough PHP has to run on a server to behave the way you see it over the web (though of course you can use it as astraight scripting language), but what is the problem just "browsing" to 127.0.0.1? |
|
|
You could set up your PC as a webserver to read help files (which is what I think you're suggesting). That would work. I just think that creating an entirely client-side solution is less likely to run into problems. |
|
|
At the risk of teaching my granny to suck eggs, a localhost approach would not work on locally stored pages because, as st3f says, what your browser receives is html generated by the script, not the script or dataset itself. It is a very interesting idea though to have an option to download a local copy of the entire website if you frequently refer to it. This would entail being given access to the actual php scripts themselves which could be encrypted (zend style) for security. Providing all paths were referenced via PHP_SELF they should work any where, and an auto update method provided to periodically refresh your local database. Really what we are suggesting here is a complete clientside application with the data spplied via the web, I would recommend that you take a look at CURL (see link) which might provide a framework what you are looking for although not a complete solution. Unfortunately this requires a 15mb download to install the system into the browser which limits the potential audience somewhat, but maybe the software will be included on the microsoft cdroms someday, although this would compete with their investment in the much vaunted .NET technology. |
|
|
[st3f] - not sure I understand what PHP/MySQL does - is it similar to ASP? |
|
|
Yes hippo, its the open source equivalent.
//complete client side application with the data supplied via the web / - can't this be somewhat serviced by using the IWebBrowser2 control? That's what is used to manage help files in some apps, though personally, I find browser embedding immensely irritating. |
|
|
Peter. I'm not inventing PHP. The idea is for a browser that can parse PHP. Unless you can find a link to one of those or add something constructive to the conversation, please shut up. |
|
|
He never fails to amaze me, that Petey. |
|
|
I gotta disagree with you here, st3f. I certainly do not believe a client side approach would be better. If you leave things up to the browser writers, that's when all hell breaks loose. Javascript and even CSS are testament to that. They can't even agree on HTML, for somebody-other-than-Pete's sake. |
|
|
If we allowed this to happen, different browsers would support different PHP functions (or work differently with the same functions), some might develop their own proprietary ones, etc. You'd end up with the same cross-browser compatibility mess that developers have had to deal with for ages. |
|
|
No thanks. As a developer, I want total control. You just run the 'skin'... let my end produce the output. That way I know you're seeing and experiencing what I intend for you to see and experience. That's the beauty of server-side control. I don't have to worry about what you're running. |
|
|
And besides all that, no access to PHP/MySQL is due and fair punishment for being offline in the first place. |
|
|
Peter] I can't see that this is baked, as far as I can understand it st3f wants to retain the data search and presentation functions of php/mysql on pages he has downloaded to his hard drive. As he is only downloading html not php code, even if he has a local server set up as you describe he cannot do anything with the html except look at each page individually. |
|
|
A possible solution would be to write a php application that ran on your computer and opened each cached html file in certain directories of your hard disk, extracted the text into a local database and provided a search function on that text returning a link to the local copy of the page as well as a link to the www for update checking. (I must curb this apalling tendency to drone on and on and on) |
|
|
I think there is a good point here that the web architecture is wrong. |
|
|
Instead of formatting data at the server end and downloading the HTML result, a client should download the formatting prescription and the data, and do the formatting locally at the client end. (XML and XSLT almost get you there, but there's no database engine yet.) |
|
|
Instead of caching finished webpages, people would cache database fragments, which they can look at using a variety of different tools. |
|
|
I think this transcends specific formatting and database query languages. |
|
|
[SOAP is an XML wrapper for Microsoft's OLE. I don't think it's generically useful as a database description language.] |
|
|
jutta: if the hype is to be believed this will all come together with little dynamically generated xml fragments accesed using SOAP. Maybe we need a SOAP browser. Now there's a pun rich topic idea. |
|
|
Maybe I can forgive Peter his little outburst as it seems that IvanIdea and jutta are both going down the same road - an interesting one, but not one that I had in mind when I posted the idea. |
|
|
You both seem to be looking at the question, "How can I reuse data that I picked up online?" The questions that actually motivated me to post were, "If I wanted to distribute a platform independent database on CD how would I do it with current technology?" and "What additional technology would I need to make it easier?" |
|
|
It was when I asked myself the last question that the idea of a PHP/MySQL browser popped into my head. |
|
|
Then the question becomes how to get the scripts which generate the HTML and the data in the database being used to generate the pages. All for what? To look at HTML offline (or am I missing something)? Why not just spider the site and grab the individual pages? |
|
|
Oh, sorry, totally misread that one but hell whats new there. If you want what you said you want then I would poke a stubby finger at Java, plus the java database connectivity api and pretty much any database format you like for example ms access foxpro sql and many many more. But then I am missing the point again I think, you are suggesting that what we could do with is a standard browser, available for all platforms, which would read a database on disc, and provide inbuilt search and formatting facilities for the presentation of that information without all the hassle of setting up a local server. Good idea -croissant, or have I missed it again? |
|
|
So the key is still having a platform independent application which can serve up the data? I wouldn't think the database itself would be a problem (though the filesystem it's stored on might be). |
|
|
I can't tell you how glad I am that I don't understand a word of the annotations here. |
|
|
Peter... the bit your missing is in the frigging idea title. He wants the web browser to execute the code, not the server. When you do it 'local' you're still running Apache. That's not a "PHP and MySQL enabled Web Browser," is it? |
|
|
How daft do you get, anyway? |
|
|
That's not the point, whether the user can tell the difference. The point is the idea is for a "PHP and MySQL enabled Web Browser". Ergo, unless you can tell me where I can download a "PHP and MySQL enabled Web Browser", then "PHP and MySQL enabled Web Browser"s are not baked. |
|
|
//But my browser *does* run PHP and Mysql pages
What, without them being served? Then your browser is not IE, Opera or Netscape. What *are* you running Mr. Sealy? |
|
|
Aaahhh OK so you're browser *doesn't* run php, the web server does. Thats cleared that up.
I just had an IvanIdea moment and read the idea properly (Doh! and sorry) What you want is a Web Service. Which is being baked as I type. MS have released their .Net take on this. Sun are rushing to catch up, and should release thier take on it with the final version of J2EE 1.4 spec some time next year. Given php and mysql are open source and all that entails perhaps there will be an implimentation eventually, but it sound less than likely. php is very light-weight in comparison to J2EE and .Net. |
|
|
Question: Does MySQL do transactions with rollback? Curious. Thx. |
|
|
bristolz: Not in its default table type, but see link. |
|
|
No need to apologise mcScotland, I would be the first to admit that my enthusiasm often seems to suppress my neurone activity. |
|
|
angel: no, unfortunately being able to interpret PHP client-side would not allow you to fix the errors in the link you provided (or look at the data behind them). The PHP engine on the server would already have parsed the page and spat out the error codes that you see in the HTML. |
|
|
// But my browser *does* run PHP and Mysql pages, at least when I load them from my PC. // |
|
|
No, it doesn't. Your browser loads up the plain-jane HTML sent to it by the web server, which was created when the PHP was parsed and executed at the server. Your browser just browses. |
|
|
First of all, PHP and MySQL are there because the need arise in the servers. If you want to use the power of MySQL and PHP, you can implement it in your operating system. So you can make your file searchs faster, etc... |
|
|
This is insane! Two notes:
1) Why not just run a local server for such things? All problems solved!
2) Why does everyone want to do everything with HTML?! HTML was made for distributing electronic text easily and with small formatting. It has grown into a monster! You know what? About those Offline Help HTMLs, well, HELP FILES ON WINDOWS COULD DO THAT LONG BEFORE THEY MADE THE INSANE SWITCH TO HTML!!! Keep everying in its place and dont tread on once-non-conflicting territory! |
|
|
BALIKEKMEK://you can implement it in your operating system How? And perhaps more importantly, why? How does replicating your file system in a DB make searches run faster? - now every insert/delete/update has to be made in two places.
ironfroggy: //Why does everyone want to do everything with HTML?!...About those Offline Help HTMLs, well, HELP FILES ON WINDOWS COULD DO THAT LONG BEFORE THEY MADE THE INSANE SWITCH TO HTML!!!/
...uhm...st3f doesn't want to do everything in HTML, he wants php, sourcing data from mysql. (Side note: windows help files are not HTML - they are *compiled* html, so in fact MS has taken the "run anywhere"[sic] nature of a standard like HTML and made it proprietary. I think what st3f might want (to expand on his example) is a formatted (or formattable) local display version of the help info, backed by a data source, which may (or may not) be local. In fact, what I mentioned before: a Web Service. |
|
|
[st3f] <<You could set up your PC as a webserver to read help files (which is what I think you're suggesting). That would work. I just think that creating an entirely client-side solution is less likely to run into problems.>> |
|
|
Do you have any reason whatsoever for thinking this? It strikes me that your problem is with ease of installation of apache/php/mysql. I've never had any problems with this on Win32, OS X or Debian Linux. If you can't get it working, the chances are you're going to have problems getting the client-side database working anyway. |
|
|
I think the first comment [by Rods Tiger] is the most pertinent in the whole discussion, anyway... |
|
|
XML and javascript does this easy. The website needs to be written to store all the data in an XML file, search it using client side javascript and you're away - the search will work even on offline cached pages since you have access to the cached data and the code whilst offline. The website would have to be written to support this, so your old PHP searches still wont work offline, but then there's no way to get them to work anyway, unless you've already cached the result page.
It might make pages somewhat slow to load if all the data has to be downloaded, just in case you might search for it when you're offline ... |
|
|
All you going on about setting up a local server for testing purposes have clearly never tried it yourselves. For the average user, it would prove incredibly difficult and would really not be worth the effort. I tried setting up PHP once, and didn't get it anywhere near working... all it did was screw up my registry and force me to format my hard drive. It took me 2 hours to get apache working, and I didn't even get on to MySQL. |
|
|
I'm sure you're thinking 'the average user you describe wouldn't be writing PHP/MySQL web pages'. That's wrong... PHP is actually very user-friendly and really easy to pick up (I found, anyway). |
|
|
As a PHP/MySQL developer myself, this would make my life a hell of a lot easier. I can see a lot of clear advantages for this idea. Well done. |
|
|
While working as a CD-ROM developer, a client required a website conversion to CD-ROM. |
|
|
The website was an Access database driven site using ASP, but the principles remain the same - if the server-side code could be run client side (preferably straight from CD), then conversions of this nature would be simplicity itself. |
|
|
Sadly we didn't have the time or expertise to carry out a generic database solution for a minute small sum of money - so we replicated the SQL in Director and accessed the Database using a windows-only Xtra. |
|
|
I was sure someone would have developed this sort of tool already - but couldn't find anything, the closest match was an article on msdn (link added). Also just finding a web-server than can be run directly from CD-ROM is difficult. |
|
|
There are other issues involved in running this sort of application directly from CD-ROM (filepath length for example), so some companies (tenmax for example) make a living from doing these conversions - yet they still produce their discs by spidering through an entire site. |
|
|
As internet access is now widespread, and broadband take-up is increasing the CD-ROM market is *probably* diminishing, so this type of application may be less useful now than it would have been in the past, but there is still a place for it - not everyone has the bandwidth to download large files. |
|
|
There appears to be a server called dbwebpro with facilites for MySQL and PHP available now - check the links section for details. |
|
|
[doughboy], you need to start the link with a http:// or it'll just try to link within the halfbakery. Also, you might want to elaborate a bit. |
|
|
With both Rods and PeterSealy gone, this is one seriously swiss-cheesed idea. |
|
|
[Fixed doughboys's link... then deleted his
account for spamming.] I remember when
we used to get a better quality of
spammer. |
|
|
there's nothing like a spammer in the
works - I'm sure it's been said before.
sighs - |
|
| |