CGI PHP scripts pros & cons

Discussion in 'Software' started by mag00, Jun 11, 2004.

  1. mag00

    mag00 Sergeant

    I need to add an affiliate program along with a shopping cart, and know little about scripts. Been to hotscripts.com but there's many to choose from, from free to expensive.

    One concern is of a secure tracking that cannot be munipulated for stealing clicks or referalls. The other is I will need to be able to set it up fairly easily and is not a bandwidth burglar.

    I need to be somewhat more educated on this also.
    What is the major difference in cgi vs php. I have heard of ASP and was warned off of it. Something about windows server with lots of bugs and crashes?

    Any help will be appreciated
     
  2. Kodo

    Kodo SNATCHSQUATCH

    CGI, PHP, ASP pretty much all perform the same function. They are scripting languages that are interpreted at runtime. CGI is probably the oldest of them all and IMO is a dinosaur.

    PHP and ASP are the newer of the 3 and ASP has been upgraded to ASP.NET.

    Again , they both do the same things at the basic level but they use different syntax and there some distinct usage differences between the two. Whoever told you NOT to use ASP should be smacked..hard. I program in ASP as a primary language. Crashing an ASP site is just like crashing any other site made in a different language.. it's the DEVELOPERS fault for poor code.

    I tried PHP for a while and frankly, I despised the syntax and thought it to be overly convoluted.

    It is true that ASP runs ONLY on windows' IIS web server but I find the zealotry and paranoia about not using it old and tired; most of it lies with poor admining of the server.

    PHP is cross platform. You can use it in IIS and many other webservers like apache.

    Another thing people tend to equate with PHP is MySQL. DON'T do that. MySQL is a database system, not a scripting language. MySQL is NOT the only database system out there. Many use it because it is free, but there are many other free database systems out there. I won't go into those unless you ask as that is not the focus of this post.

    Don't know if you saw this post : http://www.majorgeeks.com/vb/showthread.php?t=17921
    It covers many lang's available.

    My suggestion is (if you have the time) to learn BOTH. They are BOTH good scripting languages and can only benefit you if know both of them. I know I should take my own advice, but I just really had strong feelings about the syntax of PHP. I decided to focus on learning ASP.NET which is by far and large superior to both.

    Have fun!!
     
  3. goldfish

    goldfish Lt. Sushi.DC

    The choice youre going to make will be dending on your hosting really. I agree with Kodo, Windows Server is NOT buggy, and doesnt crash, if you know what you're doing. My windows server has been running 24/7 for the last 4 months, NO crashes. The only time its ever crashed before is because I tried to make it do somthing it didnt want to.

    I much prefer IIS to apache, because of the ease of setup and configuration, and the performance (I did a php serving benchmark with both servers, IIS came out on top serving the data faster). With PHPs ISAPI module it's very very fast!

    If you were going to go with PHP, I would go with MySql myself, as first its free and easy, but second it seems to be the best supported DB app in PHP. If it were ASP, however, I'd make it simple and use access databases. That way you dont have the DB server running all the time.

    As far as an OS for a server is concerned, if you want to be able to administer it easily, go for Windows. I would go for 2003 server, or 2000 server. It can be tweaked in the same was as XP for the most part, and you can stop it from doing anything but serve web pages.

    From personal experience, I wouldn't recommend a Linux distro till you learn the basics of server administration (what you need to do to it) and the basics of linux/KDE desktop. I spent nearly 2 days trying to set up a web server on Red Hat, gave up and tried Debian, gave up again and used Bonsai linux (debian based). After a week I was so annoyed with editing text files, typing in great big command lines and compiling things time after time that I just went with what I knew and installed Windows 2003 server. And I've not regretted it.
     
  4. mag00

    mag00 Sergeant

    Well thanks for the good advice. My hosting service I believe is windows based and is quite inexpensive. $100/year 200mb no bandwith limits. They also deal with a company that has unix based server, my mac loves it.

    I assume I will need a database to store the tracking info correct? The mySQL hase popped up quite frequently but I never really knew what it was.

    I found a site that gives tutorials on script writing, and will practice for awhile just to familiarize myself with some of the functions.

    I guess I will have to take a ASP and PHP then. I'm not to sure if by syntax you mean biblical proportion like shalt becometh etc. where a newer version is smaller and makes more sence.

    And one more thing Security. Will that be a function of the database?
     
  5. Kodo

    Kodo SNATCHSQUATCH

    historically, Unix has been cheaper to provide because of its' low TCO. Windows costs more and thus that cost is typically passed to the client.

    This isn't entirely correct. You CAN use xml files or text files or pretty much anything to store your data in. But a database is the more popular choice.

    Great idea! Make a few small things and see what fits your personality .

    How code is written texutally is the syntax. For instance, to print out to a page in ASP is
    RESPONSE.WRITE
    for PHP I believe it is
    ECHO
    Stuff like that. I find ASP more human readable than PHP.

    That will be a function of you and the host. The database itself is not responsible for security. How it is administrated and locked down controls the level of security.
     
  6. mag00

    mag00 Sergeant

    Thanks Kodo, I did a bit more studying and research and now at a point of trying basic scripting. I've gotten cgi and php to work a little and then the tutorial goes to mysql and now I'm stuck

    My server is windows nt websvr1 5.0

    php vers 5.0.0bt-dev

    supposedly sqlite is there somewhere..

    So in the tutorial they say to copy and past (script) then put in the mysql.bin file.

    I don't find a file as such on my server. Do I need to upload mysql? Will the sqlite work and what file to upload to/

    When I log on my server (Host) I have some vti files, aspnet, private, webstats, images.

    On the php info printout I also thought I saw asp enabled.
     
  7. goldfish

    goldfish Lt. Sushi.DC

    Do you have complete control over the server or are you sharing?

    on the phpinfo(); you wil have seen ASP Style tags enabled. So instaed of putting <?php you can put <% and it'll still work. I dont recomend it because it makes code very non-portable.
     
  8. mag00

    mag00 Sergeant

    I don't have any control of the server, just upload permission.

    I found what seemed to be a fairly decent affiliate program idevaffiliate v4.0.

    PHP works with mySQL Multi tier etc.

    Now it's just a matter of if the hired web guy and site owner can come to terms. Their hosting is different than mine and has mySQL enabled. My hosting is budget and I have to pay extra for that service (mySQL).
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds