Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

PHP Links version

Quote Reply
PHP Links version
Hiya all,

I wanted to post a message saying I am one of 3 people working on a Links type idea called "OpenLinks" but powered by PHP and MySQL.

I will be honest and say we are about 6-9 months behind Gossmer-Threads, but it's only been in development a week, but we have some great visions and know what we want to provide.

The reason for posting this message is we would welcome some feedback, ideas, best ways to go forward, even some help.

Our support forum is at http://www.nerdwords.org/forum/ with a link also provided from there to a basic v0.1 demo.

Quote Reply
Re: PHP Links version In reply to
WebhostArea.com <- Runs off a custom made PHP/MySQL Links like script. Plan the backend first, get the category system etc figured out before you start coding.

Good luck.

Discuss webhosting at
The Webhost Area Forums!
http://www.webhostarea.com/forums/
Quote Reply
Re: PHP Links version In reply to
First: check everything else that is out there. If you are doing this, you must have a reason, and that reason is usually the other stuff out there is not good for some reason(s). Once you define those reasons and/or goals, you have the basis of a road map.

Second: borrow as much as you can from other open-source modules so you are not reinventing the wheel, and you benefit from other peoples work (and they benefit from your feedback).

Third: Don't take short cuts. If something you are doing requires a whole module/routine to be built, then take the time and build it. If it's general enough, release it stand-alone, and let people use/debug it.

Fourth: Good Luck.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: PHP Links version In reply to
Hi,

Thanks for your kind comments. You have added some further thought to the project.

We are dead surprised that someone has not been as dedicated on a PHP based system, like you guys are about Gossamer-Threads


Quote Reply
Re: PHP Links version In reply to
We found a php version of links somewhere on the net, and found that it was useless for us, sure we have mysql, sure we have php, but when it came to the templates, the originals worked fine, but once altered and increased in size, the server would spit out a memory error tyring to allocate such and such, can't , stoped.

The increase in size of the one templage file was only around 7,000 bytes, for a total of about 18,000 bytes for the template file, when we reduced it down to like 14,000 bytes, then their system worked again, but this meant having an extremely limited template set.

Now, were not suggesting that yours will do the same, but if this is a system wide limitation of php and mysql, then perhaps it's not the way to go.

The more I think of it, the more Im convinced that it's probably a limitation setforth in some configuration file on our own server, but since our server is pretty stock, then it must be the same on thousands and thousands of other servers, in which case they may face the same problem and solution (purchasing Links Mysql) that we had.

Good luck to you and your project.

Harrison


"I've got if's pretty good, but that's about it"
Quote Reply
Re: PHP Links version In reply to
There was some issues with early versions of PHP3, but those were fixed in later versions. PHP4 changes things a lot, much faster and less resource happy.

However i will pass this information onto the technical team, who have the experience to create for effective coding.


Quote Reply
Re: PHP Links version In reply to
In Reply To:
but if this is a system wide limitation of php and mysql, then perhaps it's not the way to go.
Probably not a general limitation. More likely, bad coding. My impression of PHP is that its greatest benefit is also its greatest weakness -- it's far too easy to get started with and think you actually know how to program... Lest you think I am insulting any programmers, I might point out that I'm one of those people that could easily be falsely led to believe by PHP that I know what I'm doing. Smile

There's a lot of bad code out there being sold and freely distributed, which is all the more reason to stick with what you know and trust, i.e. G-T for me.

Dan

Quote Reply
Re: PHP Links version In reply to
A valid point Dan, but in the right hands PHP is a powerful bit of kit.

GT is an established product, with much to offer, but it has been in development nearly 2 years.

We are on the other hand working to offer a PHP solution. We know it's going to take some 6 months to develop something to the degree as GT, but we think that in time we can offer some choice for joe public.



Quote Reply
Re: PHP Links version In reply to
Dan makes a good point.

I have seen many, many good starts in PHP, but very very few if any "finished" or "mature" products. it seems it's easy to start, but not as easy to finish. The halls of PHP are littered with the corpses of half (or less) started projects and abandoned efforts.

Take phpMyAdmin for example. GT cloned it, with a better program in a matter of weeks. Straight perl, no games. It didn't suffer from the 'quirks' of a PHP3 program -- use of the back-button, and such.

I just really have not found any place I can use PHP that I'm not happier doing it in perl.

PHP seems to be a reflection of the web/CGI and as such, suffers from most of the same problems. PERL was written as a text processing/parsing language, and was drafted into web/CGI use with a slew of add ons and add ins. It was designed as a useful language/tool, not as a specific widget.

The author of wwwthreads has decided to port the program to PHP, and develop both a perl and PHP version. Yet, he gave up on trying to make a template version of w3t. I curious how this will go, and I'm following it. It's not a definitive effort, for sure, but it certainly is one reasonably good marker on PHP vs PERL


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: PHP Links version In reply to
Personally speaking the reason why I prefer PHP over Perl, is that when i first looked at doing something with them, i found PHP much easier to learn and pickup, which inturn held my interest progressing further.

In terms of what the 2 can do, there really is very little difference. Performance of each produces similar results, many of the applications are available in both.

I think PHP is marked against ASP, which in my view jumps all over it's microsoft enemy, but what I do agree is you will find much more finished products at the current time in Perl/CGI, simply cause of the time it's been around, but PHP will catch up, I already seen it replacing news and articles on a number of popular sites, when before CGI was the main player, so I think PHP has a very strong and useful future.

Martin

Quote Reply
Re: PHP Links version In reply to
What you are saying is that PHP will become an ASP replacement, making it the choice of CGI scripting on Windows platforms? Maybe that is the way to look at it. Windows --> PHP, Unix -->perl ... that I can understand :) <G>

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: PHP Links version In reply to
PHP is a good alternative if you learn how to program with it properly. The first thing I programmed in PHP was a review mod for Links SQL, and looking back at that I can't believe I did it :-). But when you actually read articles at places such as http://www.zend.com and look at the comments and tips at php.net you learn how to program well and you can really get some good code working in a very quick time.

For example, that template thing that came up earlier. It must have been pretty shocking code. For example, if you had a dir which had all the templates in it and you wanted to load it in a way that wouldn't be affected by the file size would simply to do the following:

function load_template($filename){

global $templatedir;

chdir($templatedir);
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
print "$contents";
}

A common mistake which would have been what happened in the program above would have been instead of using the filesize function to get the length of the file in the first place, the line of code would have been:

$contents = fread ($fd, 16000); # Or a different number...

Instead of:

$contents = fread ($fd, filesize ($filename));

If you get a PHP script from a reliable programmer, it will be just as good as a Perl script. I don't want to get into a PHP v Perl or PHP + Zend Optimiser v Mod_Perl so we will just call it a tie :-).

Anyway - you might want to submit that code to programmer and tell him to fix the templates up ;-).


Discuss webhosting at
The Webhost Area Forums!
http://www.webhostarea.com/forums/
Quote Reply
Re: PHP Links version In reply to
Hiya all,

Just to tell you that we have now moved the development of the PHP version to http://openlinks.linuxguru.net/

We are also looking for developers who may be able to help out with a few areas or even continue with the ideas that are being brought forward all the time.

Thanks for your time

Martin