FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » php development environment in windows problems
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
php development environment in windows problems [message #175939] Wed, 09 November 2011 18:19 Go to next message
Brian FitzGerald is currently offline  Brian FitzGerald
Messages: 2
Registered: November 2011
Karma: 0
Junior Member
Hey all,

I have been attempting to develop PHP on a windows laptop and then deploy to a production Linux server. The problem I'm running into is apparently PHP doesn't run well on windows dev environments... ?

For example:
- certain php functions are missing because apparently windows lacks strfmon capabilities

As a result, many things you would expect to run correctly, don't. For example, timthumb, various WordPress themes, well, just about any PHP code is really going to be unreliable.

Is there a way to make PHP run reliably as a Windows dev environment? I really can't just go uninstalling all my development software (PHP, Apache, mySQL) and then reinstalling a prebuilt package (xampp, wamp) because that's going to create a bunch of problems for me.

Is there a patch or something you can install on Windows to clear this up? What do you guys do? Does everyone do development on laptops running Linux, or what?

Thanks,
Brian

experienced web developer, rookie PHP developer
Re: php development environment in windows problems [message #175941 is a reply to message #175939] Wed, 09 November 2011 19:44 Go to previous messageGo to next message
www.1-script.com is currently offline  www.1-script.com
Messages: 2
Registered: November 2011
Karma: 0
Junior Member
responding to
http://www.1-script.com/forums/php/php-development-environment-in-windows-p roblems-140905-.htm
www.1-script.com wrote:
Brian FitzGerald wrote:

> I have been attempting to develop PHP on a windows laptop and then
> deploy to a production Linux server.

This is torture! Why would you NOT want to develop right in the native
environment? This is one of the reasons I switched to Linux and never
looked back. Which also answers your next question below:

> What do you guys do? Does everyone do development on laptops running
> Linux, or what?

Yup, pretty much. Ubuntu distro has become so incredibly easy to install
that I see no reason not to use it. All the development software you may
need and bunch more is available on Linux. All free... However, if you're
locked into Win for a different reason, such as corporate BS, tax or
accounting software that's hard to switch etc., you can dual-boot on your
laptop.

If that's also out of question (corporate security's got you down) you can
dust off an old PC (P3 or better, preferably) and install either Ubuntu or
Centos on it, configure it as LAMP server with GUI and just VNC into it
when needed.

Alternatively, laptops themselves are so cheap these days and Web
development is so NOT demanding in terms of CPU and other resources
(except maybe stats crunching) that you may just have a dedicated Linux
laptop (or even netbook with external keyboard and monitor) just for your
Web-related development, PHP or otherwise.

Good luck!
-------------------------------------
--
Cheers,
Dmitri
http://www.1-script.com/
Re: php development environment in windows problems [message #175950 is a reply to message #175941] Thu, 10 November 2011 06:01 Go to previous messageGo to next message
Brian FitzGerald is currently offline  Brian FitzGerald
Messages: 2
Registered: November 2011
Karma: 0
Junior Member
Hey Dmitri, thanks a lot for the thoughtful response.

> This is torture!
That's kind of good to hear, at least I know someone can feel my pain.

> All the development software you may need and bunch more is available on Linux
Well, Photoshop holds me back... other than that, I would like to make the switch but I have all my dev stuff setup on Windows for other languages that I use (well just CFML really, and they have a Linux version of their development server, so I could give that a go).

Anyway, I really appreciate you recapping the options for me.

Best,
Brian

I also found a couple interesting tidbits:
A solution for the missing function on Windows, not sure if there are others: http://www.michaelphipps.com/solution-fatal-error-call-undefined-function-m oneyformat-drupal-6-modules
Statistics on which OS devs are using: http://www.michaels.me.uk/post.cfm/what-os-are-web-developers-using
Re: php development environment in windows problems [message #175951 is a reply to message #175939] Thu, 10 November 2011 06:21 Go to previous messageGo to next message
Hans Olo is currently offline  Hans Olo
Messages: 7
Registered: October 2011
Karma: 0
Junior Member
On 11/9/2011 12:19 PM, Brian FitzGerald cried from the depths of the abyss:
> Hey all,
>
> I have been attempting to develop PHP on a windows laptop and then
> deploy to a production Linux server. The problem I'm running into is
> apparently PHP doesn't run well on windows dev environments... ?

There are some limitations, but I wouldn't go as far as saying PHP
doesn't run will on dows..

> Is there a patch or something you can install on Windows to clear
> this up? What do you guys do? Does everyone do development on
> laptops running Linux, or what?

Get Virtual Box, or VMWare Workstation installed on your laptop.
Install a virtual host exactly like you production Linux server. Use
your windows box (if you feel you must) to do you dev on the virt machine.
Re: php development environment in windows problems [message #175952 is a reply to message #175939] Thu, 10 November 2011 08:54 Go to previous messageGo to next message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma: 0
Senior Member
El 09/11/2011 19:19, Brian FitzGerald escribió/wrote:
> I have been attempting to develop PHP on a windows laptop and then
> deploy to a production Linux server. The problem I'm running into is
> apparently PHP doesn't run well on windows dev environments... ?

First news I have about that, and I've been developing on Windows for years.

>
> For example: - certain php functions are missing because apparently
> windows lacks strfmon capabilities

And certain PHP functions are missing in Unix because they are only
implemented for Windows but that doesn't imply that PHP does not run
well on Unix. You simply have to read the documentation for every new
function you use, and not only for that. Pretty often, your hosting
environment uses an old PHP version and many interesting features are
not available yet.

Whatever, I couldn't find strfmon in the PHP manual. It appears to be a
function from the C standard library. With no PHP code to inspect, it's
hard to suggest a solution about that.


> As a result, many things you would expect to run correctly, don't.
> For example, timthumb, various WordPress themes, well, just about any
> PHP code is really going to be unreliable.

Again, if you are having issues with a third-party library, you should
try to:

1. Read the library specs to know whether your system is supported. The
most typical issue you find with third-party code is that your PHP
version is either too old or too new.

2. Try to solve the precise issue, rather than assuming that there is
not way to fix it unless you buy a new computer.


> Is there a way to make PHP run reliably as a Windows dev environment?
> I really can't just go uninstalling all my development software (PHP,
> Apache, mySQL) and then reinstalling a prebuilt package (xampp, wamp)
> because that's going to create a bunch of problems for me.

What makes you think that using different binaries generated from the
same source code will fix problems with third-party PHP code?



--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
Re: php development environment in windows problems [message #175959 is a reply to message #175939] Thu, 10 November 2011 16:49 Go to previous messageGo to next message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
Brian FitzGerald, 2011-11-09 19:19:

> I have been attempting to develop PHP on a windows laptop and then deploy
> to a production Linux server. The problem I'm running into is
> apparently PHP doesn't run well on windows dev environments... ?

At least with DokuWiki (with proper image scaling using GDLib), Typo3,
Contao, phpMyAdmin and a number of other tools i never had problems with
Windows.

> For example:
> - certain php functions are missing because apparently windows lacks
> strfmon capabilities

Therefore it is a good idea to avoid functions, which rely on the
existance of certain C library functions, which may not exist on every
platform or may behave different.

> As a result, many things you would expect to run correctly, don't.

*Some* things may not work.

> For example, timthumb, various WordPress themes, well, just about
> any PHP code is really going to be unreliable.

The question is, *why* does timthumb not work? Maybe you just forgot to
enable certain extensions or to configure GDLib or ImageMagick properly
(ImageMagick exists for Windows as well). Some extensions may need
additional stuff, which has to be installed separately.

The same applies to the "various" WordPress themes - you should check,
what *exactly* does not work (check your Apache error logs and/or
configure PHP to log errors and warning).

> Is there a way to make PHP run reliably as a Windows dev environment?

Well - as i already said - i have no problems at all and i also just use
"vanilla" Apache, PHP and MySQL and no prebuilt packages.

Another way would be to use a Linux within a VM. VMware player is for free.



--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
Re: php development environment in windows problems [message #175962 is a reply to message #175950] Thu, 10 November 2011 23:54 Go to previous message
www.1-script.com is currently offline  www.1-script.com
Messages: 2
Registered: November 2011
Karma: 0
Junior Member
responding to
http://www.1-script.com/forums/php/php-development-environment-in-windows-p roblems-140905-.htm
www.1-script.com wrote:
Brian FitzGerald wrote:

> Well, Photoshop holds me back... other than that, I would like to make
> the =
> switch but I have all my dev stuff setup on Windows for other languages
> tha=
> t I use (well just CFML really, and they have a Linux version of their
> deve=
> lopment server, so I could give that a go).

Unless you're a Photoshop wiz and do more graphic design than Web
programming, there is nothing GIMP ( http://www.gimp.org/ ) cannot do that
Photoshop does. And if you are just in love with Photoshop, you would've
had a Mac anyhow :)

So, yeah, that platform mismatch was driving me crazy and after sitting on
a fence for a few years, I switched. I do still have a VirtuaBox VM with
Windows XP which I start just to check how the stuff I do looks on IE.
Sometimes I am not using it for months. There's just no other need.

Definitely give Linux a try. Good luck!


-------------------------------------
--
Cheers,
Dmitri
http://www.1-script.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: HELP!!! from PHP 5.16 to 5.3 Unable to load dynamic library
Next Topic: displaying random images with an appropriate caption
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 22:19:35 GMT 2024

Total time taken to generate the page: 0.11677 seconds