Getting contradictory messages.

This is a discussion on Getting contradictory messages. within the PHP Language forums, part of the PHP Programming Forums category; I know little to nothing about PHP and need to clarify something before committing to learning it. From what I ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-09-2004
Allan Topp
 
Posts: n/a
Default Getting contradictory messages.

I know little to nothing about PHP and need to clarify something before
committing to learning it.

From what I have heard PHP would be ideal to interrogate a database and
populate HTML tables with found data (text AND URL's).

However, what I want to do is to have the files on a CD rather than a web
site.

One colleague assures me that having PHP run on my machine is not a problem.
Another says absolutely not, PHP is server based.

So, my question is can PHP be run locally to access data and web pages on a
CD? And a follow up is, can PHP (also?) be installed ON the CD and be able
to run on any PC that had a compatible browser?

Appreciate your feedback.

Allan


Reply With Quote
  #2 (permalink)  
Old 06-09-2004
Garp
 
Posts: n/a
Default Re: Getting contradictory messages.


"Allan Topp" <ad707@freenet.carleton.ca> wrote in message
news:ca7g5h$jei$1@freenet9.carleton.ca...
> I know little to nothing about PHP and need to clarify something before
> committing to learning it.
>
> From what I have heard PHP would be ideal to interrogate a database and
> populate HTML tables with found data (text AND URL's).
>
> However, what I want to do is to have the files on a CD rather than a web
> site.
>
> One colleague assures me that having PHP run on my machine is not a

problem.
> Another says absolutely not, PHP is server based.
>
> So, my question is can PHP be run locally to access data and web pages on

a
> CD? And a follow up is, can PHP (also?) be installed ON the CD and be

able
> to run on any PC that had a compatible browser?
>
> Appreciate your feedback.
>
> Allan


You certainly can do both - the best way to prove it is to install it and go
through the tutorials.

I use PHP to do filtered backups (copies of databases from machines without
backup facilities to ones that have them), executed on schedules overnight.
These run as "php.exe -f script.php" (the -f prevents the default headers
being produced), not a web server in sight. I also do database accesses in
standalone report generators (producing noddy HTML files for servers that
don't have PHP on).

It's actually slightly more work to get PHP to work as a web server's script
engine, so it's by no means the default installation.

As far as accessing the CD, the file() function (and all other IO functions)
will happily access files there. Give it a try, you'll never look back. It's
a powerful general-purpose tool, don't be allowed to pigeon-hole it as
server-side scripting only. Maybe we should get the name changed. 8)

Garp


Reply With Quote
  #3 (permalink)  
Old 06-09-2004
Justin Koivisto
 
Posts: n/a
Default Re: Getting contradictory messages.

Allan Topp wrote:

> I know little to nothing about PHP and need to clarify something before
> committing to learning it.
>
> From what I have heard PHP would be ideal to interrogate a database and
> populate HTML tables with found data (text AND URL's).
>
> However, what I want to do is to have the files on a CD rather than a web
> site.
>
> One colleague assures me that having PHP run on my machine is not a problem.
> Another says absolutely not, PHP is server based.
>
> So, my question is can PHP be run locally to access data and web pages on a
> CD? And a follow up is, can PHP (also?) be installed ON the CD and be able
> to run on any PC that had a compatible browser?


OK, I have yet to delve into the stand alone application possibilities
of PHP. However, you may want to look into the roadsend compiler
(http://www.roadsend.com/) and PHP-GTK (http://gtk.php.net/). I would
assume that there will be some idiosyncrasies for each compared to what
you'd experience for web scripting.

Depending on where the database is, what type it is, etc., you may also
encounter other issues with connecting to the database on the client
machine (for instance, their computer doesn't have the correct ODBC
drivers, is behind a strict firewall, etc.).

If you're a quick study with programming languages like C/C++, Java,
Real Basic or Visual Basic, maybe something like that would better suit
your needs.

On the other hand, if you simply want the resulting HTML pages on CD
(IOW the data would NOT be updated realtime through the app), then you
can simply have PHP write out the HTML pages for you to burn to disk.

--
Justin Koivisto - spam@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:44 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0