Apache, MySQL, and PHP
I am new PHP development and working on a test project. I've installed Apache, MySQL and PHP on my Windows XP box and now I'm a little confused. I created a database and some sample code to retrieve data. Now, on a server I'm using which supports this how do I upload this to the server for use?
I hope this makes sense. Is there a built-in app for that or do I upload my created db to the server.
UPDATE: I forgot to add that I am working locally and now would like to port this over to my domain and server. My host uses a linux box with apache.
Thanks in advance,
mdawg
Hi,
Download the mysql admin gui from here : http://dev.mysql.com/downloads/gui-tools/5.0.html
If your host server allows connections from other hosts you can use the mysql gui to connect to the local database as well as the host database and export the tables to your new database on the host. This is the way I prefer to do it... but some hosts only allow SQL connections from the localhost itself which basically means you won't be able to connect to it using the mysql gui tools.
However you can still generate the database scripts from the gui tools and login to your hosts mysql manager - possibly phpMyAdmin and then simply execute the SQL script.
Hope this helps,
Brendan
Similar Messages
-
Will there be future database support of mySQL and php 5.5 on the dreamweaver CC?
Will there be future support of mySQL and php 5.5 on the dreamweaver CC? I have seen various topics on this, and havent seen any answers on this as of yet. I feel it is very important to have this available, and not from some external company as an addon or something. I come from cs6 products, and am debating whether or not I should even join the creative cloud, or participate any further with Adobe products.
I have been a fan of Adobe for quite some time. However, if there isn't going to be any database tools within DW, I may decide to pass on the CC and comepletely hand code it all from now on.
Has anyone found yes or no answer to this yet? I am assuming there is no news yet, as the adobe posts I have read have no additional info other than they haven't updated the tools, thus removing them from CC.Mikaroni wrote:
Will there be future support of mySQL and php 5.5 on the dreamweaver CC? I have seen various topics on this, and havent seen any answers on this as of yet. I feel it is very important to have this available, and not from some external company as an addon or something. I come from cs6 products, and am debating whether or not I should even join the creative cloud, or participate any further with Adobe products.
I have been a fan of Adobe for quite some time. However, if there isn't going to be any database tools within DW, I may decide to pass on the CC and comepletely hand code it all from now on.
Has anyone found yes or no answer to this yet? I am assuming there is no news yet, as the adobe posts I have read have no additional info other than they haven't updated the tools, thus removing them from CC.
I very much doubt that any future addition of DW will include any 'official' support for mySql database interactivity. CC hide the server behaviours this time around in an extention to be activated by the individual, its still available in CC but at the users own disgression, mySql is dead. You should be connecting and querying your databases using other methods like mySqli. Adobe have seen it fit to go in other directions and dispite the outcry of dropping the server behaviours there has been a deafening silence from Adobe. From that you can take it they think it is no longer an important part of their software package.
Mikaroni wrote:
I have been a fan of Adobe for quite some time. However, if there isn't going to be any database tools within DW, I may decide to pass on the CC and comepletely hand code it all from now on.
I have not updated to CC because it contains zero that would be of importance to my workflow. The more experienced a code writer you are the less DW has to offer. Any serious code writer would not miss DW if it went out of business. Fireworks is more important to me which LOL is going out of business...go figure. I think the Adone execs are screwed up snorting cocaine or something. I'm not really even sure why I use DW, maybe out of habit.
Certainly hand coding for database connectivity and querying is the ONLY way to go if you are not interested in third party extentions because continuing to use the current available server behaviours is a backwards step. I don't know how good these third party extentions are because there has never been a lot of talk about them around here which leads me to believe not many are considering them, maybe. -
Using MySql and PHP with Dreamweaver on a Mac
Hello all,
As always if the answers to these questions are obscenely
obvious please humour me.
I use XHTML and CSS in my websites and realise that it is
time that I dabbled with SSI. So I've started using PHP.
However, I have been following the installation directions of
MySql and am running into problems. I am installing the relavent
software and am then unable to find it on my Mac, the startup files
are there but the actual MySql data appears to not be installed
despite my computer telling me it is...... I am using a G3 running
OSX 10.4 is this good enough? I noticed talk of needing a PowerPC
or Intel mac. Is this the case?
Also, would I need MySql installed on my actual computer if
the my servers have it already? And does Dreamweaver 8 have both of
these programs installed as standard?
If you could help out I would be very appreciative as I would
like to learn this stuff and I appear to be struggling at the
outset....
Cheers
M.AM.A.Wilson wrote:
> However, I have been following the installation
directions of MySql and am
> running into problems. I am installing the relavent
software and am then unable
> to find it on my Mac, the startup files are there but
the actual MySql data
> appears to not be installed despite my computer telling
me it is...... I am
> using a G3 running OSX 10.4 is this good enough? I
noticed talk of needing a
> PowerPC or Intel mac. Is this the case?
MySQL is a relational database management system that
comprises a
database server and several utility programs. Although you
install it
like any other program on a Mac, the similarity stops there.
First, the point about PowerPC and Intel Macs is that there
are
different versions of the MySQL installer for each type of
processor.
I'm pretty sure that a G3 is OK, but you must choose the
PowerPC version
of MySQL, not the 64-bit or x86 (Intel Mac) version.
Once you have installed MySQL, you need to drag the
MySQL.PrefPane icon
from the disk image onto your System Preferences. This
installs a
Preference Pane that enables you to start and stop MySQL. The
Preference
Pane has an option to start up MySQL automatically, but in my
experience, it doesn't work on Tiger. You need to open the
Preference
Pane, and click Start MySQL Server each time you start your
computer.
The best way to work with MySQL is to use a graphical
interface, such as
phpMyAdmin. As Osgood has mentioned, I have written a book
about PHP and
Dreamweaver, which goes into all the necessary details. It's
also very
Mac-friendly with separate instructions where necessary for
PC and Mac.
More details here:
http://foundationphp.com/dreamweaver8/
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/ -
Database setup with MySQL and PHP question
Hello all,
I recently had a problem getting a report to work for a site I was updating. This site is written in PHP with a MySQL database. The application is to track customer calls to auto repair stores. The database has a lot of foreign keys because they wanted to update information in only one spot and have multiple records be updated all at once. So, I've got all the information from individual calls saved in the call_log table, and have foreign keys to reference information in other tables (for example this table lists what store received the call referencing the store table). If a store changes locations, they want to have reports automatically update with the new address, connection to conversation number, etc.
In one of the responses to my question on how to get this report to work, I was told that this could be done without using foreign keys (by Normalizing the database using mapping tables). I am still a newbie to MySQL, and after looking though a lot of manuals, tutorials, and forum posts, I am more confused now than ever.
I got the report to work using the foreign keys, but I would like to learn what I should have done with the database (and how to get the information displayed).
So for example one report would be displaying the following:
Store Reason for the Customer Call
breaks oil change shocks tune up total calls
5636 - Bloomington 2 4 0 2 8
8875 - Duluth 1 6 4 8 19
with links on the store name to pull up the information on that specific store. How would I change the database (listed below) to do this without foreign keys? Any help would be greatly appreciated.
call_log (table that contains the following:)
call_id
conv_number
date
camp_type (foreign key to the campaign table so it displays the campaign_id)
reason (foreign key to the call_reason table so it displays the reason_id)
location (foreign key to the store table so it displays the store_id)
associate
call_summary
trainig_issue (foreign key to the training_points table so it displays the training_key_id)
visit_closed
example (foreign key to the example_type table so it displays the example_id)
campaign (table that contains the following:)
campaign_id
campaign_name
campaign_promotion
campaign_coupon
campaign_startdate
campaign_enddate
call_reason (table that contains the following:)
reason_id
reason
store (table that contains the following:)
store_id
store_number
store_address
store_city
store_state
store_postalcode
store_name
store_phone
store_email
store_mgr
training_points (table that contains the following:)
training_key_id
key_issue
policy
example_type (table that contains the following:)
example_id
example_name
example_image
Thank you very much.Frankly, that is way to much of a question to be answered in detail on a forum... There's a lot involved and a lot of general database understanding required. I would highly recommend:
Database Design for Mere Mortals: A Hands-On Guide to Relational Database Design, Second Edition -- by Michael J. Hernandez
This is an invaluable book to get you going in the right direction and on a firm foundation.
Lawrence *Adobe Community Expert*
www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and CF
www.twitter.com/LawrenceCramer -
I want to create a mysql and php forum.. need advice
Hi,
I want to create a forum to put on my site.. it doesnt have
to be very complicated - it can be as simple as this one
http://boards.gapyear.com
http://boards.gapyear.com but
I want it to be fully integrated into my site (so would prefer not
to use phpbb etc).
I'm using phpmyadmin and Im not too hot on mysql or php (but
am willing to learn!) so was wondering if anyone knows of a really
good tutorial to talk me through the processes of setting up such a
forum?
Would appreciate any advice.Lou28 wrote:
> Hi,
> I want to create a forum to put on my site.. it doesnt
have to be very
> complicated - it can be as simple as this one
http://boards.gapyear.com
>
http://boards.gapyear.com but
I want it to be fully integrated into my site (so
> would prefer not to use phpbb etc).
> I'm using phpmyadmin and Im not too hot on mysql or php
(but am willing to
> learn!) so was wondering if anyone knows of a really
good tutorial to talk me
> through the processes of setting up such a forum?
>
> Would appreciate any advice.
>
The people who make the free forums (phpBB or SMF for
example) do it for
free in there own time and are experts in there field. They
need to be,
forums are complicated and prone to being hacked, so security
is your
number one concern.
Most can be integrated into your site with a bit of work, but
thats much
less work than creating your forum.
Steve -
Apache, ssl, and php problem
i just added ssl support to my apache website running php. before i added ssl i had a php flash script that has always worked fine until i altered the httpd.conf file to forbid access to this directory unless it was an encrypted connection. i used the code
<Directory "/home/httpd/html/folder">
AuthType Basic
AuthName "user"
AuthUserFile /home/httpd/passwords/folder
Require user user
SSLRequireSSL
</Directory>
i tested the ssl with the directory running php before i altered the code and it worked fine. now that i altered the code to require ssl, the folder's index shows up a blank page. what went wrong, is there some bug or something i did wrong?steps to use ssl in arch with apache.
1) pacman -S openssl apache
2) Read /etc/httpd/conf/mod_ssl.txt
2a) Edit /etc/conf.d/httpd and set HTTPD_USE_SSL to "yes"
2b) Create an ssl key, request, and certificate.
# This generates the cert and key (valid for 3650 days)
# Be sure to enter the FQDN of your apache server as the "Common Name".
openssl req -new -x509 -newkey rsa:1024 -days 3650
-keyout server.key -out server.crt
# This will remove the passphrase
openssl rsa -in server.key -out server.key
2c) Modify /etc/httpd/conf/ssl.conf to use your new certificate.
SSLCertificateFile /etc/httpd/conf/server.crt
SSLCertificateKeyFile /etc/httpd/conf/server.key
3) Edit /etc/httpd/conf/ssl.conf
Define an appropriate virtualhost for your ssl site
4) Restart apache (/etc/rc.d/httpd restart)
If it hangs or fails to start, check the /var/log/httpd/error_log or try running
'/usr/sbin/apachectl startssl' and looking for errors/prompts.
NOTE: Using the same dir for ssl and non-ssl does not make sense, as someone could just use non-ssl to access the same information. Instead, create a new directory (something like /home/httpd/ssl), and use that dir for ssl web activities. Adjust /etc/httpd/conf/ssl.conf accordingly -
Help with DW, MySQL and PHP
Hi,
I've created a simple login system using dw8. When a user logs into the system, he can see all the support incidents create by him. This is done with a simple mysql query and a dynamic table is populated with the incident IDs.
However, I would like to make each incident ID which is returned clickable. So when the user clicks on any of the incident ID which is returned, it should redirect the user to a page which displays some information about that incident.
Can someone please tell me how I can get this done.
Thanks in advanceFirst thing you are going to need to do is to read up on sessions.
http://www.tizag.com/phpT/phpsessions.php
Sessions are important because if this information is sensitive (by calling it "incidentID" I get this impression) then you need to ensure that the user is logged in throughout the process. So when the user is logged in you need to store data that you might need to access quickly like the userid and the user's group ID. Then once you write the values to the session (which DW should allow you to do) you can call the variables from the superglobal $_SESSION. This way you have data to ensure that the user is who they say they are and did pass the login.
Without seeing your table design (for the database) I can tell you the logic of what's going on, but if you need more specifics about your example you will need to post more information. What you need to do is when you print the results just print them with a link around it, so:
echo "<a href='detailpage.php?incidentid=$_POST[incidentID]'>$_POST[incidentID]</a>";
That's just the simplest solution. I'd recommend having your loop print in a table or other structured format and loop the printing in that manner. Then on the following detail page you should call the user's session so that anyone on Google can't just go to "detailpage.php?incidentID=###" and get into the pages without logging in. -
Developing a web application in Dreamweaver,MySql and PHP
I have two questions:
1. Am developing a web application on a windows 7 platform.
I have an insertion form where I have to always eneter the geographical details for some one. I.e District, County, Sub County and village.
So what I want is to have these pre entered in the database before I revock this form such that when I select a certain village on the form, it automatyically displays its District, Subcounty and County in the following textfiled. This saves time than typing them manually all the time.
I need help on how to do this.
2. On the same form, I have a textfield for capturing date of Birth. I need help on to insert a calender in this field such that when some one clicks on it, a calender pops up and he selects the date which is then inserted in the text field other than tytping it manually.
Thank u.1. Have a look here http://labs.adobe.com/technologies/spry/samples/data_region/DataSetMasterDetailSample.html
2. Have a look here http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=2137 022
I hope this helps.
Ben
PS For more support on these products go to the Spry Forum here http://forums.adobe.com/community/labs/spry -
Apache and PHP not working together
Hey all,
Ok, I reinstalled my server yesterday and followed the LAMP wiki to set up Apache, MySQL, and PHP. Now, I got Apache and MySql working great, but when I go to directory that has a .php file to open, my brower is asking me what application I want to open with the file.
I have set up this to handle the docuemtns:
DirectoryIndex index.php index.phtml index.html
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
and still no go.
Anyone got this to work?
Thanks!!!
Joecactus wrote:
http://bbs.archlinux.org/viewtopic.php?t=15596
Check and see if what I said in my last post is happening to you as well...
Yeah, I checked and the path is correct...
Maybe I should just reinstall it?
Thanks!!! -
Will Apple update Apache / MySQL / PHP on Tiger 10.4.11
Recently, a scan was made on the two xServes that I have, both running 10.4.11 with only the web services set up. They are running the default bare bones setup for Tiger Server 10.4.11.
The scan showed issues with the current install of Apache and PHP. I have been told I need to update the serves to a more secure version of Apache, Mysql, and PHP.
Does anyone know if Apple is going to issue an update for this? Is my only option to patch together a more recent version of Apache, Mysql, and PHP to patch this?
Or is Apple's answer to my dilemma is to just upgrade to Leopard?
Thanks for your comments.Your choices here fairly limited; there's the upgrade Leopard, loading (for instance) the [MAMP|http://mamp.info] kit or other such kit and shut down the integrated stuff within Mac OS X Server, or rolling your own Apache and related pieces. If these are Intel Xserve boxes, then you could tactfully and officially drag your heels for a couple of months and upgrade to Snow Leopard.
-
Trying to run PHP, Mysql and Apache
Hey guys, Basically Im at university and doing a web development project and i need to use mysql and php, and someone told me leopard already comes with it? Does anyone know how i can get it to work correctly? any steps from the beginning? - am new to macs
Cheers
Krupshello, I will suggest you to follow the instructions set up by Marc Lyianage in his website, the url is http://www.entropy.ch/software/macosx/ there you will find a page for setting up php5 (it comes preinstalled in leopard) and it has a also a package installer for mysql very easy to set up.
-
Installing php, mysql and apache
Hey guys, Basically Im at university and doing a web development project and i need to use mysql and php, and someone told me leopard already comes with it? Does anyone know how i can get it to work correctly? any steps from the beginning? - am new to macs
Cheers
KrupsThis web page:
http://www.macosxhints.com/article.php?story=20071030153912813
claims to tell you how to do it, though after 12 hours of working on this today I seem to be no closer. -
MAMP: Mac + Apache + MySQL + PHP
I want to run the following under 10.5 Server. This server will primarily act as a database server with phpMyAdmin.
Are these versions included in the standard install? If not, which versions?
Am I going to have to manually compile any of these? If so, anything I need to know or watch out for?
Apache 2.2.6
MySQL 5.0.45
PHP 5.2.5
phpMyAdmin 2.11.4I've not been using X Server for TOO long yet but in my experience on the client side they rarely keep it on par with the latest build. On Mac OS X 10.4 (Client) I just downloaded and compiled my own Apache 2 and PHP 5 software and tricked the System prefs into starting it instead when Web Sharing was enabled.
I dont see why you couldnt compile your own PHP module for apache though if you start compiling Apache you'll probably need to make sure you use the same compile directives Apple did to ensure functionality with their Server Admin and other services like blogs and wikis. -
I downloaded mySQL and mySQL driver NOW WHAT ?
I downloaded the mySQL and the mySQL driver. What do I do now ?
I saw a book "mySQL and PHP for Dummies" . What is PHP ?
Can you give me direction ?
(without the "go read the archives" type of non-helpful help ?)
Thank you in advance
StanIf it's PHP and MySQL you're interested in, why are you posting to a Java forum?
PHP is a Web scripting language:
http://www.php.net/
If you want to use MySQL with Java, you'll have to learn enough about SQL and relational databases to be able to get into MySQL, create some tables and users, and add some data. Then you'll use the MySQL JDBC driver to let your Java app access those database tables and do CRUD operations on them (Create/Read/Update/Delete).
There's a JDBC tutorial under the Tutorials link to the left on this page.
Here's a Java app that will let you run any valid SQL statement you wish against any database:
import java.sql.*;
import java.util.*;
public class DataConnection
public static final String DEFAULT_DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
public static final String DEFAULT_URL = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\Edu\\Java\\Forum\\DataConnection.mdb";
public static final String DEFAULT_USERNAME = "admin";
public static final String DEFAULT_PASSWORD = "";
/** Database connection */
private Connection connection;
* Driver for the DataConnection
* @param command line arguments
* <ol start='0'>
* <li>SQL query string</li>
* <li>JDBC driver class</li>
* <li>database URL</li>
* <li>username</li>
* <li>password</li>
* </ol>
public static void main(String [] args)
DataConnection db = null;
try
if (args.length > 0)
String sql = args[0];
String driver = ((args.length > 1) ? args[1] : DEFAULT_DRIVER);
String url = ((args.length > 2) ? args[2] : DEFAULT_URL);
String username = ((args.length > 3) ? args[3] : DEFAULT_USERNAME);
String password = ((args.length > 4) ? args[4] : DEFAULT_PASSWORD);
db = new DataConnection(driver, url, username, password);
Object result = db.executeSQL(sql);
System.out.println(result);
else
System.out.println("Usage: db.DataConnection <sql> <driver> <url> <username> <password>");
catch (SQLException e)
System.err.println("SQL error: " + e.getErrorCode());
System.err.println("SQL state: " + e.getSQLState());
e.printStackTrace(System.err);
catch (Exception e)
e.printStackTrace(System.err);
finally
if (db != null)
db.close();
db = null;
* Create a DataConnection
* @throws SQLException if the database connection fails
* @throws ClassNotFoundException if the driver class can't be loaded
public DataConnection() throws SQLException,ClassNotFoundException
this(DEFAULT_DRIVER, DEFAULT_URL, DEFAULT_USERNAME, DEFAULT_PASSWORD);
* Create a DataConnection
* @throws SQLException if the database connection fails
* @throws ClassNotFoundException if the driver class can't be loaded
public DataConnection(final String driver,
final String url,
final String username,
final String password)
throws SQLException,ClassNotFoundException
Class.forName(driver);
this.connection = DriverManager.getConnection(url, username, password);
* Clean up the connection
public void close()
try
this.connection.close();
catch (Exception e)
; // do nothing; you've done your best
* Execute ANY SQL statement
* @param SQL statement to execute
* @returns list of row values if a ResultSet is returned,
* OR an altered row count object if not
* @throws SQLException if the query fails
public Object executeSQL(final String sql) throws SQLException
Object returnValue = null;
Statement statement = this.connection.createStatement();
boolean hasResultSet = statement.execute(sql);
if (hasResultSet)
ResultSet rs = statement.getResultSet();
ResultSetMetaData meta = rs.getMetaData();
int numColumns = meta.getColumnCount();
List rows = new ArrayList();
while (rs.next())
Map thisRow = new LinkedHashMap();
for (int i = 1; i <= numColumns; ++i)
String columnName = meta.getColumnName(i);
Object value = rs.getObject(columnName);
thisRow.put(columnName, value);
rows.add(thisRow);
rs.close();
statement.close();
returnValue = rows;
else
int updateCount = statement.getUpdateCount();
returnValue = new Integer(updateCount);
return returnValue;
}Maybe it'll help get you started with Java and JDBC. You're on your own with PHP. - MOD -
Apache/MySQL/PHP and Mountain Lion
I was about to buy Mountain Lion, but I just read by a reviewer that there is an issue with the webserver or websharing capabilities of it. The reviewer was saying he/she had to go into the terminal and launch it from there!
Is anybody else having issues with developing database driven sites on Mountain Lion, or are you getting on OK with it?
I currently use xammp as my apache/mysql/php server. Is anybody on Mountain Lion using xammp, if not, what equivalent are you using?
Thanks.
MatStarting Apache is very easy. Simply type the following into a terminal:
sudo apachectl start
I think that they removed the tick box because it's so easy to do from terminal, and not something that most OSX users need.
As SnakEyez02 mentioned, using a package like MAMP or XAMPP doesn't require this. Those apps run their own Apache
Maybe you are looking for
-
Satellite Pro 6100, WXP installing SP2, after stand-by mode the USB is unknown
Hi, after installing the update SP2 for Win XP on my notebook Toshiba Sat. Pro 6100, the following happens: when the notebook awakes from the stand-by mode, the USB connector is unknown and the communication is lost. Who knows the answer for this pro
-
Should I buy Imac 27'' 3.1 or the new imac 27'' 2.9, which is better?
Should I buy Imac 27'' 3.1 or the new imac 27'' 2.9, which is better? The use to which it is going to give is photographs, video, text processing. If opt for the new'll have to buy an external drive for recording of videos and photographs.
-
Best way to communicate with IEEE device
Hi everyone; I'm using a Magtrol DSP6001 Dynamometer Controller to control a dyno. It's GPIB, and I'm able to communicate with it swimmingly, and I've used it it a number of other apps that I've written. My problem now is, that I need to be reading
-
Sent myself a vcard from Outlook so I can open it on my I phone. These have always in the past come through as vcf and I have been able to open and save them. Today no matter what I do they are coming through as dat files. Any ideas?
-
My phone cut off by itself and will not tun back on
the iphone cut off and will not cut back on or do anything. it is not receptive when i plug it into my computer either. Help please