Jump to content

Archived

This topic is now archived and is closed to further replies.

massive

WINDOWS & LINUX

Recommended Posts

hello guyz, im puzzled is there any difference with regards to programming PHP&MySQL under WINDOWS environment from LINUX environment?


tnx :)

Share this post


Link to post
Share on other sites
There are some differences, like the newline character being "\n" in the UNIX environment and "\r\n" in Windows. Some functions may also be slightly different -- those are mentioned in the Manual.

I do most of my development on a laptop runing WinXP Professional using xampp with PHP 5. The I take the code and run it in either a Linux enviornment or on an OpenVMS machine. All run the Apache webserver, PHP, and MySQL. I've have very little trouble moving scripts from one machine to another.

Why do you ask?

Ken

Share this post


Link to post
Share on other sites
[!--quoteo(post=364697:date=Apr 14 2006, 12:05 AM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Apr 14 2006, 12:05 AM) [snapback]364697[/snapback][/div][div class=\'quotemain\'][!--quotec--]
There are some differences, like the newline character being "\n" in the UNIX environment and "\r\n" in Windows. Some functions may also be slightly different -- those are mentioned in the Manual.

I do most of my development on a laptop runing WinXP Professional using xampp with PHP 5. The I take the code and run it in either a Linux enviornment or on an OpenVMS machine. All run the Apache webserver, PHP, and MySQL. I've have very little trouble moving scripts from one machine to another.

Why do you ask?

Ken
[/quote]

i see...i thought phpScripting was universal in a sense that it can be done in all kinds of O.S right? but with the exact same coding style...but according to your post you said theres a slite difference....honestly i have a exam this coming monday,,,they say that i'll be programming php&mysql under LINUX environment not WINDOWS environment (X_x) im starting to freak out here...i need to look for references...is the said manual can been seen under the links of DOCUMENTATION? I'm kind of new here according to my number of posts sorry :( have'nt explored the whole site yet.

I see your also using xampp with PHP 5 with a nice GUI-interface for MySQL :)





Thank you



Share this post


Link to post
Share on other sites
Ken, I do the same as you on my laptop using xampp...

If you haven't used linux, don't forget, Capitals matter if you name a file whereas they don't matter in windows...

It seems the majority of the differences are when you are working with files and permissions, but I thing graphics may be different, as well...

Share this post


Link to post
Share on other sites
I use Gentoo Linux as my main operating system (only operating system), and after years of writing PHP scripts on a Windows machine, there are really very few differences, most of which are trivial:

The new line characters, as kenrbnsn said, are different, however there is really very little practical application for them in Windows or Linux. In Windows, only \n\r officially qualifies as a new line character. However, in my experience, Internet Explorer and Firefox (and maybe others) treat all three forms of new line identically, so there is really no difference.

Additionally, the directory delimiters are different - in Windows, directories are separated by a backslash \
[code]C:\Windows\System 32\[/code]
whereas in Unix-like operating systems, directories are separated by a forward slash [b]/[/b].
[code]/usr/bin/[/code]

And, as AV1611 said, Unix-like systems are case-sensitive. If you save a file as File.php, and try to include() it as file.php, it won't find it - in Windows, that's fine, but not so in *nix systems.

There are a few PHP-specific differences, as well - for example, the printing library in PHP does not work in non-Windows operating systems. However, as little as I played with the printing library, the impression I got was that it's not very useful.

Also, in non-Windows OS's, you don't have access to PHP's COM library - with good reason. COM is exclusive to Windows. Like the printing library, the COM and .NET libraries in PHP don't seem very useful at the moment.


I honestly don't think you'll have a hard time adapting to a Linux environment, especially if you're just using it for an exam. Sure, there are some tips and tricks that may help you in your development, and you're not going to be using your favorite text editor, unless it happens to be an editor also supported in Linux, but they're not necessary for development.

Share this post


Link to post
Share on other sites
[!--quoteo(post=364697:date=Apr 14 2006, 12:05 AM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Apr 14 2006, 12:05 AM) [snapback]364697[/snapback][/div][div class=\'quotemain\'][!--quotec--]
There are some differences, like the newline character being "\n" in the UNIX environment and "\r\n" in Windows. Some functions may also be slightly different -- those are mentioned in the Manual.

I do most of my development on a laptop runing WinXP Professional using xampp with PHP 5. The I take the code and run it in either a Linux enviornment or on an OpenVMS machine. All run the Apache webserver, PHP, and MySQL. I've have very little trouble moving scripts from one machine to another.

Why do you ask?

Ken
[/quote]


[!--quoteo(post=364943:date=Apr 14 2006, 06:43 PM:name=AV1611)--][div class=\'quotetop\']QUOTE(AV1611 @ Apr 14 2006, 06:43 PM) [snapback]364943[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Ken, I do the same as you on my laptop using xampp...

If you haven't used linux, don't forget, Capitals matter if you name a file whereas they don't matter in windows...

It seems the majority of the differences are when you are working with files and permissions, but I thing graphics may be different, as well...
[/quote]


[!--quoteo(post=364951:date=Apr 14 2006, 07:29 PM:name=neylitalo)--][div class=\'quotetop\']QUOTE(neylitalo @ Apr 14 2006, 07:29 PM) [snapback]364951[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I use Gentoo Linux as my main operating system (only operating system), and after years of writing PHP scripts on a Windows machine, there are really very few differences, most of which are trivial:

The new line characters, as kenrbnsn said, are different, however there is really very little practical application for them in Windows or Linux. In Windows, only \n\r officially qualifies as a new line character. However, in my experience, Internet Explorer and Firefox (and maybe others) treat all three forms of new line identically, so there is really no difference.

Additionally, the directory delimiters are different - in Windows, directories are separated by a backslash \
[code]C:\Windows\System 32\[/code]
whereas in Unix-like operating systems, directories are separated by a forward slash [b]/[/b].
[code]/usr/bin/[/code]

And, as AV1611 said, Unix-like systems are case-sensitive. If you save a file as File.php, and try to include() it as file.php, it won't find it - in Windows, that's fine, but not so in *nix systems.

There are a few PHP-specific differences, as well - for example, the printing library in PHP does not work in non-Windows operating systems. However, as little as I played with the printing library, the impression I got was that it's not very useful.

Also, in non-Windows OS's, you don't have access to PHP's COM library - with good reason. COM is exclusive to Windows. Like the printing library, the COM and .NET libraries in PHP don't seem very useful at the moment.


I honestly don't think you'll have a hard time adapting to a Linux environment, especially if you're just using it for an exam. Sure, there are some tips and tricks that may help you in your development, and you're not going to be using your favorite text editor, unless it happens to be an editor also supported in Linux, but they're not necessary for development.
[/quote]


Thank you guys for your time...i really appreciate your help in giving me what linux is all about with regards to php&mysql programming ^_^...well now at least you three really uplifted my spirit and gain me more confidence in taking the exam


Thank you

Share this post


Link to post
Share on other sites
I need some help with my page, I keep getting Fatal error: Call to undefined function render_header() in [nobbc]/home/ownfd/public_html/subheader.php on line 31  on my site http://www.favoritedesigns.org , after downloading a php theme from http://www.jaded-designs.com[/nobbc]  I just want to login to my php account, and change the theme without loosing ANY data, I have on the other theme, know how to do that? It took me 4 days, two hours to code all I have on that theme I want to change it too. Please help me!! I need it badly lol!!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.