473,513 Members | 2,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stand alone PHP parser

Howdy all,

I'm wondering if someone could give some direction on a problem I have
or share their experiences.

I'm wanting to create a little PHP application that will run on a
local machine and use ODBC to connect to a Access database on that
machine. A series of forms will interact with the database but if I
understand correctly, I need some way to parse the PHP code. Is there
a stand alone parser that could be used in place of a HTTP server?

Thanks for any help
Jul 17 '05 #1
9 2905
none wrote:
Howdy all,

I'm wondering if someone could give some direction on a problem I have
or share their experiences.

I'm wanting to create a little PHP application that will run on a
local machine and use ODBC to connect to a Access database on that
machine. A series of forms will interact with the database but if I
understand correctly, I need some way to parse the PHP code. Is there
a stand alone parser that could be used in place of a HTTP server?

Thanks for any help


Yes.

It might be helpful to know what platform you intend running this on (Linux
(what distro), Microsoft...) and how you've got PHP configured (mod_php in
Apache, cgi, ...?)

C.
Jul 17 '05 #2
none wrote:
Howdy all,

I'm wondering if someone could give some direction on a problem I have
or share their experiences.

I'm wanting to create a little PHP application that will run on a
local machine and use ODBC to connect to a Access database on that
machine. A series of forms will interact with the database but if I
understand correctly, I need some way to parse the PHP code. Is there
a stand alone parser that could be used in place of a HTTP server?

Thanks for any help


You can run a script locally by using php -q script.php
If you're on linux you could also include a shebang at the beginning of the
script like you'd do for a shell scrips (#!/bin/bash et cetera)
with the path to your php binary.
HTML formatting however is meaningless on a prompt, so you may have to adapt
existing code if that was developed for web output.

Pjotr
Jul 17 '05 #3
none wrote:
Howdy all,

I'm wondering if someone could give some direction on a problem I have
or share their experiences.

I'm wanting to create a little PHP application that will run on a
local machine and use ODBC to connect to a Access database on that
machine. A series of forms will interact with the database but if I
understand correctly, I need some way to parse the PHP code. Is there
a stand alone parser that could be used in place of a HTTP server?

Thanks for any help


which web server Apache or IIS. (I am assuming Wxx as you are using Access)
Using google, you can find MANY examples of using ODBC (db is somewhat irrelevant).
here is an example right out of the docs:

$con = odbc_connect('MSAccessDriver','','');

if ($con)
{
echo "odbc connected<br>";
$sql = "select * from Results";

//this function will execute the sql satametn in
//correspondance to the table in the db
$exc = odbc_exec($con,$sql);
}
else
echo "odbc not connected<br>";

if($exc)
{
echo "selection completed<br>";
while($row = odbc_fetch_row($exc) )
echo $row->id."<br>";
}
else
echo "selection failed<br>";

?>
and another example

$Fields = odbc_num_fields($cur);
print "<table border='1' width='100%'><tr>";
// Build Column Headers
for ($i=1; $i <= $Fields; $i++){
printf("<th bgcolor='silver'>%s</th>", odbc_field_name( $cur,$i));
}
// Table Body
$Outer=0;
while( odbc_fetch_row( $cur )){
$Outer++;
print "<tr>";
for($i=1; $i <= $Fields; $i++){
printf("<td>%s</td>", odbc_result( $cur, $i ));
}
print "</tr>";
}
print "</table>";
print "<b> Your request returned $Outer rows!</b>";

--
Michael Austin.
Consultant - Available.
Donations welcomed. Http://www.firstdbasource.com/donations.html
:)
Jul 17 '05 #4
On 23 Jul 2004 03:37:07 -0700, ki*****@aol.com (none) wrote:
Howdy all,

I'm wondering if someone could give some direction on a problem I have
or share their experiences.

I'm wanting to create a little PHP application that will run on a
local machine and use ODBC to connect to a Access database on that
machine. A series of forms will interact with the database but if I
understand correctly, I need some way to parse the PHP code. Is there
a stand alone parser that could be used in place of a HTTP server?

Thanks for any help


