windows/linux

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
sguy
Forum Commoner
Posts: 61
Joined: Sun Aug 10, 2003 2:44 am

windows/linux

Post by sguy »

normally we use PHP in windows platform, if i use it in linux/unix platform, is the code need to change?
is PHP in windows same with PHP in linux/unix server.
User avatar
gite_ashish
Forum Contributor
Posts: 118
Joined: Sat Aug 31, 2002 11:38 am
Location: India

Post by gite_ashish »

PHP is platform-independent.
The same code works for Windows & UNIX.

Above is *almost* true but; not exactly true. It depends on code - if we are not using anything specific to Windows/UNIX - the code will always work.
User avatar
sguy
Forum Commoner
Posts: 61
Joined: Sun Aug 10, 2003 2:44 am

Post by sguy »

can you give some example? :wink:
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

chmod();

you can't do that on a windows server =)

-Nay
User avatar
Orkan
Forum Commoner
Posts: 32
Joined: Sun Aug 24, 2003 9:07 am
Location: Ukraine
Contact:

Post by Orkan »

class COM - you can't do that on UNIX server =)
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

are you sure about com? i know ifyou run samba right you can do just about anything windows does on posix, only posix does it in a stable way.

not to menion all those emulators. i'm sure posix can be customized to do that even though i haven't looked into it.



email systems are diff. in posix (what unix, linix, bsd, osx, etc are either compatible or compliant with.. it's the os standards made by an independant coalition when people ripped off the original bell labs unics calling it multics. yes i spelt those right. the cs was changesd in 2.0 to x, due to the people making the standard.. Portable Operating System and taking ix (since it sounds like ics) and tagging that to the acronym so that the bell labs stuff would be able to interface with the competitor)

well ewhere was i... oh yes. windows e--mail end lines with : \r\n
posix: \n

little things like that and c:\blah\blah\
v: /blah/blah/

oh yes, windows stores the directory info in a case insentive file system. posix does NOT
meanong on window ThisIsOneFolder and thisisonefolder are the same. on posix those are two different folders

oh yes, here's one advantage that will always be true: windows has inherint memory leaks. this means the server MUST be turned off at times to reboot.
posix does not. therefore posix only has to reboot in the even'tof a major kernel change, aside form that, if you have an issue with something eating memory, kill and restart the process and monitor to find out where the proccess' error is. windows can't do that. the memory leak will cross with the windows inherint and you lose the resources and have to reboot the entire machine
Post Reply