Domain: php.net
Stories and comments across the archive that link to php.net.
Comments · 1,658
-
No
It's not really a Perl book - it's a CGI with Perl book, covering things like JavaScript. If you want to learn Perl get Programming Perl.
OTOH, if you just want a cgi script for your guestbook, you should reject Perl - that is unless you have, and want to learn how to use, mod_perl - otherwise it's very slow. Learn PHP by reading the excellent manual; see also the HOWTO.
Of course if you want to become an expert in some of the seriously sick bits of perl (it's oo functions, etc.), then you'll need a book (not this one though - AFAICT, this book is redundant - wouldbe Perl hackers should get a dedicated Perl book, while everyone else should use PHP or ASP). -
PHP + Horde + IMP + Kronolith + MCALI think a really good scheduling system should have most of these characteristics:
Integrated with the main communication system (email), standards compliant, secure, webbased, maintainable, scalable, licensed DFSG compliant, speedy, flexible, robust and have good documentation and support.
I think a webmail setup with the following components come a long way:
- qmail My favorite MTA. Altough the license can't officially be called 'free', you are free to modify the sources.
- Apache-SSL The most extensible webserver with good security features.
- PHP A very popular domain language for the web, with lots of extra modules.
- Horde I recently 'discovered' this ASP platform for PHP code, and began to like PHP because of it.
- IMP I've just hooked up an Apache-ssl/IMP webmail setup to my qmail/IMAP system (residing on another host), and it was very easy to do (thanks to the great Debian maintainers!). The functionality of the webmail client is pretty good compared to some others, altough the calender system is not integrated yet (help out if you can
;). And it even has a multi-language spellings checker. - IMAP Used with qmails Maildir format makes a very scalable, robust and maintainable email system.
- PostgreSQL My favorite RDBMS, and getting better all the time.
- LDAP IMP has a nice lookup interface for multiple LDAP servers, it allows for easy point-and-click "to" and "bcc" selections.
- Kronolith The calendar component used in Horde, It uses the MCAL and supports multiple users accessing the same calendar.
- MCAL This is a flexible C library for accessing calendars. Altough I've not used it (yet).
-
Re:Insertion of large text objects
Try looking here . Version 7.1 should allow you to insert large (>8kB) amounts of text without having to use the large object interface (i.e. a simple INSERT/SELECT/UPDATE will do). If you're planning on implementing large object storage under PHP, read here about the pg_lo* functions, it has some useful examples.
-
Re:Why is this under 'privacy'?
I like his argument, but his
.sig really
pisses me off. Slashdot's forum is a public
place. Anything you say here can be quoted
as if you yelled it on the streets of Miami.
That is the result of public expression.
Quoting, or more properly, citation, is covered under fair use. Look it up at Brad Templeton's site: Myth 4, third paragraph:
Fair use is almost always a short excerpt and almost always attributed. (One should not use more of the work than is necessary to make the commentary). It should not harm the commercial value of the work -- in the sense of people no longer needing to buy it (which is another reason why reproduction of the entire work is generally forbidden.)
Also, by simple act of posting my comments here on Slashdot, I obviously implicitly allow copying of my content for the purpose of conducting a discussion on Slashdot. This includes viewing, printing, quoting, and all other uses necessary to have a discussion here on this site. Copyright law explicitly protects such uses.
Use of my text outside of Slashdot, for example in a book published by Andover, or on a Best Of Slashdot CD-ROM, or in other places or for purposes other than discussion here on Slashdot requires a license. That is, I have to explicitly grant you the right to use my words.
Copyright does not cover names, trademark law does that.
Copyright does not cover ideas, patent law does that.
So if you like what I write, but I would not grant you a license to use my words, you could always phrase the ideas I convey in your own words, or express them differently (i.e. using no words at all). That should be differently enough in order not to qualify as a derived work, though.
And finally, when asked, I usually grant the license to use my words for free - completely, unaltered and with correct attribution as well as a pointer to my homepage. I do like to get 1-3 free reference exemplars of printed matter, and pointers to the sites where my words are hosted. Also, I will not grant license to use my words for free, if you sell them. If you make a living by selling my words and my works, I demand a sensible share of that money.
If you want to read my words, and my works, please go to my homepage. You find it at http://www.koehntopp.de/kris. I keep freely accessible online copies of everything I have written and deemed useful, whether sold or not. I make my contracts in such ways that I can maintain this website with my works so that you can access all my published articles and USENET posts as well as my open source projects.
Copyright law may be not an ideal solution, and may be an annoyance sometimes. But there is (or at least was at some point in time) reason behind it and used sensibly and nonoffensively, it can be actually useful to protect the interests of the public as well as the interests of the author. Just try to think, and use Google, before you flame.
© Copyright 2000 Kristian Köhntopp -
Memoirs of a happy php progammerI've been a php programmer for a year and a half, and after the first week or so I knew 99% of the function names and args/syntax of everything I needed to do.
Ok, every once in awhile I'll want to do something crazy, but for those cases, just load up http://php.net/manual/ it has GREAT searching capabilities, and I've yet to look for a function that doesn't exist, or that I can't compile in.
The reason that php has lack of a good solid API is because they simply call the mysql client libraries and give you access to them, or oracle 8i functions or whatever. The don't have all sorts of crazy wrappers to slow your app down. Php is made to be extremely modular, if you want a consitant db interface api, then make your OWN functions in php. It's these things called user definable functions, HELLO? COLDFUSION?
:) So you say making your own wrapper functions is too difficult and time consuming to spend the extra day on? Then use ODBC if you really want, ya you can compile that into php also...Just the other day I wanted to gzip some straight text data before storing it in the database, because I knew I wouldn't need that data much and I knew that it would be EXTREMLY compressible (640k down to 4.5k). So I lookup the zlib functions, compile them in, and voila, I'm using them 15 minutes later. I've done perl programming and cold fusion program and I've never found as nice and easy to use docs as php has. The comments on php.net really help a lot to. Chances are, if you want to do something, someone else has done it too and posted a comment helping you.
Oh, and if you ever get really stuck? There's always #php on efnet. You just gotta ask nicely, and made sure you did your homework before asking.
:)Argue with me all you want, but you'll have a really hard time convincing me to switch to anything else. I understand if your programming toysrus.com to not buckle under the load of the Christmas rush you might want to use coldfusion/jsp or whatever. But we just aren't programming anything of that caliber here.
:)
--- -
Is Hemos "trolling"?Don't believe anyone's links. There have been far too many times that I have unwittingly clicked a link to http://www.goatse.cx or misdirected on links to the Perl or Python websites. Go back to the Slashdot FAQ and look under #consideredharmful.
--
-
PHP *is* relatively new
Have you written any large projects in PHP? I mean really large, mission-critical projects. If so you'll quickly see that while it has strong points, it's far from perfect.
The database connectivity is far from perfect, and ODBC isn't the magic bullet some people like to think it is. While you can use ODBC to connect to an Oracle database, it will offer significantly lower performance than using the ora_ functions.
If you want an example of the lack of uniformity in the database API, look at odbc_fetch_row, it takes a statement handle, and optionally a row number. If the row number is omitted, it returns the next row. Now look at pg_fetch_row, it takes a statement handle, and a mandatory row number. If you omit the row number, it just plain doesn't work.
Look at the functionality of something as simple as 'break'. One would assume that break would exit any looping construct, whether it be for, foreach, or while. Well, you'd be right that it exits for or while, but it doesn't exit a foreach.
And there are other inconsistencies too, which are obnoxious, for example 'is_array, is_long, is_dir, and is_double' all do what you'd expect. but it's not 'is_set', it's 'isset'. If you take a reference to $this in the constructor for an object, it's not the same reference that the new class returns. (Bug 7454)
And they're right, debugging support for PHP is horrible. The debuggers that are out there only work on certain versions, so if you're doing development against the CVS version of PHP in order to get the latest bug fixes, they won't work, because of changes to the Zend internals. error_log is the equivalent of debugging with printf, and if you add your own error handler, there's a bug which prevents it from showing the error message. (Bug 7283).
PHP has been here since 1994, but it's been massively rewritten at least twice. Once in PHP3, and again for PHP4. It has a lot of potential, enough that I'm using it on large, important projects. But I wouldn't dream of using it on a large, important project that had to be done in 2 weeks. The language still needs time to stabalize.
--
"Don't trolls get tired?" -
PHP *is* relatively new
Have you written any large projects in PHP? I mean really large, mission-critical projects. If so you'll quickly see that while it has strong points, it's far from perfect.
The database connectivity is far from perfect, and ODBC isn't the magic bullet some people like to think it is. While you can use ODBC to connect to an Oracle database, it will offer significantly lower performance than using the ora_ functions.
If you want an example of the lack of uniformity in the database API, look at odbc_fetch_row, it takes a statement handle, and optionally a row number. If the row number is omitted, it returns the next row. Now look at pg_fetch_row, it takes a statement handle, and a mandatory row number. If you omit the row number, it just plain doesn't work.
Look at the functionality of something as simple as 'break'. One would assume that break would exit any looping construct, whether it be for, foreach, or while. Well, you'd be right that it exits for or while, but it doesn't exit a foreach.
And there are other inconsistencies too, which are obnoxious, for example 'is_array, is_long, is_dir, and is_double' all do what you'd expect. but it's not 'is_set', it's 'isset'. If you take a reference to $this in the constructor for an object, it's not the same reference that the new class returns. (Bug 7454)
And they're right, debugging support for PHP is horrible. The debuggers that are out there only work on certain versions, so if you're doing development against the CVS version of PHP in order to get the latest bug fixes, they won't work, because of changes to the Zend internals. error_log is the equivalent of debugging with printf, and if you add your own error handler, there's a bug which prevents it from showing the error message. (Bug 7283).
PHP has been here since 1994, but it's been massively rewritten at least twice. Once in PHP3, and again for PHP4. It has a lot of potential, enough that I'm using it on large, important projects. But I wouldn't dream of using it on a large, important project that had to be done in 2 weeks. The language still needs time to stabalize.
--
"Don't trolls get tired?" -
a few other debuggersFirst, the manual
:
http://www.php.net/manual/debugger.phpSecond, phpdebugger
:
http://www.phpdebug.com
-- .sig -- -
Debugger? rtfm
PHP has a debugger built into it, if you check the PHP online manual, you'll see that the following directives can be set in php.ini:
Debugger Configuration Directives
debugger.host string
DNS name or IP address of host used by the debugger.
debugger.port string
Port number used by the debugger.
debugger.enabled boolean
Whether the debugger is enabled
Additionally, make sure you have the following set correctly.
display_errors boolean
This determines whether errors should be printed to the screen as part of the HTML output or not.
error_log string
Name of file where script errors should be logged. If the special value syslog is used, the errors are sent to the system logger instead. On UNIX, this means syslog(3) and on Windows NT it means the event log. The system logger is not supported on Windows 95.
error_reporting integer
Set the error reporting level. The parameter is an integer representing a bit field. Add the values of the error reporting levels you want.
Table 3-1. Error Reporting Levels
bit value enabled reporting
1 normal errors
2 normal warnings
4 parser errors
8 non-critical style-related warnings
The default value for this directive is 7 (normal errors, normal warnings and parser errors are shown).
For windows development I recommend a local instance of IIS or Apache w/ PHP (easy to setup - read the INSTALL file in the root of the win32 distribution).
A good editor is Homesite from Allaire - you can map a directory to your www server root, and when you preview pages it will get passed through the interpretor and generate error messages etc. The editor also does correct color coding for many different languages (javascript, cfml, asp, php, html, xml etc).
-
OSS's Biggest Problem: Poor Marketing
By far the biggest problem the OSS community has is poor communication with users and potential users.
Marketing is creating a connection between an effort and potential users. Most OSS leaders don't think about marketing, or don't think about it sufficiently.
OSS project web site home pages often don't even have a few clear paragraphs about the purpose of the software! This is true even of large, excellent efforts like the PHP Hypertext Processor and the Python Programming Language.
Poor communication creates a high barrier for potential users and for potential developers. Better communication is the single most important area of improvement that could increase the spread of Open Source Software.
If you have an open source software project and need help with communication, email me. This seems to be the way that I can best contribute.
Michael -
Why a new MP stylesheet language? This is why!
We can credit W3C for being forward-looking, but I expect that CSSMP will go the way of WAP.
Perhaps not. I believe the point of this newly crafted subset of CSS2 is to provide a stable reference for useful functions that ought to be in mobile devices (meaning ultra-portable devices with limited display capabilities, and not meaning laptops which might have better display capabilities than many quite old desktop computer layouts with small VGA monitors which are still in use throughout the world).
This area is of keen interest to me, and after the long agony with simple HTML 3.2/4.0[1]+ and with CSS1 through the still not-quite-totally-there CSS2, any way to avoid any more standards wrangling will come as a great relief to those of us who have to actually do this stuff for a living. I'd imagine that XSLT 1.0+ engines will do much of the actual work, and it really helps to be able to more or less reuse all that existing work with a near-exact subset of CSS2.
Anyways, I'm back (in a few minutes, after a little more procrastination) to figuring out how to most efficiently split up parts of (simple for now) XML documents for later Java/Python XML/XSLT processing, while allowing simpler, more immediate PHP 4.0+ XML processing. Argh
.... -
Re:GNOME Basic
exhibit a: PHP
-
Re:plain and flashy mode?
It may require more work, but two modes (i.e., flash/non-flash, text-only/graphical) may just be the easiest way to go -- so long as the content is identical in both modes. I imagine a site with fewer toys is easier to make accessible.
A nice way to manage multiple versions of the same site is to use server-side tools such as UserLand Frontier (which I used to use to manage my static site), PHP, Zope, or any of the many others out there -- these three are the ones I've tried. With a bit of scripting, you can get a good idea of what tricks you can use with a particular client, and tailor the page you serve to that client.
Building static sites with the same capabilities is harder -- as far as I can tell, there are very few tools for building nice sites offline and then uploading them to a remote server. (As I said, I used to use Frontier (which is (1) expensive, and (2) Mac/Windows only), and am currently frustrating myself by trying to bend Zope to my will (made hard by the lack of basic documentation) -- suggestions for alternatives are very welcome!)
-
Re:Any advantage in PHP over mod_perlWell, PHP 4 has a foreach() construct and also a database abstraction layer. So if these were the only two things you hated about PHP, you should be jumping for joy now.
I wanted to jump for joy, my major peeve with PHP is the different database interfaces also.
But I could not find the database abstraction layer looking at the manual. All I could find was a layer for a couple of specific databases.I think what the previous poster and I are looking for is a general set of functions that work for MySQL, Postgres, Oracle, ODBC and other SQL-databases, which would only require a change in the connect/open function-call in the code should there be a switch in DBMS.
Is there such a system in PHP now? Otherwise, no jumping.... -
Re:With PHP, it's pretty much RTFM
The index of functions: http://www.php.net/quickref.php
-
Re:I've stuck to online resources
For those of you that don't know here the PHP Manual is it's: HERE also use the errata it's very convenient to see other peoples examples. Even emailing them at times is helpful I have about 5 people email me a week with questions and I always try to help them.
And finally what there is a lot of open source code in PHP that is incredibly usefull. My own for an example. My Most popular one is: Jack's Formmail.php a PHP clone of Matt Wright's Formmail..
-
Web Application Development and PHP resources
While the case study chapter may not be interesting to most, the last chapter on extending the Zend engine should be a must read for anyone wanting to add their own functions.
It has the blessing of the Zend team as 'the' resource for extending Zend and that chapter is also published under the Open Content License meaning it can be distributed outside of the book just like any other piece of open source software. Observant readers will note the inclusion of the open source license at the rear of the book.
As for PHP resources, as someone pointed out, the PHP documentation is pretty damn fine and is available via CVS as sometimes the web version lags behind.
PHPBuilder.com, Zend.com, FAQTS and Weberdev amongst others all have plenty of applications, tips and tutorials.
Graeme -
Re:Web Programing, Display and ContentThe one thing I've never seend addressed in any book dealing with programing for the web is how to seperate 1) programing logic from the html (tho not insanely hard) 2) seperating html from the acutal content. and 3) keeping sane.
My personal PHP style is different from most of the examples I've seen. Once I'm in PHP, I pretty much stay there and use print() to generate HTML. I figure it costs a little something to switch back and forth between the PHP preprocessor and the regular shove-it-down-the-pipe function of a web server.
However, given that almost everything else you do in PHP or with a database surely takes longer than that, a rational person would no doubt conclude that this is just being anal (and needlessly distrustful of what the preprocessor might do to the contents of my variables when it isn't active). Same thing with making sure all my exit paths close the database once it's open. Automatically closing the database on exit and preserving the values in variables sound like things that probably attract quite a bit of the developers' attention and test time.
So write it in PHP when it feels natural and looks readable (and, of course, when you need to, like when the HTML or text contains a variable value). Write in HTML other times. Whatever makes your document easy to read and maintain is probably the best advice.
One thing (just to add further proof of my anality): always, always, always use GetImageSize() if you're serving up images. Don't do it the way they show in the example, though. Check for null in the return value, just in case somebody moved that image.
-
Re:I've stuck to online resourcesYes, phpbuilder is "the other site" I used when learning PHP. As I said in another post, the PHP docs are possibly PHP's greatest feature (all would-be php programmers bookmark http://www.php.net/manual/ now).
And as you say, online resources are really all you need with PHP. Whereas with Perl I had to buy two books and needed a lot of supplemental help online (installing dbi, etc).
_________________________________________________
_ ___ -
php docs kick perl's assFor me, at least, the advantage of PHP, by far, is its documentation. Any question, I go to php.net and there is the answer. Their function definitions are all yummy. Also the built-in db access is much easier than using/installing DBI if you're brand new at this (as I was when learning php). I find the documentation at www.perl.com to be quite poor. Perldoc is good, but nothing can compare to http://www.php.net/manual/ imnsho.
_________________________________________________
_ ___ -
With PHP, it's pretty much RTFMI've done quite a bit of PHP3 and MySQL, and apart from a few runs to places listed on the PHP links page and PHP FAQts, I've pretty much gotten everything done with the excellent HTML manual.
About the only thing the manual lacks is an index of functions, but a little bit of experience is generally enough to help you figure out the category under which they've hidden the function you're looking for. I see now that the PDF version of the manual is indexed, so newbies to the manual may want to start there.
OTOH, I'm a long-time C programmer, and when I wondered about syntax, pretending that PHP is C with dollar signs in front of the variable names has worked out more often than not.
Since this page is (presently) screwey and I can't figure out how to reply to an individual posting, in answer to "why PHP instead of Perl?", why not? Oh, all right. Here's a couple of reasons:
- PHP runs in the context of Apache (except the Windows version) which makes it outrageously fast on the UltraSPARC II I'm using most of the time, but then so does perl if you use mod_perl. You'll notice I said nothing about "X is faster than Y". I've found PHP/MySQL to be "very fast" in my applications, and let's leave it at that.
- PHP has got excellent integration with databases (especially MySQL), but I imagine something similar is available for perl.
- PHP is smaller than perl, which means that a PHP mod Apache won't have anything like the footprint of a mod_perl Apache (good to know when you're paying Sun's memory prices)
- There's nothing remotely similar to CPAN, and the Free PHP apps I've seen out there aren't that useful, which means that if you're writing PHP, you're probably doing it mostly from scratch rather than extending others' apps. I actually find this useful. I figure if you're doing server-side scripting, speed is the number-one virtue, and reuse -- at least the kind of reuse I've done -- usually incurs a speed penalty.
So if I were buying a PHP book, the first thing I'd look for are applications that are like the application I'm building to see if I could steal some ideas and code snippets. And I'd look for stuff about the big picture that the originators sometimes forget to put into their documents. But I'm not in the market for a PHP book because the manual is so good and because years in the salt mines of C have pretty well taught me how to code a solution to a problem.
Let me hit on one more thing if I may. When you read the source code, you're reading the truth. When you the canonical documents (the language spec or the documentation supplied with the language) you're one step away from the truth. When you read a textbook, you're two steps away from the truth.
I'm generally too lazy to read the source code (not always -- that's how I learned Unix networking, but there were some special circumstances there or I'd just have read a book like a sensible person), but I've been bushwhacked by enough documentation bugs to do as much learning as I can from the canonical documents.
YMMV, of course.
-
With PHP, it's pretty much RTFMI've done quite a bit of PHP3 and MySQL, and apart from a few runs to places listed on the PHP links page and PHP FAQts, I've pretty much gotten everything done with the excellent HTML manual.
About the only thing the manual lacks is an index of functions, but a little bit of experience is generally enough to help you figure out the category under which they've hidden the function you're looking for. I see now that the PDF version of the manual is indexed, so newbies to the manual may want to start there.
OTOH, I'm a long-time C programmer, and when I wondered about syntax, pretending that PHP is C with dollar signs in front of the variable names has worked out more often than not.
Since this page is (presently) screwey and I can't figure out how to reply to an individual posting, in answer to "why PHP instead of Perl?", why not? Oh, all right. Here's a couple of reasons:
- PHP runs in the context of Apache (except the Windows version) which makes it outrageously fast on the UltraSPARC II I'm using most of the time, but then so does perl if you use mod_perl. You'll notice I said nothing about "X is faster than Y". I've found PHP/MySQL to be "very fast" in my applications, and let's leave it at that.
- PHP has got excellent integration with databases (especially MySQL), but I imagine something similar is available for perl.
- PHP is smaller than perl, which means that a PHP mod Apache won't have anything like the footprint of a mod_perl Apache (good to know when you're paying Sun's memory prices)
- There's nothing remotely similar to CPAN, and the Free PHP apps I've seen out there aren't that useful, which means that if you're writing PHP, you're probably doing it mostly from scratch rather than extending others' apps. I actually find this useful. I figure if you're doing server-side scripting, speed is the number-one virtue, and reuse -- at least the kind of reuse I've done -- usually incurs a speed penalty.
So if I were buying a PHP book, the first thing I'd look for are applications that are like the application I'm building to see if I could steal some ideas and code snippets. And I'd look for stuff about the big picture that the originators sometimes forget to put into their documents. But I'm not in the market for a PHP book because the manual is so good and because years in the salt mines of C have pretty well taught me how to code a solution to a problem.
Let me hit on one more thing if I may. When you read the source code, you're reading the truth. When you the canonical documents (the language spec or the documentation supplied with the language) you're one step away from the truth. When you read a textbook, you're two steps away from the truth.
I'm generally too lazy to read the source code (not always -- that's how I learned Unix networking, but there were some special circumstances there or I'd just have read a book like a sensible person), but I've been bushwhacked by enough documentation bugs to do as much learning as I can from the canonical documents.
YMMV, of course.
-
Re:The Advances of PHP Documentation
I don't mean to be nitpicking here, but the guy's name is actually "Rasmus Lerdorf".
Go here for proof.
-
The Advances of PHP Documentation
A few years ago, when I started using PHP (somewhere between versions 1.x and 2.x) for professional web programming, the sole sources of documentation were a tiny manual written by Ramus himself (the same Ramus of the second reviewed book - the reviewer fails to note that Ramus Ledorf was PHP primary creator and maintained it almost by himself until the 3.0 effort) and the mailing list.
It was pretty hard to understand some features without delving in the C source (incidentally, PHP is one of the most well behaved coding efforts I have seem to date. The 1.x,2.x and 3.x sources compile without a flaw in almost any flavour of Unix, and I say almost because I haven't tried them all).
Nowadays, besides the wonderful online documentation, you have lots of books (9 available, 12 coming soon, according to Amazon). It is an easy world.
If you are looking for a place to start, the site is certanly this place. If you need a book, try Core PHP Programming. For a deeper look, Professional Php Programming seems to be the way to go.
And, the reviewer opinion notwithstanding, buy Ramus book and let it rest beside K&R, Wirth and Stroustrup books for a while. Not exactly Ramus league, but PHP is more useful for Web programming in the Web than C,C++ and all Wirth languages combined. -
Everythings OnlineThere really is no need for a book on PHP. I taught myself totally from scratch using online resources. Here is a short list of the ones I found most useful:
- PHP - This is the site that started it all. Make sure to check out the documentation section.
- Webmonkey PHP Tutorial - This site is great for getting started with PHP and MySQL.
- PHP Builder - My favorite site about PHP. Lots of good examples and a great message board for all your programming needs!
- Zend - This site is a great portal for more PHP resources.
Hope these sites help out.
-
Everythings OnlineThere really is no need for a book on PHP. I taught myself totally from scratch using online resources. Here is a short list of the ones I found most useful:
- PHP - This is the site that started it all. Make sure to check out the documentation section.
- Webmonkey PHP Tutorial - This site is great for getting started with PHP and MySQL.
- PHP Builder - My favorite site about PHP. Lots of good examples and a great message board for all your programming needs!
- Zend - This site is a great portal for more PHP resources.
Hope these sites help out.
-
annoted manual at php.net rules
Php.net has an excellent docs section, and I learned to code php and set up a fairly major site from scratch just reading their annoted manual. I will say, if you're new to php, try to read through each section even if you don't THINK you'll need it. There's so many goodies built in, you're bound to miss some. Also, the annoted manual is good because the users offer some clever uses of many pieces of code, or good ways to do things like parse form inputs en masse for illegal characters, or whatever.
-
SVG
SVG specifications have been evolving for quite some time, and Adobe is one of the companies in the forefront of SVG acceptance. At Adobe's SVG website you can download the SVG plug-in (2.4meg, Win32/Mac) and then see demos of what SVG is capable of. One of the coolest things SVG can do over Flash is client-side image filters, such as marbled textures, flaming text, and embossing, without the user having to download a large raster image.
The biggest problem facing SVG going forward is the strong alliance between Microsoft and Macromedia, the makers of Flash. This alliance lead to the tight integration of Flash in Internet Explorer 5.5. Fortunately Adobe has worked out a deal with Microsoft to automatically download the SVG viewer on-demand in future releases, much like Internet Explorer automatically installs the Flash viewer now.
Personally I think the biggest strength of SVG lies in its text/xml format, because any current HTML generating tool (perl, php, cold fusion, asp) can generate SVG code just as easily. -
A couple of suggestions:
- Pick a worthy open source project and try to suss the entire thing out as an assignment. Extend its functionality as a class project - for example, using ext_skel as a start, write a new module for PHP. When you're done, offer the maintainers the fruits of your students' labors.
- Think of an application that would benefit your school in general - say, a web discussion board for planning extra-curricular events - and code one up, from scratch (or from a much smaller project.
I get warm fuzzies when I see educators at the high-school level trying to make classes interesting and relevent to students in an immediate sense, as opposed to merely informative. Good luck!
-
Re:MySQL vs Interbase ?
FWIW - PHP 4.0 also supports native Interbase connections.
-- -
Re:Wouldn't it have been easier and safer...
Ok WTF did I do to that url? Its here anyway. Maybe I should preview my postings after staying up late to watch the eclipse.
-
Re:PDF, Ugh.
-
Re:Enhydra... It's tough to track 20 people all coming from the same IP address
:)php4 has extensive session support - you can encode the session info into the URL, or as a cookie, or even use http authentication. That would go a long way towards ensuring uniqueness.
-
Re:The only problem..
Actually, http://www.php.net/projects.php3 has got a nice collection of projects written in PHP - and several of these are "bbs"'es, "web forums" or whatchamacallit... and they are usually quite easy to install. However, if he (the guy who asked this question) don't have access to php on the webserver it's of no help...
-
Re:Cold Fusion
In the PHP FAQ, there's a section on PHP vs. Coldfusion. Also, there's a link to an article by a CF and PHP developer, making the comparison.
I found it REALLY useful. -
Re:Cold Fusion
In the PHP FAQ, there's a section on PHP vs. Coldfusion. Also, there's a link to an article by a CF and PHP developer, making the comparison.
I found it REALLY useful. -
There's only one way to find outPHP looks better, but without any proof
...The biggest difference between PHP and Cold Fusion is that the latter has a marketing department. Anyone can say that PHP/ASP/Cold Fusion slices and dices, but you'll get more mileage out of a proof of concept. Look at your current constraints; e.g., must run with IIS and SQL Server on this W2K box. See if PHP fits. If so, spend a day or two rewriting some of your CF pages.
One caveat I'd mention right now is that you'll get the best performance out of mod_php or the ISAPI module. If you have to use the CGI executable, PHP is at an immediate disadvantage. You also may get a slight boost from using persistent database connections.
BTW, here's a list of High-Profile sites running PHP. Do you get more hits than Volvo?
-
Re:PostgreSQL not as useful for web
A web server or web server module can keep a pool of database connections, thus avoiding the need to establish a new connection for each HTTP request. PHP does this, as do several others. So connection overhead is not really an issue for web sites.
-
First Ticket :)
If you head over to www.php.net, you'll find a number of freeware projects that do stuff like inventory management, trouble ticketing and web based interfaces to mail, etc - you may find something of relevence there.
-
PHP
If you are building webpages I think the best tool is undoubtedly PHP. It has all the power of perl (with the exception of regexes which are not as evolved) and it is far faster to develop in, and probably to learn as well.
It supports multiple different databases, including mysql, postgresql, as well as any ODBC compliant db.
Version 4, due to be released this month I believe (its currently available as RC1) offers an optimizer (available at Zend.com), and will come with a compiler as well.
It easily integrates directly into your HTML code. It is multiplatform, and its free.
Its main advantage is the ease with which web applications or websites can be developed. I am currently working on the software for the backend support of several websites, and using PHP I am able to develop this application very rapidly. Far faster than I might be able to do with Perl.
Obviously for those who already know Perl, they will be able to develop just as effectively in that scripting language anything that can be done in PHP. But for the new user seeking to learn a scripting language, PHP cannot be beat.
-
Re:Total Cost of ownership if Outlook/Exchange
-
OpenLink
My company uses OpenLink multi-tier ODBC drivers and PHP to talk to Microsoft SQL Server from Apache/Linux. It seems to work well, although we haven't had a chance to use it on any production websites yet, and my experiences with OpenLink's support department have been good.
-
PHP and Fast Templates
If you're already using Apache, then it's worth taking a look at PHP (www.php.net). PHP is an open source project that has done an incredible job of competing with ColdFusion, Active Server Pages, and the like. To go along with your question, PHP offers a class called FastTemplates that does exactly what you want. The newer version even uses a caching algorithm that makes it even faster. You can read about it here: www.phpbuilder.com/columns/sa scha19990316.php3 and you can download it here: www.thewebmasters.net/php/
-
Re:Pagan and Wiccan Text Files Resource
Thanks for the compliment on the site. As you can see it also offers a slashdot-like message interface (entirely original PHP3 and mysql code BTW), a directory of links to over 375 Wiccan and Pagan websites, and - most recently - a true search engine that indexes the content of the websites listed in the directory (currently we have indexed over 21000 pages of material).
Omphalos was probably the first Pagan directory when it was originally created back in 1997 or so, and as far as I can tell its now the first true search engine (most sites index only their own sites contents).
Now if I can just get the word out to folks to let them know the site exists....
-
PHP has probably the best manual ever
If you goto http://php.net/manual and check out how they organize their manual and allow users to actually improve on the manual. I think that is a wonderful way to keep users informed plus a good way for a company to get feedback on where improvements need to be made.
-
Re:3-Tiered Architecture-corrections
My employer does a lot of data-mining at a very low level: we have one of the most complex read *and* write data-mining applications out there, and yes we do a lot in SPLs, and SQL and C++ and even our own in-house languages. I am confident (in fact, I know) that you can considerably out-perform SQL if you write "to the metal", in this case the data-structure itself.
Knowing this, and the problem I laid out before (that the DB developer doesn't know what the application developer needs) I have personally started to question the need for an RDBMS, particularly in the case of Web applications.
Let's face it, a full RDBMS for a data-store of a few TBs makes perfect sense, but for a website of a few pages (even a few hundred pages) it's overkill, especially, as a lot of posts have said so far, since that's where your bottleneck is in dynamic sites. So why are we running full RDBMS, or even low-powered clones of such (i.e. MySQL)?
I am willing to bet performance would go wayyy up, if you could have a relational data structure directly available from PHP (a basic B* tree, for example). Why?
One factor: PHP does caching; but it can't cache an *external* data source, such as a DB table, because it can't be sure that it was not modified by someone else; but, if the datasource was *internal* to PHP, caching of records, queries or whole tables would be simple: less disk/data access = more speed.
If you are not familiar with the wonders of PHP4 (not 3.x), check out php.net (and the best online manual in existence) and the now private company behind their engine, Zend. The Zend folks have recently got together with the MySQL folks, to further integrate the two platforms; there is a chance they will end up with a direct access scheme --and that's the main reason I am betting on PHP...
engineers never lie; we just approximate the truth. -
file()
/*I do PHP a lot. I would use the file() function (Each element of the array corresponds to a line in the file, with the newline still attached). You could easily add support for any number of languages this way.
For example, each first line (foo[0]) of the file could be whatever the pages <title> tag would read in THAT specific language. Then you'd only have to make sure your code would alter which file to grab, with the specific language in it. Then the second line (foo[1]) could be something else, and the third (foo[2]), fourth (foo[3]), and so on, could each be used for some specific part.
Or you could just simply use MySQL or some other database, if you have access to it.
*/
-
file()
/*I do PHP a lot. I would use the file() function (Each element of the array corresponds to a line in the file, with the newline still attached). You could easily add support for any number of languages this way.
For example, each first line (foo[0]) of the file could be whatever the pages <title> tag would read in THAT specific language. Then you'd only have to make sure your code would alter which file to grab, with the specific language in it. Then the second line (foo[1]) could be something else, and the third (foo[2]), fourth (foo[3]), and so on, could each be used for some specific part.
Or you could just simply use MySQL or some other database, if you have access to it.
*/
-
file()
/*I do PHP a lot. I would use the file() function (Each element of the array corresponds to a line in the file, with the newline still attached). You could easily add support for any number of languages this way.
For example, each first line (foo[0]) of the file could be whatever the pages <title> tag would read in THAT specific language. Then you'd only have to make sure your code would alter which file to grab, with the specific language in it. Then the second line (foo[1]) could be something else, and the third (foo[2]), fourth (foo[3]), and so on, could each be used for some specific part.
Or you could just simply use MySQL or some other database, if you have access to it.
*/