take a look at PHP-GTK (http://gtk.php.net/) for stand-alone PHP apps
needing a GUI.


Jul 17 '05 #5
"Michael Austin" <ma*****@firstdbasource.com> wrote in message
news:rg******************@newssvr24.news.prodigy.c om...
none wrote:
Howdy all,

I'm wondering if someone could give some direction on a problem I have
or share their experiences.

I'm wanting to create a little PHP application that will run on a
local machine and use ODBC to connect to a Access database on that
machine. A series of forms will interact with the database but if I
understand correctly, I need some way to parse the PHP code. Is there
a stand alone parser that could be used in place of a HTTP server?

Thanks for any help
which web server Apache or IIS. (I am assuming Wxx as you are using

Access) Using google, you can find MANY examples of using ODBC (db is somewhat

irrelevant).

The question was about a standalone PHP parser, not about how to use ODBC in
PHP.

<snip of Access examples>

- Virgil
Jul 17 '05 #6
Sorry guys (and gals) I didnt make myself completely clear.

I want to run HTML pages in a browser with forms and PHP functionality
to a db using ODBC without a server needing to be installed or
anything. I was wondering if anyone had come a accross a single
executable possibly that would parse PHP and display the PHP file in a
browser? I want to go in, set up the ODBC connection, copy some
executable, display PHP files in a browser. I may be asking a bit much
and if it isn't possible I need to look at alternatives.

Cheers
Jul 17 '05 #7
"none" <ki*****@aol.com> wrote in message
news:86**************************@posting.google.c om...
Howdy all,

I'm wondering if someone could give some direction on a problem I have
or share their experiences.

I'm wanting to create a little PHP application that will run on a
local machine and use ODBC to connect to a Access database on that
machine. A series of forms will interact with the database but if I
understand correctly, I need some way to parse the PHP code. Is there
a stand alone parser that could be used in place of a HTTP server?

Thanks for any help


Check out this little program I wrote. I call it "PHP FreeStyle." It allows
you to run PHP scripts, using the web browser interface, without setting up
a web server and so on. You will find it at my personal page (see
signature).

--
Obey the Clown - http://www.conradish.net/bobo/
Jul 17 '05 #8
On 23 Jul 2004 13:21:22 -0700, ki*****@aol.com (none) wrote:
Sorry guys (and gals) I didnt make myself completely clear.

I want to run HTML pages in a browser with forms and PHP functionality
to a db using ODBC without a server needing to be installed or
anything. I was wondering if anyone had come a accross a single
executable possibly that would parse PHP and display the PHP file in a
browser? I want to go in, set up the ODBC connection, copy some
executable, display PHP files in a browser. I may be asking a bit much
and if it isn't possible I need to look at alternatives.


ok.. you want to run your app in a browser... that would be a 'web'
browser, would it?

web browsers (InternetExploder, NutScrape, FireFob, etc) are,
generally, designed to talk to systems which speak HTML.

in order for your browser to receive this HTML, something must send it
to it .. this something is generally called a 'web server' (or HTTP
server).

if you want to run PHP applications via a browser without the use of
an HTTP server then:

a) you're a fool

b) you've got a lot of work ahead of you, building your own equivalent
of an HTTP server.

why can't you just install a local copy of Apache - i've built several
systems with just such a setup for customers - Apache/PHP with MySQL
and/or M$-Access; where i install Apache on theit laptop/PC and off
they go.. sometimes the machine in question will _never_ be connected
to The Internet - it doesn't matter.

now then, what was your problem again?
Jul 17 '05 #9
> take a look at PHP-GTK (http://gtk.php.net/) for stand-alone PHP apps
needing a GUI.


Cheers, thanks
Jul 17 '05 #10

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

Similar topics

121
9657
by: David Pendrey | last post by:
I was wondering if it is at all posible to write a stand alone .EXE program in Visual Studio .NET. Hopefully in VB.NET but if not another language would be ok. Thanks for the assistance
3
2434
by: Todd D. Levy | last post by:
What do I need to get (from Microsoft I assume) in order to distribute stand alone Access applications to people who do not (and will not) have Access installed on their systems? I have heard...
7
4695
by: Ulrich Wisser | last post by:
Hi, I would like to stop the postmaster every night and run vacuum pg_dump reindex in the stand alone backend.
2
2311
by: jim-on-linux | last post by:
py help, The file below will run as a stand alone file. It works fine as it is. But, when I call it from another module it locks my computer, The off switch is the only salvation. This...
10
5711
by: discobay | last post by:
Is there a way to create a stand alone .exe from VB2005, that does not depend upon the .NET framework being installed on the target machine? I have followed previous threads on this subject and...
11
3859
by: pg | last post by:
My old HD crashes, so I had to do a total re-install. After installer XP, I went to the Micrsoft Update site to get all the update. After 5 hours or so ... the update cycle started looping. ...
0
7259
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,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7535
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...
1
5085
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...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
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...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1592
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 ...
1
798
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.