472,780 Members | 1,221 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,780 software developers and data experts.

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 2857
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
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
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
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
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
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
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
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{

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.