473,836 Members | 1,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Apache,MySql,PH P on Windows vs. Linux

OK...
Crazy (possibly dumb) question here...
I have a site running apache, mysql, php in a Win2K environment.
Primary development is that env also. I also am setting up a linux box
(old laptop), to begin playing with Linux. I'd like to set it up
similiary with apache,mysql, php.
If I do that, and start doing some development there (Linux box) - can
I expect that when I move the php code to the windows box that it will
behave similarly as it did on Linux?
Anything to watch out for? I'm completely new to Linux...

thanks for your help...

Feb 6 '06 #1
6 3273
Hi,

For that you have to install php,mysql,apach e in linux and if u r using
php.ini with linux than u need to change error_repoting optiong 2 more
strict and try 2 user every where $_POST and $_GET and $_SERVER and
keep practice to assign each variable like $a = '' than over write
where you want and also use to check is_set to check post or get vars
after submitting page.

Regards,
Jatin

Feb 6 '06 #2
Hi...

the linux version is much nicer to play with although i suggest you use
xwindows to do the development, if you like the command line stuff i
recommend you install vim or emacs as vi is spawn of the devil.

make sure that if you open any files in your scripts that the paths
have been changed to match their linux location unless your smart
enough to code with ../../../ etc... much easier. some php functions
behave differently with windows and linux but not mostly.

finally browsers are slightly different. if you are unfortunate enough
to use internet explorer then your pages especially the tables may draw
differently in mozilla, konqueror or firefox. i suggest firefox for
both windows and linux.

please be aware as you are new to linux you might find it very hard to
begin to use. stick at it as as they say 'everything else is just a
toy' ok i nicked that from toy soldiers but its true. make sure you
know someone with linux

good luck with it

Sean Barton

Feb 6 '06 #3
and dont forget to replace all your \\ with / in the paths,
just in case.

AND the linux shell is case sensitive, so /SOMETHING/ != /something/ ,
but it would work on windows
just a couple of thing to look out for

/f3l

Feb 6 '06 #4

"Sean Barton" <ba*********@gm ail.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
Hi...

the linux version is much nicer to play with although i suggest you use
xwindows to do the development, if you like the command line stuff i
recommend you install vim or emacs as vi is spawn of the devil.
vim's OK. had a few problems with vi once in a while. massive problems and
learning curve with emacs.
ahh - you emacs people... emacs makes my control and meta pinky hurt. :-)
but, in emacs you can do just about anything, I'll give it that - even send
emails & compile programs.
to each his own I guess. I found a favorite editor on my platform that's
neither vi nor emacs.

One thing to keep in mind is that if you transfer files between the two
boxes, you may want to do cr/lf conversions on the files if you are doing
any editing.
PHP won't care about the cr/lf difference AFAIK. but it's annoying in an
editor.
When you port a UNIX file to windows, because there is no cr, and you open
the file up in notepad, (dreamweaver fixes things great), notepad will run
all the lines together in one big mash with little lf symbols sprinkled
throughout. That can be manually corrected.
You can probably find a free unix2pc crlf conversion utility out there for
Windows. or, just write a PHP script to convert the linefeeds using
file_get_conten ts() and file_put_conten ts(), explode(), and implode(). UNIX
already has these text tools built-in... I just forgot what they were - I
think tr can be used, but it may be the hard way to do it. On the UNIX box,
make sure you install man pages (probably is by default, but make sure they
are *all* installed). then try using
man tr
and
man -k pc2unix
or
man -k pctounix | more
or
man -k crlf | more
and see if any commands pop up.
and remember that \r is a return, \n is a linefeed for the tr command (or
most commands on UNIX). on a pc, \r\n is the sequence. on UNIX, I think
it's simply \n.

make sure that if you open any files in your scripts that the paths
have been changed to match their linux location unless your smart
enough to code with ../../../ etc... much easier. some php functions
behave differently with windows and linux but not mostly.

finally browsers are slightly different. if you are unfortunate enough
to use internet explorer then your pages especially the tables may draw
differently in mozilla, konqueror or firefox. i suggest firefox for
both windows and linux.

please be aware as you are new to linux you might find it very hard to
begin to use. stick at it as as they say 'everything else is just a
toy' ok i nicked that from toy soldiers but its true. make sure you
know someone with linux

good luck with it

Sean Barton

Feb 7 '06 #5
On 2006-02-07, Jim Michaels <jm******@nospa m.yahoo.com> wrote:
think tr can be used, but it may be the hard way to do it. On the UNIX box,
make sure you install man pages (probably is by default, but make sure they
are *all* installed). then try using
man tr
and
man -k pc2unix
or
man -k pctounix | more
or
man -k crlf | more
and see if any commands pop up.
and remember that \r is a return, \n is a linefeed for the tr command (or
most commands on UNIX). on a pc, \r\n is the sequence. on UNIX, I think
it's simply \n.


