What to use? PHP or .NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mayormel
    New Member
    • Oct 2007
    • 16

    What to use? PHP or .NET

    Hi!
    I'm new to this website development and trying to finish my webpage. Now I'm stuck at the stage where i have to devolop a form for user to imput data and have it sent to my email. (user would upload the picture with name and submit). In order to do that, im not really sure wat to use. Im using windows to build my webpage and would host soon. I looked into PHP, but that requires me to download so many programs to compile. I didnt look into .net yet but if i spend like 2 weeks i could learn pretty much of it. Any suggestions?.
  • Lumpy
    New Member
    • Oct 2007
    • 69

    #2
    In my little bit of experience, I thought it was pretty easy to install php to work with IIS. I actually thought it was easier to get php working with IIS than to get the updated .net framework working with IIS. The only thing would would have to download and install would be php, unless I am not completely understanding what your asking.

    After that, I think more than anything its a personal choice about what flavor you would rather use. Personally I learned php first and went to learn .net using c#, programing with the free visual studio editions from Microsoft. My personal opinion is that programming with php using Eclipse with the php plugins installed was easier. That is just my biased opinion though. People I go to school with seemed to disagree with me, but any experience they had was with .net.

    I would recommend taking a week to check out the .net stuff and play with it a bit and then make your own personal choice on what you would rather use. I think from the sound of what you want to do, either would work just fine.

    Comment

    • mayormel
      New Member
      • Oct 2007
      • 16

      #3
      thank you for ur info. i like php but i was going through the web for how to compile. the results came up with that to compile it on windos xp. i would have to have Microsoft Visual C++ v6 or any other Microsoft devolopment environment. then "Since PHP 5 the free Microsoft .NET toolchain is also supported (you need to install Windows Platform SDK, Visual C++ Toolkit and .NET Framework SDK)."
      **the win32 buildtools from the PHP site at » http://www.php.net/extra/win32build.zip.

      **the source code for the DNS name resolver used by PHP from » http://www.php.net/extra/bindlib_w32.zip . This is a replacement for the resolv.lib library included in win32build.zip.

      **If you plan to compile PHP as a Apache module you will also need the » Apache sources.

      **Finally, you are going to need the source to PHP itself. You can get the latest development version using » anonymous CVS, a » snapshot or the most recent released » source tarball.

      Is that right or am i looking at a wrong info.

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        Hi.

        Installing PHP is pretty easy on Windows.

        I personally always use the Apache HTTP server with PHP rather than IIS, although I hear PHP is pretty easy to set up on IIS.

        You can install PHP on Windows using a Setup Wizard. No need to build the source like your earlier post suggested.
        The installer can be found at the Downloads section at php.net. (Second one from the top in the Windows Binary section).

        Once that is installed you only need to set it up with you HTTP server. Feel free to post again if you are having any problems with that.

        As to the question in the title.
        I originally learned Java and C# at school for several years, so you'd have thought I'd be a .Net person. But no, as it turns out I found that PHP is much more flexible and easier to use. PHP's database interaction is also, in my opinion, much easier.

        Comment

        • Lumpy
          New Member
          • Oct 2007
          • 69

          #5
          I am really not sure what it would take to compile php on a windows machine. The only time I have ever compiled php myself was on a Linux box. On a windows machine, I have always just used the installer and then made any changes to the php.ini file. For just simply uploading a picture as part of a form and emailing it out, I am pretty sure you would be ok just using the installer package available on php.net. The only reason I would see to compile it yourself would be if there is some special function that you are looking for that you couldn't just add in from the php.ini file, like trying to use php with .net framework. If thats the case, I don't know very much about these projects, but you could look into Phalanger and/or Mono, they might be of some help to you. From the sounds of it, it seems that you might be trying to use php with the .net framework, and that is something I haven't done so I really don't know. I just used php as a scripting language with IIS.

          A final note, for the documentation on the php website, it looks as the .net functions are still experimental as they put it, and might not be a good idea to install on a production box.

          Comment

          • Lumpy
            New Member
            • Oct 2007
            • 69

            #6
            Originally posted by Atli
            As to the question in the title.
            I originally learned Java and C# at school for several years, so you'd have thought I'd be a .Net person. But no, as it turns out I found that PHP is much more flexible and easier to use. PHP's database interaction is also, in my opinion, much easier.
            Thats exactly what I have been thinking. I am in school and getting into the .net programming except we use VB, and I tried to teach myself with c# and I really don't like it at all. So far in any classes dealing with it I have been the only one with any php experience and the people all think I am crazy for thinking that...So be it I guess, I tried to tell them, if they want to suffer...hehe

            Comment

            • mayormel
              New Member
              • Oct 2007
              • 16

              #7
              Thx all! I tried to install with installer but it gives me error msg "A network error occured while attempting to read from the file C:\work\php-5.2.4-installer[1].msi. can anyone help me what i should do. Plus do i need to install visual C++. thx again

              Comment

              • Atli
                Recognized Expert Expert
                • Nov 2006
                • 5062

                #8
                Originally posted by mayormel
                Thx all! I tried to install with installer but it gives me error msg "A network error occured while attempting to read from the file C:\work\php-5.2.4-installer[1].msi. can anyone help me what i should do. Plus do i need to install visual C++. thx again
                Hi.

                No you don't need to install C++, or anything like that.

                That's a weird error. Sounds like a MSI error rather than anything PHP related. Check if there are any updates to you OS available and see if that fixes anything. (Unlikely but hey, it can't hurt)

                What version of Windows are you running?

                Comment

                • chrisfry
                  New Member
                  • Oct 2007
                  • 6

                  #9
                  Hi mayormel and others,

                  Are you committed to using IIS? Before reading this, I probably would have gone for .Net, just because like IIS it's Microsoft, but I don't use IIS for web hosting, so that's not an answer based on experience. If others are saying PHP works, I'd give that a shot first just because I like to use open source when it's a sensibly comparable option and likely to result in a lower TCO (total cost of ownership).

                  I've found this app fantastic for doing PHP development on a Windows machine (as well as MySQL for anyone interested):


                  It turns your PC into an Apache web server including PHP. I like it because it's much easier to install and use than trying to install the included products manually.

                  Once it's installed, just put your .php scripts into the htdocs folder and navigate to http://localhost or http://127.0.0.1 to view the results.

                  Chris Fry
                  Canberra, Australia

                  Comment

                  • pbmods
                    Recognized Expert Expert
                    • Apr 2007
                    • 5821

                    #10
                    Heya, mayormel.

                    It really depends on what you're trying to do. Personally, I think that PHP is MUCH easier to work with than ASP or VB.

                    Especially when it comes to building a string and sending an email.

                    Now, if you wanted to connect to SharePoint Web Services with NTLM authentication. .. then you might want to go with the Microsoft constructs that are built into the .NET framework....

                    Comment

                    • mayormel
                      New Member
                      • Oct 2007
                      • 16

                      #11
                      Thx Lumpy,Chris,Atl i and pbmods. I really appriciate all ur feedback and help. I successfully installed apachi server 2.2 and php 5. Everything works fine i guess. Now Im confused as to wat to do next. In Chris's reply i click on the links http://locol.... and it says "IT WORKS". im not clear what you said abot htdocs folder. can you please elaborate on this. thx.

                      Comment

                      • jx2
                        New Member
                        • Feb 2007
                        • 228

                        #12
                        Originally posted by mayormel
                        ... im not clear what you said abot htdocs folder. can you please elaborate on this. thx.
                        htdocs its a folder (usualy you can find it in Apache folder) where your *.html and*.php files are stored
                        if you copy there your myIndex.html you can acces that:
                        http://localhost/myIndex.html

                        jx2

                        Comment

                        • chrisfry
                          New Member
                          • Oct 2007
                          • 6

                          #13
                          Originally posted by jx2
                          htdocs its a folder (usualy you can find it in Apache folder) where your *.html and*.php files are stored
                          if you copy there your myIndex.html you can acces that:


                          jx2
                          Yep - what jx2 said. :-)

                          The "It Works" page is confirmation that your Apache installation was successful. It's the result of a page called index.html automatically generated by Apache. index.html is the page that will load by default when someone visits your site. If you write the following into a file called phptest.php and put it in the ..\Apache\htdoc s folder, you can test your PHP installation. Navigate to http://localhost/phptest.php

                          Code:
                          <?php
                              phpinfo();
                          ?>
                          It should look something like this (may differ depending on your version):

                          (for anyone coming to this forum late, I'm only gonna leave that up till about 6th Nov 07 or so, so apologies if you missed it)

                          Chris

                          Comment

                          • dafodil
                            Contributor
                            • Jul 2007
                            • 389

                            #14
                            Originally posted by pbmods
                            Heya, mayormel.

                            It really depends on what you're trying to do. Personally, I think that PHP is MUCH easier to work with than ASP or VB.

                            Especially when it comes to building a string and sending an email.

                            Now, if you wanted to connect to SharePoint Web Services with NTLM authentication. .. then you might want to go with the Microsoft constructs that are built into the .NET framework....
                            I strongly agree with pbmods. Its easier to code using php but when you want to access certain Microsoft products like MS Office, I recommend .Net


                            I have experienced a point where php is limited when converting certain records to excel compared to ASP. Of course in ASP you can fully access the Excel object and maximize its uses.

                            Comment

                            • mayormel
                              New Member
                              • Oct 2007
                              • 16

                              #15
                              thx again. i did all the neccesary editings. but now after created a test .php file with the following code, Today is <? print strftime("%m/%d/%Y"); ?> and saved it as index.php in notepad, the result shows the directries in my folder when using "http://localhost/". but if i use "http://localhost/index.php", i get error 404. im not clear as to what the exact problem is. am i using wrong editor to save the php file. Im using notepad, would that save the file as text? if so is there any editor for php. i cant wait to figure this out. this is my 6th day on trying to get this up and running. its like a adventure :-). thx for all ur guides.

                              Comment

                              Working...