Domain: phpbuilder.com
Stories and comments across the archive that link to phpbuilder.com.
Comments · 86
-
Re:Please explain to meIMNSHO: People just don't know what they're missing.
PostgreSQL used to have a maximum row limit (8K i think) that kept it out of the question in many cases. This has been fixed, and, as this review by Tim Perdue has shown, PostgreSQL is now challenging MySQL in speed also.
So why are everyone still using MySQL, with all it's shortcomings?- My friend is using it, and he's happy with it.
- My ISP only has MySQL support, so it's the only way to go.
- Even Slashdot is using it!
- It's the most popular DBMS, so it must be the best, right?
- Everyone and my neighbour is using it, so it's easy to get support.
You get the picture. MySQL isn't the most popular free DBMS because it's the best. This is not to say that there are valid reasons for using MySQL. But you can say the same thing about other software: What is the most popular and successful open source server OS? Linux. Which is the better server OS, Linux or FreeBSD? One could argue that FreeBSD is way better.
If you're almost convinced MySQL is the way to go, but would like a second opinion before deploying it, Why not MySQL? by Ben Adida, part of the OpenACS project is must-read.
For the sake of half-completeness: Don't forget that we have another very powerful RDBMS that has quite recently been open-sourced: Interbase
Kakemann -
Re:What code are they using
-
Re: "Broken" PHP
Oh, and it's (an admittedly broken version of) php4 that ships with OS X. nobody seems to know why it doesn't work.
i thought it was well known why PHP4 that ships with MacOS X doesn't work. PHP4 has a directory called PEAR in one directory, but also has a file named pear in that same directory. MacOS X's file system defaults to HFS+ which isn't case sensitive. if you use the UFS file system instead you'll have no problems whatsoever. this has been documented on many sites, including stepwise and php builder.
- j
-
Re:XML
> Sure you can repressent documents, and with stylesheets rewrap them into a design of your choise
Well, this is exactly what I use XML for, and so does IBM for the entire ibm.com (sorry, can't find the link, but read an entire article a few months ago). There are also one or two other megacorps using XML.
In the XML solution I am working on now, all the XML is generated on the fly and converted with an XSLT engine (Sablotron and PHP) so I don't really have a use for XMLquery, do I? I mean, I can just use SQL to get whatever I want.
-Kraft -
PHP4/Postgres (really!) is your best bet
There was an article here on slashdot that compared four different scripting languages. From the standpoint of speed PHP came in first. PHP has a reputation of being the fastest web scripting language and, to be honest, is a joy to program in as well. If this is not enough speed Zend sells a PHP cache that will precompile all your pages to speed things up even more. I believe there is a free version of the PHP cache out there but I don't know it by name.
And before you use MySQL please read this. MySQL has a reputation of being the fastest open source database but it really can't scale like Postgres can.
-
Re:Support
Well, I don't know about mySQL, but GreatBridge provides 24x7x365 support for PostgreSQL, which is also open source and said to be more scalable than mySQL.
-
Re:Hardly any details
Sure.
www.php.net/manual. The manual is great. You can learn everything you need to know about specific things from there. Before that, you need a basic tutorial.
A PHP page looks like this:
<html>
<title>Hello</title>
<form action=<?php print $PHP_SELF; ?>
<input name=message>
<input type=submit>
</form>
<?php
print $message;
?>
Try that. Also, to get hold of PHP, use PHP Triad (on Linux, you can probably install it from your distribution CD), a win32 installer of PHP, Apache and MySQL.
Basically:
PHP is HTML with the code embedded between blocks starting
<?php
and ending
?>
within that you put your PHP code.
For example:
<?php
print "hello";
?>
would display hello - just like perl.
Similarly, as in Perl, variables are preceded by $.
So:
<?php
$message="chese";
print "I like $message";
?>
It's convenient - all form variables get put into variables of the same name:
<form action=apage.php>
<input name=thing>
<input type=submit name=action value=Submit>
</form>
would send apage.php two variables - $action='Submit'; and $thing= whatever you typed in there.
You should investigate PHP's object-orientation functions too. Here's an example class [class omitted due to slashdot's lameness filter :-(], which should be pretty explanatory.
Anyway, start here; read here for more, as well as here. Also subscribe to the mailing list at php-general@lists.php.net for help from others.
-- -
PHP ConsultantsI think that you need to look at some on the sites that support PHP development:
Or my site: (shameless plug!) consultutah.com
-
Re:postgres / mysql
I found an interesting article
by a fellow who has worked on some
major open source oriented sites.
He does a quick comparison of
postgres and mysql here. -
Raves.I just have to rave about the database replication included with MySQL, what a fantastic feature. If you are interested in setting up replication yourself, you should read the nice tutorial on it over at PHPBuilder. The tutorial can be found here.
The replication feature has been changed a little since the tutorial was written, so you may want to check out the documentation at the MySQL site. Here's a copy of my own
/etc/my.cnf file from both machines, which are setup for 2-way replication, for reference (perhaps I'll get around to posting a tutorial of my own later today on The Linux PimpMain server
/etc/my.cnf file
[mysqld]
log-bin
master-host=ip_address_of_backup
master-user=replicate
master-password=your_password
server-id=1
Backup server
/etc/my.cnf file
[mysqld]
log-bin
master-host=ip_address_of_main_server
master-user=replicate
master-password=your_password
server-id=2
-
Raves.I just have to rave about the database replication included with MySQL, what a fantastic feature. If you are interested in setting up replication yourself, you should read the nice tutorial on it over at PHPBuilder. The tutorial can be found here.
The replication feature has been changed a little since the tutorial was written, so you may want to check out the documentation at the MySQL site. Here's a copy of my own
/etc/my.cnf file from both machines, which are setup for 2-way replication, for reference (perhaps I'll get around to posting a tutorial of my own later today on The Linux PimpMain server
/etc/my.cnf file
[mysqld]
log-bin
master-host=ip_address_of_backup
master-user=replicate
master-password=your_password
server-id=1
Backup server
/etc/my.cnf file
[mysqld]
log-bin
master-host=ip_address_of_main_server
master-user=replicate
master-password=your_password
server-id=2
-
Re:Building Dynamic Pages With Search Engines in M
The author has revisited this subject. Here is the updated version. IMHO very good article.
-
Building Dynamic Pages With Search Engines in Mind
There is an old article on PHPBuilder.com that describes a meathod for creating dynamic, indexable pages. The article is written for PHP, but you should be able to use the same technique with other languages. Even if it doesn't work for all your pages, it still is a useful technique.
-
MySQL has added replication ...And it's pretty/really easy to set up. Just a couple of changes in the configuration file. I've never done the replication of the database across anything with less bandwidth than all machines on the same local switch, but it appears to be rather reliable. Some of the slaves that I've played with have been down for days, and when they database is restarted
... they pick up replicating where it left off.Not sure if this has anything to do with what you're doing as MySQL is an entirely different product than PostgreSQL, and you may be trying to avoid it based on its own well documented pitfalls/features/etc.
The URL for the story on setting up MySQL replication is: http://www.phpbuilder.com/co lum ns/tanoviceanu20000912.php3.
Hope it helps.
-
View the PRINTABLE page - one page
Well, the printable version is one page, read it.
-- .sig -- -
Re:PHP relatively new:
(why isn't there a stand-alone version of PHP?)
-
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 -
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.
-
I've stuck to online resources
These books may be useful, but mostly everything I have needed has been online. The PHP manual is pretty comprehensive and easy to navigate. If you do not have it, download it now!
I have found a lot of help on http://www.phpbuilder.com/ this has a lot of source code, configuration help and helpful forums. From just these two sources you could certainly produce something of slashcode complexity if you have some programming experience.
-
Some kind of happiness is measured out in miles...
Or, as is the case in point, in Kb/sec. Here is where MySQL rules. Using some sort of connection pool (so preventing reauthentication to the DB) and a well-tempered database schema, MySQL can be made to perform as fast as its big brothers (there are unoffocial benchmarks showing select times better than Oracle). The connection pool also limits the need for many open connections at any given time. The numbers in the article agree with this raw velocity advantage MySQL commands.
My take is that when some features like transaction support, sub-selects and some sort of stored procedure support (other than writing it in C and recompiling :)) reach production grade for MySQL, we will have a clear winner and a hell of a open-source competitor for the big guys. -
Offtopic ranting.(This is just an off-topic rant about Internet.com. I thought that it would be semi-appropriate here.)
Is anyone else annoyed by the big Internet.com "network"? It seems that they are going around and buying every single worthwhile and half-worthwhile website out there? After the site is acquired, it becomes slower than it was before, because they fill it with ads and links to their other sites.
During the last year, this has happened to many of the sites I frequent. I'm getting really bugged, and a even a little scared. This post on Slashdot just gives me another reason to be so.
- TheCounter was an excellent counter service. They had a website with two banner ads on each page, and a nice clean layout. The counters they provided loaded quickly and reliably. After having been acquired, the website was redone to something that makes my eyes hurt, and the counters started either taking ages to load, or failing to load at all. Their solution? Create a new account so that it exists on our new server.
- No major changes yet at LinuxApps, except for all the links and ads for the other Internet.com sites. However, the same problem as the one listed in this post arises. Would a post about Freshmeat on LinuxNewbie be pulled because Internet.com owns LinuxApps, which is similar to Freshmeat? This is, apparently, what happened in this case.
- BrowserWatch, LinuxNewbie, PHPBuilder, and a lot of other sites I frequent have all been bought by Internet.com. There haven't been major changes on them yet, besides all the annoying links and logos, but this post gives me more reason to be paranoid.
--
-
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/
-
A helpful (?) article and an abstraction layer
I know you hate the idea of running anything critical on NT, but maybe you should just hold your nose and set aside one box as the database server. There's an article on phpbuilder.com that should get you started here.
The other suggestion is to point out that, from a programmer's point of view, there's not a hell of a lot of difference between using Access and any other SQL-speaking RDBMS that's got at least as many, if not more, features (such as MySQL, which at least has a security model of sorts). If they're really prissy, you could write a DB abstraction layer (check out phorum's at www.phorum.org for the basic idea) that hides all the db-specific functions from them (e.g. write a DB class and a query() method in PHP that can do Access, Postgres, Oracle (if ever you become well-heeled), or whatever.
-
Re:PHP Coding
sphix42 links to the '3rd Incarnation' of the Cached Dynamic Modules. To check out what was written previously, so you can get a background on whats goin on:
#1 Cached Dynamic Modules
#2 Another Look: Cached Dynamic Modules
#3 Cached Dynamic Modules pt 3 (sphix42's link)
-----
If Bill Gates had a nickel for every time Windows crashed... -
Re:PHP Coding
sphix42 links to the '3rd Incarnation' of the Cached Dynamic Modules. To check out what was written previously, so you can get a background on whats goin on:
#1 Cached Dynamic Modules
#2 Another Look: Cached Dynamic Modules
#3 Cached Dynamic Modules pt 3 (sphix42's link)
-----
If Bill Gates had a nickel for every time Windows crashed... -
Re:PHP Coding
sphix42 links to the '3rd Incarnation' of the Cached Dynamic Modules. To check out what was written previously, so you can get a background on whats goin on:
#1 Cached Dynamic Modules
#2 Another Look: Cached Dynamic Modules
#3 Cached Dynamic Modules pt 3 (sphix42's link)
-----
If Bill Gates had a nickel for every time Windows crashed... -
PHP Coding
I am a professional PHP developer and I personally put quite a bit of thought into the code as I write it. I think a very good set of articles which help with the problem you mentioned, at least from one angle, are the Cached Dynamic Module articles at php builder.
-
More Freshmeat Info:
Before I forget.
Another important feature is that these techniques are server side so are independent of the browser used. You can also use PHP with Oracle 8i but most of the really cool stuff is centered around MySQL. Plus, why spend money on software if you don't have to. Spend the money save paying for support or donating to the OpenSource projects (PHP and MySQL). Yet another advantage is that the application can be developed and tested on Windows (read Configuring Windows98 For Local Dev) then uploaded to the Apache Server. A good free program with PHP syntax highlighting and tons of other goodies for developing is HTML-Kit.
-
Apache Directive Work Around
PHP Builder ran an article describing how you can have Apache Webserver treat a certain "directory" as a script, using the Location directive. So if I had a script file name called www.mydomain.com/foo then I could access www.mydomain.com/foo/param1/param2 and the foo script would run, and could use environment variables to find the "path" foo/param1/param2. I tried it, and it works quite well. This hides get parameters as "paths" so that search engines don't think the pages are dynamic (this is how Amazon.com works)
-
How To Create A Indexeable DB Driven SiteWe simply build the site so that all content is accessed by virtual URLs.
So http://www.somecompany.com/en/products/doors/alum
i nium is actually passed to a script which seperates the arguments from the URI and then builds the aluminium door product page with the english template. It works rather well and everything can be configured to be text/html and .html without problem.An example in PHP is available at http://www.phpbuilder.com/column s/tim19990117.php3.
A.
--
Adam Sherman -
Shameless plug
A shameless plug for phpbuilder.com. No, it isn't mine, but it gets its connectivity from the same ISP I use. Those people who have been complaining about a lack of PHP source code and information, you should visit this site.
-
FastTemplate
-
Re:PHP seems broken by design.
You are under no obligation to write bad code, and while PHP permits that, it does not require it.
I agree with you that embedding executable code in your HTML is a bad idea, unless the executable content is small enough to be trivial. PHP does not REQUIRE you to embed large amounts of code directly in your page, however. If you follow sensible Object Oriented programming techniques, you can use PHP in much the same was as Java Server Pages uses JavaBeans.
Put all of the complex code necessary for a single piece of functionality in a single PHP script which is built as a class. Pass the output of that class to a utility class, like an HtmlTable rendering class, and you only need to include a couple of PHP-specific lines in your HTML. At that point switching out the HTML becomes trivially simple. If you create a "style-free" HTML template which contains all the necessary PHP includes, then you can hand this template off to any HTML production person with simple instructions.
You still have to include SOME PHP code in your HTML - enough to point to the objects that do all of the real work, and which provide HTML output.
From the example you sited above, it sounds as though you hard-wired the PHP code into your HTML. This is a very common, but bad, practice, one which runs counter to component based development.
The website www.phpbuilder.com has some good articles discussing the use of PHP classes.
The practice of embedding executable content directly in an HTML document represents a way to share some of the development burden with people who may not be qualified programmers. You can create an object tailored to your immediate needs (business or otherwise), tell your HTML producing co-workers how to use that object on a web page, and let them do the rest of the work, while you go back to building more objects.
If you follow this practice, the graphic designer doesn't have to give you HTML templates, you can give the designer your objects, and let them build the page. Tools like Macromedia's Dreamweaver allow you to define custom objects so that your HTML people don't need to leave their familiar environment in order to embed your functionality. -
Re:PHP seems broken by design.
oops.. here's the link: PHPBuilder.com - Templates - why and how to use them in PHP3
md
-
FastTemplates is the answer
If you don't want to mix up HTML and PHP, use FastTemplates. I've written some apps for clients using that thing, it completely seperates code from HTML. The average size of these apps is about 10000 lines (wc -l) of PHP code. Maintaining and enhancing it would be a nightmare, if I would have to deal with the designer's HTML stuff.
FastTemplate Tutorial
And yes, of course, PHP is not the right tool for every job. The same is true for Java. -
Yeah - but this gotta be fake
This is obviously a fraud. First, with the boards clustered that close together, you'd have heat problems. Second, with the boards that close together, if you shot a bullet through it, you'd take out every board.
Third, there were WAY too many innovations in that press release. From a new OO language to a new OS to a new hardware paradigm.
I'll believe it when I see it.
Tim
PHPBuilder.com