473,395 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

MySQL PHP & SSL

Hi All,

I am trying to use PHP & MySQL over SSL, my issue is that the data that I am
querying also needs to be available by non-secure as well.

Can someone please help me in doing this.

Cheers
Steve
Nov 5 '05 #1
3 8132
>I am trying to use PHP & MySQL over SSL, my issue is that the data that I am
querying also needs to be available by non-secure as well.

Can someone please help me in doing this.


You can set up the same web page on a secure server AND on an
insecure server. With appropriate use of Apache directives and/or
symlinks, you might even manage to use the same copy for both. It
is unclear to me why you'd want to do this, or whether this solves
your problem.

The fact that you use or don't use SSL on the web site talking to
browsers has *NOTHING WHATEVER* to do with whether you use SSL or
not between your web site and MySQL. The two are independent
choices.

It is possible to use a SSL connection between the web site and
MySQL, and use non-SSL connections between you elsewhere and MySQL.
Just set up different logins with different privileges. Again, it
is unclear whether this is what you want.

Gordon L. Burditt
Nov 5 '05 #2
Hi Gordon,

Thanks for that information, you see I have a open table that does not
require SSL, anyone from the net can add data to it, however. I run a query
from that table and return values which I want to post into a secure table
on mySQL the issue is that when I do my select statement and try to connect
to the database under the same username it returns a blank webpage using
SSL.

What Im probably asking how do I run a query to my MySQL database using SSL.
Hope that makes sense.

Cheers
Steven

"Gordon Burditt" <go***********@burditt.org> wrote in message
news:11*************@corp.supernews.com...
I am trying to use PHP & MySQL over SSL, my issue is that the data that I
am
querying also needs to be available by non-secure as well.

Can someone please help me in doing this.


You can set up the same web page on a secure server AND on an
insecure server. With appropriate use of Apache directives and/or
symlinks, you might even manage to use the same copy for both. It
is unclear to me why you'd want to do this, or whether this solves
your problem.

The fact that you use or don't use SSL on the web site talking to
browsers has *NOTHING WHATEVER* to do with whether you use SSL or
not between your web site and MySQL. The two are independent
choices.

It is possible to use a SSL connection between the web site and
MySQL, and use non-SSL connections between you elsewhere and MySQL.
Just set up different logins with different privileges. Again, it
is unclear whether this is what you want.

Gordon L. Burditt

Nov 5 '05 #3
>Thanks for that information, you see I have a open table that does not
require SSL, anyone from the net can add data to it, however.
You let ANYONE log directly into your MySQL server? Wow! How much
porn, pirated software, stolen music, and stolen credit card numbers
have been added to it?
I run a query
from that table and return values which I want to post into a secure table
on mySQL
MySQL has no concept of a 'secure table', but you can restrict access
to one to specific users.
the issue is that when I do my select statement and try to connect
to the database under the same username it returns a blank webpage using
SSL.
How did you connect to MySQL using SSL? Show code. You didn't even
TRY that, did you? You just used a https page, which has got nothing
to do with using a SSL connection to MySQL. You should also, at
least for debugging, generate error messages if you can't connect
to MySQL or a query fails. Even for production use, if connecting
to the database fails, you should tell your user that things are
broken and to try again later.

Remember, just because you sent a package of weapons-grade plutonium
from Browserville to WebServerCity using armed guards and a fighter
plane escort doesn't mean the guy at WebServerCity didn't forward
it to MySQLTown using some kid with a wagon.
What Im probably asking how do I run a query to my MySQL database using SSL.


To connect to MySQL with SSL, you need PHP 4.3.0 or later, and the
MySQL client library installed with it must be 4.* or later. The
distributed client library with PHP 4 is MySQL 3.23: not recent
enough. The same applies to Windows binaries of PHP 5. Functions
to actually specify SSL parameters don't seem to be available until
PHP 5 with the 'mysqli' driver.

You also need a MySQL server *compiled with SSL*.

Gordon L. Burditt
Nov 5 '05 #4

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

Similar topics

7
by: AF | last post by:
I am a real novice to php and MySQL, with about a week's worth of reading and self tutoring. I have an urgent need to publish a database of information and need some guidance on how to do this. ...
2
by: iwasinnihon | last post by:
I don't usually like to do this, but I need help. I have gone over this code and cannot figure out why it doesn't work. First of all it doesn't check to see if you have filled in the required...
0
by: Donald Tyler | last post by:
Yes it can. But you should understand the three distinct levels of that situation. You need the following: Database Web Server Server-Side Scripting Language I would suggest using AMP...
4
by: MLH | last post by:
A programmer developed an AMP (Apache/MySQL/PHP) application for me. When he was done, he sent me the PHP files and the MySQL dump file. Now, when I connect to the application on my LAN using...
2
by: zhengfish | last post by:
Hi,All, I try to install mysql-5.0.15 on RHEL3-U5. But It give me a error. MySQL-client-standard-5.0.15-0.rhel3.i386.rpm MySQL-devel-standard-5.0.15-0.rhel3.i386.rpm...
1
by: Lennie De Villiers | last post by:
Hi, I'm running PHP 4.4.2 and mySQL on MS Windows XP Home Edition in IIS 6.0. When I try to connect to mySQL from PHP I get the following error message: Warning: mysql_connect(): Client does...
1
by: cumupkid | last post by:
II am trying to create a form that will allow me to upload photos to a folder in the site root directory and add the information to the mysql db at the same time. I have created two forms, one...
3
by: jonathan184 | last post by:
The code seems to be working fine for some records but I am thinking it is finding some other records with special characters and so on. I am looking for a way to insert the xml string with escaping...
3
by: subho2009 | last post by:
Hello friends, I have face a problem, the problem is that when i fetch data from mysql database i get '&' in the place of '&amp;'. I am using php 5.1.2 and mysql version 5.0.11-beta. What is the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.