How popular is PHP and mySQL?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tomdude48
Forum Newbie
Posts: 1
Joined: Sun Oct 26, 2003 9:00 am
Location: Dallas, TX

How popular is PHP and mySQL?

Post by tomdude48 »

I created a web statistics program using Flash for the client and Perl CGI for the backend, http://hitcounter.leveltendesign.com. We offer it for free and it has been fairly popular, it is installed on about 15 sites a day. However, we have been getting steadily less traffic from CGI resource sites. Coupled with the fact that several people have requested a PHP version, I believe the growing popularity of PHP has been eroding people looking for Perl solutions.

So we are thinking about creating a PHP version of the backend scripts. Our approach with the CGI version was to make the program as universal as possible by minimizing the need for modules and external resources. To that end all data is stored in indexed text files eliminating the need for an installed database. I have been told that PHP is always installed with mySQL. I would love to use mySQL instead of text but I don’t want to run into a problem that a significant percentage of servers don’t have mySQL available.

What percentage of servers have PHP installed and what percent have mySQL installed both on Unix/Linux and Windows servers?
User avatar
Derfel Cadarn
Forum Contributor
Posts: 193
Joined: Thu Jul 17, 2003 12:02 pm
Location: Berlin, Germany

Post by Derfel Cadarn »

Check the PHP Usage Stats, you can safely assume that every server running PHP also runs MySQL (I guess).
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

And of course php can read and write to files as well as connect to a db server.

As mentioned above, it would be unlikely that php was installed without a database. That database will usually be mysql - but not always. A files solution would avoid having to support many types of database. Or use a database abstraction layer.
Stoneguard
Forum Contributor
Posts: 101
Joined: Wed Aug 13, 2003 9:02 pm
Location: USA

Post by Stoneguard »

My suggestion would be to provide a dual solution. Give the user a choice of a MySQL database or text files. I know this is more complex on your part, but it gives you the opportunity to create the initial part in MySQL - if you so choose - and then release a follow-up version with the text file based data storage.
Post Reply