on unix to convert from dos format

tr -d '\r' < dosfile > unixfile

to convert to dos format

sed 's/$/\r/' < unixfile >dosfile

converting unix files on dos/windows is harder, but there are a number of free tools
on simtel.net (or you can use sed and tr if you have them installed...)

Bye.
Jasen
Feb 8 '06 #6

"Jasen Betts" <ja***@free.net .nz> wrote in message
news:31******** *******@clunker .homenet...
On 2006-02-07, Jim Michaels <jm******@nospa m.yahoo.com> wrote:
think tr can be used, but it may be the hard way to do it. On the UNIX
box,
make sure you install man pages (probably is by default, but make sure
they
are *all* installed). then try using
man tr
and
man -k pc2unix
or
man -k pctounix | more
or
man -k crlf | more
and see if any commands pop up.
and remember that \r is a return, \n is a linefeed for the tr command (or
most commands on UNIX). on a pc, \r\n is the sequence. on UNIX, I think
it's simply \n.
on unix to convert from dos format

tr -d '\r' < dosfile > unixfile

to convert to dos format

sed 's/$/\r/' < unixfile >dosfile

converting unix files on dos/windows is harder, but there are a number of
free tools
on simtel.net (or you can use sed and tr if you have them installed...)


there is also a project called GNUISH MSDOS. it only works with 8.3
filenames though, so you'll probably lose your long filename.
Bye.
Jasen

Feb 14 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3034
by: commanderblop | last post by:
Hi there, I am in the process of translating an WIndows/ASP/MsSQL Content Managment System (CMS) to Linux/PHP/???. Is there a popular database I can use that will allow standalone files like Access did (which used .MDB files)? In order for the CMS to work, there needs to be a standalone database file that is self-contained, just like Access .mdb files are under Windows. I guess I am asking for an Access equivalent for
8
1507
by: Brett | last post by:
I'm developing with CF 5 and SQL Server 2000. I think they are both great products. The major draw is their cost. I don't develop stand alone products because anyone that wants to purchase them must also purchase CF Server and SQL Server. So I run them as a hosted service. MySQL is supposed to be free. If you are using this product, how do you like it? What are you using for a front end? I'd like to move toward developing software that...
0
1584
by: bruce | last post by:
Hi... A mysql/Apache issue: I get the following when I'm trying to run a test web site on an Apache 2.0/RH8.0 setup. -------------------------------- Warning: Access denied for user: 'apache@localhost' (Using password: YES) in /var/www/html/dbid/mysql/database.php on line 17
0
2035
by: bruce | last post by:
Hi... Update.... We have the following setup in our httpd.conf file. We've tried to give what's related to the issue. We're trying to set up a virtual host for a test project. The behavior that we're seeing is that we can type: http://foo.com but the url that gets displayed is
0
1554
by: Peter Chant | last post by:
I hope no one minds me running this past them. I'm running a linux machine with with apache, php and mysql. This is not accessable from the internet. I want a server that is visable to the internet. For that purpose I am running a user mode linux machine and using apache on that as the external looking web server. This means that stuff I want to see on the outside is on a copy of apache that is doing little and does not get messed...
5
2309
by: writeson | last post by:
Hi all, I'm wondering if anyone has tried a scenario that I'm thinking of. At my job we've got a web based product provided by Apache running PHP that accesses MySQL. This web application is hosted by multiple servers behind a load balancer because of the user load on the system. However, we've still had times when the servers got over run and Apache maxes out on the number of httpd processes (257) and falls behind to the point of...
6
3365
by: GD | last post by:
Hi All, I've got MySQL 5.0.21 running on Windows Server 2003, and php running on Apache on a Linux box (Fedora Core 4). Previously when the pages were running on an IIS server the connection was succesful, now I get: Can't connect to MySQL server on 'SERVER' (13)
0
1756
by: sebor | last post by:
October 29, 2007 -- The Apache C++ Standard Library project is pleased to announce that the official stdcxx 4.2.0 release is now available for download from the following location: http://people.apache.org/dist/incubator/stdcxx/releases/ For additional details see the stdcxx Download page: http://incubator.apache.org/stdcxx/download.html#releases The Apache C++ Standard Library is a full implementation of the C++ Standard Library...
2
2756
by: paulysa | last post by:
Hi there. I am experimenting with Apache/MySQL/PHP to set up a contact list. Background Am a bit of a dabbler. Downloaded MySQL 5.0.67 for windows and Apache 2.2.9 with OpenSSL-0.9.8h-r2 and PHP 5.2.6 to experiment on my PC with WinXP with SP2 before perhaps trying a Linux server system. Full install of MySQL and Apache both work separately. But a full install of PHP failed. Now I wish to uninstall PHP and try a default PHP install but...
0
9825
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10859
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10560
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10602
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10260
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4463
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.