473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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?.
Oct 25 '07 #1
15 2188
Lumpy
69
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.
Oct 25 '07 #2
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.
Oct 25 '07 #3
Atli
5,058 Expert 4TB
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.
Oct 26 '07 #4
Lumpy
69
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.
Oct 26 '07 #5
Lumpy
69
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
Oct 26 '07 #6
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
Oct 27 '07 #7
Atli
5,058 Expert 4TB
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?
Oct 27 '07 #8
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):
http://www.apachefriends.org/en/xampp-windows.html

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
Oct 28 '07 #9
pbmods
5,821 Expert 4TB
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....
Oct 28 '07 #10
Thx Lumpy,Chris,Atli 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.
Oct 29 '07 #11
jx2
228 100+
... 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
Oct 29 '07 #12
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
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\htdocs folder, you can test your PHP installation. Navigate to http://localhost/phptest.php

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.     phpinfo();
  3. ?>
  4.  
It should look something like this (may differ depending on your version):
http://chris-fry.com/phptest.php
(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
Oct 30 '07 #13
dafodil
392 256MB
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.
Oct 30 '07 #14
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.
Oct 30 '07 #15
yeeeeh!! Finalllyy i got it running. disregard my previous post. Thx a million all. i installed Eclips eiditor and there u go its working. now im into the devolopment part. hope everthing goes as planned. thx again. u guys are sooo helpfull and full of info.
cheers
Oct 30 '07 #16

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: thecrow | last post by:
Alright, what the hell is going on here? In the following code, I expect the printed result to be: DEBUG: frank's last name is burns. Instead, what I get is: DEBUG: frank's last name is...
220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
92
by: Reed L. O'Brien | last post by:
I see rotor was removed for 2.4 and the docs say use an AES module provided separately... Is there a standard module that works alike or an AES module that works alike but with better encryption?...
137
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
12
by: Dario | last post by:
The following simple program behaves differently in Windows and Linux . #include <stdexcept> #include <iostream> #include <string> using namespace std; class LogicError : public logic_error {...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
47
by: Neal | last post by:
Patrick Griffiths weighs in on the CSS vs table layout debate in his blog entry "Tables my ass" - http://www.htmldog.com/ptg/archives/000049.php . A quite good article.
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
8
by: Midnight Java Junkie | last post by:
Dear Colleagues: I feel that the dumbest questions are those that are never asked. I have been given the opportunity to get into .NET. Our organization has a subscription with Microsoft that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.