Jump to content

Can I use PHP/PEAR without a web server?


Recommended Posts

Hi there,

 

I'm after a bit of clarification. On the project I'm working on I installed/configured php and pear and apache web server all on my laptop and have been developing my project ok..so far so good.

 

The project involves a scheduled task on the clients pc's which runs a batch file that runs a php script which interrogates an sql server db and sends the data to a web server where it is processed. This works ok on my laptop.

 

Now it's dawned on me that when this is used in the real world the client pc won't have a web server running on it (as I have on my laptop). So (and this is where my limited experience with PHP comes in) can I just install PHP/PEAR onto a clients pc  (by install I mean just copy the relevant folders/files onto their pc) and set the scheduled task to run the batch file...will this work? or does both PHP and PHP require some interaction with a web server.

 

Also, re. PEAR. When I installed PHP I then ran the go-pear file which did the installing of PEAR. Should I do this for my real world installation or can I just copy my my PHP/PEAR folders/files from my laptop (with a bit of config/ini file tweaking) ...does the PEAR install put anything into the windows registry?

 

thanks,

 

 

Link to comment
Share on other sites

You can use PHP & Pear without a web server, see cli. As for the installation. Pear is just a library so it can be simply unpacked where you want it, it just needs to be on php's include path.

 

Installing PHP isn't that much more difficult, though you will also want to edit the environments $PATH variable. It sounds like your looking to do this on windows so you will need to investigate how that can be done programmatically.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.