CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Questions, questions, questions....

Print topic Send  topic

Author Message
Patrick L.
Posted: 04/05/2001, 8:28 PM

Hi all,

I'm a nonprogrammer. I am just starting out learning a little bit about php, and I have mysql and
myodbc installed. I want to use codecharge do develop php/mysql driven websites.

In another post, someone else asked a similar question ( "Can anyone tell me how can I connect MySQL to CodeCharge through ODBC or
whatever the way is") and the next message instructs:

"1. Download and install MySQL odbc driver. (at http://www.mysql.com :-))
2. Setup ODBC data source. (in control panel -> data sources)
3. Use it in codecharge ..."


Okay. I am following this. I download mysql, which comes with the driver.

So I go to the odbc data sources in the control panel, and hit the add button, I select
the MySQL driver and then another screen comes up, asking for tons of input from me, lots of checkboxes (see
http://www.choozart.com/screenshot.gif ) for which I cannot find the descriptions of in the mysql documention, which is heavy on
documentation for linux and unix, but doesn't seem to give me much for windows 98. So I'm a little confused on what to do there.

I have MyODBC. Now I'm confused about that and why I need it. Does it have anything to do
with the ODBC data sources thing in the control panel?

Man, I'm lost. Anyone wanna come to my rescue? I just want to know how to get there from here,
how to use codecharge.

Would the best thing to do is to study and master MySQL and ODBC before even attempting
to use this app?

Another question, once I do get a handle on developing php/myql driven sites developed on my
win98 with CC, how am I going to port that to a unix or linux remote server? I will have to go in and
change file paths, sql connect commands, correct? If I am a nonprogrammer to begin with,
how am I going to accomplish this? (I just know html, that is all).

(I know, become a programmer, that would solve my problem, eh?
But I live way out in the boonies, and the web, plus books, and you kind folks are my only hope).

On the wish list, I would like to see codecharge set up a course on how to use this app
at an online school such as www.smartplanet.com . I would sign up for it in a minute.


Best,
Patrick Lockwood.
www.choozart.com






John King
Posted: 04/05/2001, 10:43 PM

Hi Patrick,

I'm responding to your request in a teacher/student fashion because the
answers to the questions you ask are not only important to you. If you
already know 80% of what I'm about to say, hopefully someone looking
over your shoulder won't. Thus, this is an open exercise for anyone who
wants to participate.

When I have my web site running in a few weeks time, you will find a
better written, and more concise version of this article, which I have
thrown together just for you and the members of this group.

Because of the things you asked, it sounds like you could be taking the
long road home? First off, you need Apache, PHP and Mysql on your
server, then you need CodeCharge to make it all happen. If you don't
yet have Apache/PPH/Mysql on you pc, there are two ways you can do it,
one takes weeks with no guarantee of success, the other takes a few
minutes.

If you have one or more of the components loaded already, or if you
have them all loaded, but with some degree of uncertainty, I suggest you
delete the lot right now. It's absolutely essential to have the three
aforementioned programs running in harmony otherwise you will never get
anywhere.

Let's assume you're stating from scratch.

You need to download all three programs, but these are available as a
single unit called PHPTriad. Go to http://www.hotscripts.com and enter
phptriad in their search box. Follow the links to the download website,
make a coffee and download all 8 meg. This will give you Apache, mysql,
and php all with full documentation, plus another essential program
called phpmyadmin.

When you return, disconnect yourself from the internet (important), find
the download and press the "Setup" button. Within 60 seconds, and with
no input from you, PHPTriad will both install and link all four programs
so that they will work seamlessly! PHPTriad is surely a gift from
heaven.

Now let's consider where we're at. Having rebooted your computer, find
PHPTriad on your start menu. In this order, close down Microsoft's
personal web server if it's running, Click "Start Apache" and then
"Start Mysql". Both of these programs run under DOS, so you may be a
little confused with the results. When you start Apache, a DOS window
will appear telling you that Apache is loaded. Just close the window
(not the program) and you'll be back to Windows. You will also see an
Apache Icon on the task bar. A similar DOS box also appears when you
start Mysql, but it goes away automatically. Also, a Mysql icon does
'not' appear on the task bar, but it is running. Just keep in mind that
the next time you start apache, you will get what looks like an error
message. Just ignore it because it's a question, not a statement. You'll
see what I mean later down the track.

Now it's really important to know what has happened.

Apache is now running as a web server, just like the one your ISP uses.
When you installed the program, it made certain folders on your machine,
server accessible pages and from now on, this is where you will run your
php and HTML scripts. You can continue to design the scripts anywhere
you like, but they 'must' be within the confines of 'Apache territory'
to work. For obvious reasons, it pays to design your scripts in the same
folder where they will be tested and run, so your next big task will be
to copy or move everything over to the Apache folders. I'll explain how
to do that shortly, but let's test our installation first.

1. Start Apache and Mysql if they are not already running.
3. Load Internet Explorer because it's a bit more user friendly. Get rid
of the dialup window if it pops up.
3. Enter 'localhost' without the quotes in the address line and hit
enter. If all has gone well, you will see the PHP statistics screen
indicating that everything is working. Php automatically loads itself in
the background when needed so you'll never have to worry about it ever
again. If you don't see the PHP screen, I'm afraid I can't help you any
more. I've loaded PHPTriad on dozens of machines and I've never had a
failure - never!

4. You can't do much more at this stage, so let's continue with what has
to be the most exciting part of the exercise.

Firstly, let's take a look to see what PHPTriad has done. It's actually
created a folder in your windows directory (root) called

C:\Apache

Within that folder there are several others, but we concern ourselves
with only one:

c:\apache\htdocs

This is you working directory or "public" area and you'll spend a lot of
time here. If you're still with me, this area is exactly the same as
http://www.yoursite.com or the document root on your remote server. This
is the folder where you will dump all the scripts on your pc server and
remote server, so we should try to keep both layouts the same. Let's
assume you have two sites on your remote server:

www.yoursite.com/mom - this will be c:\apache\htdocs\mom
www.yoursite.com/dad - this will be c:\apache\htdocs\dad

You can have as many folders as you like and as many sub folders within
those folders, thus you will see the benefits of making exact copies of
your folders on both the remote server and your pc. Also, you won't have
an ounce of trouble uploading images etc., because all the paths will be
correct.

Ain't that simple?

Let's not get carried away just yet, there's still a lot to learn.

When you loaded apache, it actually created a unix like environment on
part of your pc. Everything you do from now on in Apache territory, you
have to do differently. The main thing to worry about is that you will
be using unix paths / instead of the windows \ in all your scripts and
the web server.

Okay, get to it and copy all your HTML and PHP stuff over to the correct
Apache folders and play. Don't forget to make a note of the folders so
that you can find things, otherwise you'll drive yourself crazy. Using
your web browser, just type:

localhost/folder_name/script.html or script php and the appropriate
script(s) should run exactly as if they were on your main server.

Please don't use any scripts with mysql databases in them because they
won't run - yet! We still have a few things to do in that department,
but I've given you enough to do for the next 48 hours. Use that time to
get things sorted out and I'll use it to write the next dramatic
installment.

Best wishes,

John



Patrick L.
Posted: 04/05/2001, 11:51 PM

John, Thanks for this.

Look, I've got php 4 and mysql and pws, (and CC), but not apache, so you are saying that
php and mysql won't work with PWS?

Should I uninstall mysql and php, and just download the triad?

Let me know when your site it up, I do need to learn, like, yesterday. I've had to turn away clients for lack of
database and programming knowledge.

I have already designed several web sites which are hosted on Apache/unix servers, and installed prewritten perl scripts, and I
have developed sites on locally on pws, and I do understand the localhost vs filepath relationships. I also have active perl on my
computer, as well as php4, but I'm more interested in php for now, and using codecharge to help create dynamic web sites and
eventually learning to program in php, and later perl, on down the road.

Patrick L.
www.choozart.com





>John King <jking@cairns.net.au> wrote in messagenews:3ACD5791.68BE7054@cairns.net.au...
> Hi Patrick,
>
> I'm responding to your request in a teacher/student fashion because the
> answers to the questions you ask are not only important to you. If you
> already know 80% of what I'm about to say, hopefully someone looking
> over your shoulder won't. Thus, this is an open exercise for anyone who
> wants to participate.
>
> When I have my web site running in a few weeks time, you will find a
> better written, and more concise version of this article, which I have
> thrown together just for you and the members of this group.
>
> Because of the things you asked, it sounds like you could be taking the
> long road home? First off, you need Apache, PHP and Mysql on your
> server, then you need CodeCharge to make it all happen. If you don't
> yet have Apache/PPH/Mysql on you pc, there are two ways you can do it,
> one takes weeks with no guarantee of success, the other takes a few
> minutes.
>
> If you have one or more of the components loaded already, or if you
> have them all loaded, but with some degree of uncertainty, I suggest you
> delete the lot right now. It's absolutely essential to have the three
> aforementioned programs running in harmony otherwise you will never get
> anywhere.
>
> Let's assume you're stating from scratch.
>
> You need to download all three programs, but these are available as a
> single unit called PHPTriad. Go to http://www.hotscripts.com and enter
> phptriad in their search box. Follow the links to the download website,
> make a coffee and download all 8 meg. This will give you Apache, mysql,
> and php all with full documentation, plus another essential program
> called phpmyadmin.
>
> When you return, disconnect yourself from the internet (important), find
> the download and press the "Setup" button. Within 60 seconds, and with
> no input from you, PHPTriad will both install and link all four programs
> so that they will work seamlessly! PHPTriad is surely a gift from
> heaven.
>
> Now let's consider where we're at. Having rebooted your computer, find
> PHPTriad on your start menu. In this order, close down Microsoft's
> personal web server if it's running, Click "Start Apache" and then
> "Start Mysql". Both of these programs run under DOS, so you may be a
> little confused with the results. When you start Apache, a DOS window
> will appear telling you that Apache is loaded. Just close the window
> (not the program) and you'll be back to Windows. You will also see an
> Apache Icon on the task bar. A similar DOS box also appears when you
> start Mysql, but it goes away automatically. Also, a Mysql icon does
> 'not' appear on the task bar, but it is running. Just keep in mind that
> the next time you start apache, you will get what looks like an error
> message. Just ignore it because it's a question, not a statement. You'll
> see what I mean later down the track.
>
> Now it's really important to know what has happened.
>
> Apache is now running as a web server, just like the one your ISP uses.
> When you installed the program, it made certain folders on your machine,
> server accessible pages and from now on, this is where you will run your
> php and HTML scripts. You can continue to design the scripts anywhere
> you like, but they 'must' be within the confines of 'Apache territory'
> to work. For obvious reasons, it pays to design your scripts in the same
> folder where they will be tested and run, so your next big task will be
> to copy or move everything over to the Apache folders. I'll explain how
> to do that shortly, but let's test our installation first.
>
> 1. Start Apache and Mysql if they are not already running.
> 3. Load Internet Explorer because it's a bit more user friendly. Get rid
> of the dialup window if it pops up.
> 3. Enter 'localhost' without the quotes in the address line and hit
> enter. If all has gone well, you will see the PHP statistics screen
> indicating that everything is working. Php automatically loads itself in
> the background when needed so you'll never have to worry about it ever
> again. If you don't see the PHP screen, I'm afraid I can't help you any
> more. I've loaded PHPTriad on dozens of machines and I've never had a
> failure - never!
>
> 4. You can't do much more at this stage, so let's continue with what has
> to be the most exciting part of the exercise.
>
> Firstly, let's take a look to see what PHPTriad has done. It's actually
> created a folder in your windows directory (root) called
>
> C:\Apache
>
> Within that folder there are several others, but we concern ourselves
> with only one:
>
> c:\apache\htdocs
>
> This is you working directory or "public" area and you'll spend a lot of
> time here. If you're still with me, this area is exactly the same as
> http://www.yoursite.com or the document root on your remote server. This
> is the folder where you will dump all the scripts on your pc server and
> remote server, so we should try to keep both layouts the same. Let's
> assume you have two sites on your remote server:
>
> www.yoursite.com/mom - this will be c:\apache\htdocs\mom
> www.yoursite.com/dad - this will be c:\apache\htdocs\dad
>
> You can have as many folders as you like and as many sub folders within
> those folders, thus you will see the benefits of making exact copies of
> your folders on both the remote server and your pc. Also, you won't have
> an ounce of trouble uploading images etc., because all the paths will be
> correct.
>
> Ain't that simple?
>
> Let's not get carried away just yet, there's still a lot to learn.
>
> When you loaded apache, it actually created a unix like environment on
> part of your pc. Everything you do from now on in Apache territory, you
> have to do differently. The main thing to worry about is that you will
> be using unix paths / instead of the windows \ in all your scripts and
> the web server.
>
> Okay, get to it and copy all your HTML and PHP stuff over to the correct
> Apache folders and play. Don't forget to make a note of the folders so
> that you can find things, otherwise you'll drive yourself crazy. Using
> your web browser, just type:
>
> localhost/folder_name/script.html or script php and the appropriate
> script(s) should run exactly as if they were on your main server.
>
> Please don't use any scripts with mysql databases in them because they
> won't run - yet! We still have a few things to do in that department,
> but I've given you enough to do for the next 48 hours. Use that time to
> get things sorted out and I'll use it to write the next dramatic
> installment.
>
> Best wishes,
>
> John
>
>
>
>

CodeCharge
Posted: 04/05/2001, 11:58 PM

Hi Patrick,

> So I go to the odbc data sources in the control panel, and hit the add
button, I select
> the MySQL driver and then another screen comes up, asking for tons of
input from me, lots of checkboxes (see
> http://www.choozart.com/screenshot.gif )

I appreciate John's comments on setting up PHP and MySQL on your computer.

However, here are some additional comments about MyODBC setup itself:
If all you want to do is to connect to an existing MySQL database on a local
or remote server, you will need to configure your MyODBC driver, but this is
pretty simple.
Don't worry about all the checkboxes. In fact do not touch them.
Here are all the settings you should need:
Windows DSN Name: any_name
("any_name" is just a name that you want to give this connection, so that
you can recognize it later)
MySQL host (name or IP): 123.123.123.123
(123.123.123.123 is an example. You need to obtain this IP from your hosting
company. It maybe the same IP as your web server, but not necessarily.
However, if your MySQL database is on the same machine as codecharge, you
may just type "localhost" instead of "123.123.123.123")
MySQL database name: my_database
("my_database" is the name of your MySQL database that you want to connect
to. You need to create this database using MySQL itself.)
User: my_login
("my_login" is the name you use to login to your MySQL database)
Password: my_password
("my_password" is your MySQL password)

This is it. Leave everything else blank on MyODBC setup screen. Once you do
this, you can go back to CodeCharge and select ODBC Provider in CodeCharge
database properties, then select the DSN Name that you just created with
MyODBC.

> Another question, once I do get a handle on developing php/myql driven
sites developed on my
> win98 with CC, how am I going to port that to a unix or linux remote
server? I will have to go in and
> change file paths, sql connect commands, correct? If I am a
nonprogrammer to begin with,
> how am I going to accomplish this? (I just know html, that is all).

This is actually easier with PHP/MySQL than with Microsoft ASP/MS Access.
You can select "Ftp" in CodeCharge Publishing settings, which will allow you
to generate PHP programs directly to your remote web server.
And in the Database Properties, you will need to change "Host" to point to
IP address of your remote database.
You may also need to change your Database Name, Login and Password, if it is
different on your remote server than on the local server.




"Patrick L." <ZZ-patrick@choozart.com-ZZ> wrote in message
news:9ajd4k$uu2$1@mail.tankhill.com...
> Hi all,
>
> I'm a nonprogrammer. I am just starting out learning a little bit about
php, and I have mysql and
> myodbc installed. I want to use codecharge do develop php/mysql driven
websites.
>
> In another post, someone else asked a similar question ( "Can anyone
tell me how can I connect MySQL to CodeCharge through ODBC or
> whatever the way is") and the next message instructs:
>
> "1. Download and install MySQL odbc driver. (at http://www.mysql.com :-))
> 2. Setup ODBC data source. (in control panel -> data sources)
> 3. Use it in codecharge ..."
>
>
> Okay. I am following this. I download mysql, which comes with the
driver.
>
> So I go to the odbc data sources in the control panel, and hit the add
button, I select
> the MySQL driver and then another screen comes up, asking for tons of
input from me, lots of checkboxes (see
> http://www.choozart.com/screenshot.gif ) for which I cannot find the
descriptions of in the mysql documention, which is heavy on
> documentation for linux and unix, but doesn't seem to give me much for
windows 98. So I'm a little confused on what to do there.
>
> I have MyODBC. Now I'm confused about that and why I need it. Does it
have anything to do
> with the ODBC data sources thing in the control panel?
>
> Man, I'm lost. Anyone wanna come to my rescue? I just want to know how
to get there from here,
> how to use codecharge.
>
> Would the best thing to do is to study and master MySQL and ODBC before
even attempting
> to use this app?
>
> Another question, once I do get a handle on developing php/myql driven
sites developed on my
> win98 with CC, how am I going to port that to a unix or linux remote
server? I will have to go in and
> change file paths, sql connect commands, correct? If I am a
nonprogrammer to begin with,
> how am I going to accomplish this? (I just know html, that is all).
>
> (I know, become a programmer, that would solve my problem, eh?
> But I live way out in the boonies, and the web, plus books, and you kind
folks are my only hope).
>
> On the wish list, I would like to see codecharge set up a course on how
to use this app
> at an online school such as www.smartplanet.com . I would sign up for
it in a minute.
>
>
> Best,
> Patrick Lockwood.
> www.choozart.com
>
>
>
>
>
>
>

John King
Posted: 04/06/2001, 12:38 AM

Patrick,

If you're happy with your current setup, don't worry about Apache. I
have Win ME but it's not supplied with a server. I used the server off
my old win 98 CD and it's a pain in the butt compared to Apache. Just
get your programs working, but if you want to, and have time, you can
set up the Apache server too.

I'll continue with my article because there are people out there who
don't have the MS server. As far as CC db connection is concerned, do
what the guy from CC recommends in this thread. I also needed help which
came from CC within the hour, and over a weekend to boot. Not bad
service at all.

Re PHP, it's a popular language and there's plenty of stuff out there to
get you started. The thing is, when learning any new language, you have
to start from the basics .... "this is a cat"..... I'll have some basics
on my site, but I'll also direct you to the really good tutorials out
there.

Regards,

John

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.