Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Hiding MySQL Access Data In Php File ?


If I connect to a mySQL database with php I have to write the access data into the php file,eg.:

$hostname = "my_host";
$username = "my_name";
$password = "my_pwd";
$dbName = "my_db";
$userstable = "my_table";
MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to database");

Is this secure ? In other words: can it be read by a bad boy ?




View Complete Forum Thread with Replies

Related Forum Messages:
Hiding File From View Or Access
I am storing documents in a folder to be accessed by a mySql query.

How can I structure this so that the documents within the folder cannot be read by direct url or by mirrors but will still be accessed by query?

View Replies !
Best MYSQL Data Access?
I was just wondering if anyone had, or knew of a good MYSQL dataaccess layer for PHP.

I am using the smarty templating system, which mainly handles arrays and such so if anyone has any ideas.

View Replies !
How Can I Restrict Access To Data File?
I have a php script that processes a form and then posts the user
input to a data file on the server in a comma delimited format. For
simplicity call the file "data.csv." The script is working well and
the data is posted correctly to the data file.

The big problem is that anyone can point their web browser to...

View Replies !
Transfer Data From Access To MySQL
How easy is it to transfer datafrom a MS Access database to a MySQL one? How can this be done?

View Replies !
Import Data From Access Database To MYSQL
I have some data in access database. I wish to import it (keeping the same structure) in MySQL.

Also I want to know what will be procedure for importing data from databases like Oracle, Sybase, Informix etc.

View Replies !
Using PHP To Migrate Data From Shared Access Db To MySQL
I've read some online resources that utilize various MySQL
command-line actions to migrate data from Access to MySQL.

The situation is this: a group of co-workers of mine will be using an
Access db in a shared source (for now, a directory.. ???) to be able
to generate reports on the fly. What they want to do is to be able to
migrate that data to a MySQL db instance that currently exists on a
different server.

What would be the best way to do this within a PHP wrapper (if even
PHP at all, which I prefer); if so, what are the ways I can ensure
security as this is US Federal Government data and thus must be locked
down tight?

View Replies !
How To Grab MS Access Data Into Mysql And Vice Versa?
I'm developing an online ordering system, using PHP and MySQL database, which requires me to integrate with MS Access database to get some data . for example : application status.

fyi, another system is developed using ASP and MS Access database to keep track of the application status since the status are always changing.

i have to grab the application status of a particular record and update the MySQL database. this has to be done sort of the 2 databases are 'linked' together.

any update/new records inserted into MySQL will be known by MS Access and any status update in MS Access will be known by MySQL. something like that..

is it possible to link the 2 different databases?

View Replies !
Read Data From MS Access Into MySQL In Real-time
I am currently working on a project that involves reading information from a inventory system into Access via ODBC and display the info on the web site using MySQL.

I would like to create a live link between the MS Access(local) and MySQL (remote) whenever the inventory system is updated MySQL will be updated as well.

I know that MyODBC will let me do the opposite of what I would like to accomplish by reading data in MySQL into Access. Is it possible to do the reverse way.

View Replies !
Upload Ms Access File In Mysql In 4.2
I have a ms access file witch have to upload in mysql database by using php4.2.2.

View Replies !
Include File From Another Server To Access MySQL DB
Is it possible to include a php file from another server which contains the MySQL access information, in order to access that site MySQL information?

Becasue I just found that a person did this with my site, I am running vbulletin and I found that, a person made a script which is installed on his server and he is showing my site stats (like latest members, who is online, etc)

I want to know, how I can disable/restrict access so on one can include my config file(s) or anything else from outside the server!

View Replies !
Hiding File Paths
How do I ensure that a normal user wouldnt be able to type in say:

www.example.com/admin/adduser.php

and not be able to gain access e.g A message is displayed telling them they arent logged in and dont have access to this page.

View Replies !
Hiding Mysql Errors
Occasionally (during a reboot, etc.) the mysql server is unavailable, and I wish to display something other than the mysql_connect error that I get now, along with an otherwise blank screen.

I would prefer to display a custom error page that state's 'we are currently updating the database...yada, yada, yada...'

I'm just really not certain where to put this custom html.

View Replies !
Hiding MySQL Passwords
I am connecting to a mysql database hosted with GoDaddy to display search results, run basic queries etc. this requires providing a password within my PHP code. Should I worry about hiding my password and if so, how do I go about doing it. With GoDaddy it is not possible to store the php file that includes the password outside the webtree.

View Replies !
Transferring Variable / Hiding Php-file
I would like to do this

html/file1.php
cgi-bin/file2.php

it is called:
file1.php$c1=something

file1.php is:
<?
include "/cgi-bin/file2.php?c1=$c1"
?>

But it gives:
Warning: main(/cgi-bin/file2.php?c1=1234): failed to open stream: No such
file or directory

Seems its looking for file "/cgi-bin/file2.php?c1=1234", instead of calling
file /cgi-bin/file2.php with variable c1=1234

What am I doing wrong?

What I'm trying to do, at the moment there is just one .php file,
html/file1.php which includes sql-password.

So instead of file1.php (with sql-password) being in /html

I would like file1 just call file2.php in cgi-bin, so if there is some
problem with php, people would only see
<?
include "/cgi-bin/file2.php?c1=$c1"
?>

instead of sql-password. And file2.php including password would be in
protected directory, not visible to net.

Am I trying the right thing?

Im not sure if file1.php should run include, exec, or something else?

The real code (that im trying to move to file2.php) uses echo:s to make a
html-page

Does it work like that, or do i need to use some return, to return the page
from file2 to file1, and only file1 to echo it?

View Replies !
Masking Or Hiding A File In A Breadcrumb
I have an interesting challenge. I have one page called results.php - this page displays the results from the input of another page. However I want to mask this one page from showing up in the breadcrumb because it will error out if accessed directly by clicking on it.

Basically the results.php page only works if the user clicks submit on a form (which contains query parameters) If a user trys to access the results.php directly without going through the form first it will error out because it has no parameters to display results from.

View Replies !
Hiding Download Location When Downloading File From Server?
I have a requirement where we need to sell online the survey reports which are stored on our server in .pdf formats. Now i have two options once the payment is made i can directly give the client a link to download the file, which would reveal the download location to the client which can be reused by others too.

Second option is to copy the file to a temporary dir and then pointing the download link to that dir and lateron deleting the file from the temporary folder. But in this case i would have to setup a cron job to daily remove all the old files from the dir. i am not comfortable with this idea.

Is there any other way to do this? Can i be notified by php when the download is completed at the users end so that i can delete the file from temp folder once its done (using the same download script instead of running a cron job later).

View Replies !
Hiding MySQL Password On A Shared Server And Some Other Questions
I have a shared hosting account and have some questions. I would appreciate any help. Even if you have answered this before, please say so so I could search the forums using your name and find your post.

What I have:

CPanel
Apache 1.3
PHP 4.3 as an apache module
MySQL
SuExec
A user and group “sam” in the virtual host container for SuExec use. I am not familiar with perl programming.

My main problem is that MySQL user name and password is visible to other users on the server if they log in using SSH or telnet and brows and read my PHP scripts. I did read many posts but I am not sure about how to solve this problem.

I think I know what I need to do but please confirm or correct my understanding.

1.Can I install PHP as a CGI binary under my home directory even though I don’t have root privileges on the server and how and where should I setup the php.ini file?
2.Would that cause any problems for the other user on the server or for apache?
3.If I run PHP as a CGI will I be able to change PHP configuration using apache .htaccess files or will that only effect the PHP module configuration?
4.Is it possible to have some PHP scripts ran by the PHP module and some by the PHP CGI binary by setting different extensions or directories for the scripts?
5.The only way I can hide my password in these scripts is if I chmod to 700 and run them as a CGI script using SuExec.
6.If I only have one script (say secure.php) with passwords and other configuration information and give it access rights of 700 (to protect it form other users,) how can I include that file in other PHP scripts?
My understanding of this is if apache is running a php script using its php module and the script has an include for the “secure.php” file it can’t include it because it doesn’t have access rights to it. Now, if apache recognizes “secure.php” as a CGI script, it will try to use SuExec and run it and then return to the including script. Is that correct and will the variables and environment be the same? In other words, if I set some variables in “secure.php” and use include from the main script, will the main script have those variables even if “secure.php” is ran by the PHP CGI binary?
7.Should I just run all the scripts as CGI with SuExec and avoid switching between the module and the CGI PHP interpreter.
8.Is there any better solution for this problem other than having a dedicated server?

View Replies !
Using MS Access To Hold The Data And PHP To Collect The Data From The Database
I am using MS Access to hold the data and PHP to collect the data from the database and display it on a website. I've got the results displaying in the normal way with data being displayed in a linear manner e.g. Code:

View Replies !
Saving Mysql Data To CSV File
Does anyone now how to save Data from a mysql database to a comma delimited file that can be read by excel.

View Replies !
Write Mysql Data In A XML File
How can I write Mysql data in a XML file using PHP for RSS? Do you have examples?

View Replies !
Name Of File That Stores MySQL Database Data
I need to recover my database from a backup after a system crash. What is the file name (extension) that stores the database information?

View Replies !
Export MySQL Data To An Excel / CSV File
I've been trying to export MySQL data to an excel / CSV file, and I have it pretty much populating the Excel properly with the data; however, the Excel sheet also includes the entire HTML formatting + CSS/JS coding before the export code. I've tried getting rid of it with strip_tags, to no avail. Is it because the export code is to the middle of the file? I tried to move it into the header, but that didn't work either. Any ideas? Code:

View Replies !
How To Pull 1 Line Of Data From A File? NO MYSQL
I have this file that has 2 lines in it. Heres how the files looks.

file: fbddata.lbn

line1:uncle1234562
line2:

As you can see, on line 2 there is actually no data but the file still seems to have a 2 lines. But when I pull the info from the file using the "include" or "require" command it just pulls the 1st line of data. BUT..when I try to use the "include" or "require" php commend within a HTML link code like this....

<a herf="www.mysite.com/Lavishphpfreak/<?php include("fbddata.lbn" ?>/ilovephp.php>LINK[/url]

it gives me a link that this...

http://www.mysite.com/Lavishphpfreak/uncle1234562
/ilovephp.php

now did you notice the code that was added to the link. I have figured out that its doing this because of the blank line 2 thats in the fbddata.lbn im trying to pull the data from. Of course the easy way to fix this would be to just go into the file and delete the blank like 2 but i can't do this because i dont have permission to edit the file. Its created using "root".

So does anyone know of a php code that will just pull the 1st line of data from within a file. I can't use mysql cause this is NOT in a database..and plus I haven't advanced to databases yet.

View Replies !
How To Convert MYSQL Data Result To Csv File Format.
How to convert MYSQL data result to csv file format.

View Replies !
Read An Excel .xls File And Import The Data To MySQL
I am looking for a way to read an Excel .xls file and import the data to MySQL. I do not want to go the route of exporting the data to .csv or .txt.

View Replies !
<input Type=file> How To Update Form Data In Mysql
i have been struggling with a problem with file uploads and mysql for a while on and off and have recently dug out my php bible to learn some more i figured out, after a lot of reading and hours of trial and error, how to use a html form to upload text and file paths into a mysql database.

i`m a relative newbie, so i`ve not had time yet to try everything out. my problem is when i use <input type=file> i save the path to an image etc that i have uploaded in a mysql db, but if i want to change any of the text data within my form i cannot keep the image path in the db, but i have to browse for the image again or it will be a broken link? Code:

View Replies !
Exporting Data From A MySQL Database To My Computer In CSV File Format.
I am interested in exporting data from a MySQL database to my computer in CSV file format.

View Replies !
Importing A Flat Pipe Delimited File Into A MySQL Data Table
I have done this in perl but eeew I don't want to use perl anymore. I
want to be able to take a flat file that looks like this:

mbriones@...|Marian|Briones
bobsmith@...|Bob|Smith
janedoe@...|Jane|Doe
(etc)

The table has more than 3 fields, so I'd want to process the flat file
and then do an INSERT into mailinglist SET field=$value for each line.

Does someone have a nice way for me to do this? The flat file will be
uploaded to the server via a form (copy) and then be processed.

View Replies !
PHP - Data From Access Db
I'm using the code below as a base for a connect to an access
database.
This works well, but I have an issue...

<?php
$db = "./access.mdb" ;
$pass = "1234" ;

$conn = new COM("ADODB.Connection") ;
$sql = "DRIVER={Microsoft Access Driver (*.mdb)} ;
DBQ=". realpath($db) ." ;
uid=admin ;
pwd=$pass ;" ;
$conn->open($sql);
$rs = $conn->execute("SELECT * FROM TableName");
while (!$rs->EOF) {
echo $rs->Fields['FieldID']->Value ;
echo $rs->Fields['FieldName']->Value ;
$rs->MoveNext() ;
}
$rs->Close() ;
$conn->Close() ;
?>

using this:
while (!$rs->EOF) {
echo $rs->Fields['FieldID']->Value ;
echo $rs->Fields['FieldName']->Value ;
$rs->MoveNext() ;
}

View Replies !
Warning: File(): URL File-access Is Disabled In The Server Configuration
Does any one know how to work around this error on a web site?

Warning: file(): URL file-access is disabled in the server configuration ...

View Replies !
Using PHP To Access WinAmp Data
Does anyone know of a way to use PHP to display on a web page the playlist (m3u) information for a file currently being played by winamp?

Note this is not about *controlling* winamp, but accessing data in real time to display current file / playlist name being played.

View Replies !
Access Data In Webpage
I have a data base in access having 6 columns and around 120 entries. I want some script or some coding through which I can extract the data into a webpage.

for example say if I create a link with TTT and on clicking this TTT the next page should display the results from database in a webpage in table format ..

View Replies !
Data Access Class
I'm working on a class to access a MySQL database. One function I'd like to have is one that lists the records in a table. But, I'd like to be able to read from a loop. Ex:

while ($x = $class->function())
{
echo $x['fieldname'];
}

View Replies !
Enter Data To Ms-access
i have a problem to enter information(record) to ms-access in php i have a error:

"Warning: odbc_do() [function.odbc-do]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement., SQL state 37000 in SQLExecDirect in C:Documents and SettingsAdministratorMy Documentsdb7.php on line.

View Replies !
Connecting To An Access Data Base
i want to connect to a Access data base but dont know how to do it. also how would u add more rows if needed and how would u write to the cells in the tables.

View Replies !
Access The BLOB Data Type
How should I access the BLOB data type using PHP from a MYSQL database ?

View Replies !
Importing Form Data To Ms Access
Does anyone know if one can import a web form data into ms access db? Does the ms access db have to be on the same server as the web form?

View Replies !
Access Those Session Data Through Cookie
Now I just want to know if this is correct, if i store information in my session and i have a javascript cookie class, i can access those session data through cookie, correct because all a session really ism is a cookie, right?

View Replies !
PHP And CSS - Storing The Data In An Access Database
I am creating a web based calendar for tracking appointments. I am storing the data in an access database(may go to MySQL later)I have three different catagories that i would like to display with different backrounds and font colors.

View Replies !
Access Anonymous Ftp And Parse Data
Hello everyone. I'm definately a newbie at this so go easy. I am trying to get together a script to access some aviation weather from noaa. They have an anonymous ftp server that you can access txt files with weather data in them. I'd like to make a script to access the airports from a specific state (which are defined in the script which airports for which state) and echo that to an html file. The script would have to 'find' the airports in the txt file then parse out the info. Here is an example of what's in the data files.

Code:
2006/01/18 17:00
GCFV 181700Z 190024 35006KT 9999 SCT030
BECMG 0911 10007KT
TEMPO 0818 VRB03KT

2006/01/18 17:00
GCLP 181700Z 190024 01010KT 9999 FEW030
BECMG 0911 06008KT
TEMPO 0818 VRB03KT

2006/01/18 17:00
GCRR 181700Z 190024 35006KT 9999 FEW030
BECMG 0911 09007KT
TEMPO 0818 VRB03KT

2006/01/18 17:00
GCTS 181700Z 190024 05008KT 9999 SCT030
BECMG 0911 15008KT
TEMPO 0024 VRB03KT

Can someone kind of point me in the right direction on how to do this?

View Replies !
XML Parsing - Easy Way I Can Access The Data?
I hate XML it drives me nuts I have some results from the shopping.com API which is lovley but I can't do anything with them. Is there an easy way I can access the data? Code:

View Replies !
Access A Website, Fetch The Data, And Then Logout
I need to access a website, Fetch the data, and then logout. Please
tell me where I am wrong. I dont think its logging out properly.

<?

include "Snoopy.class.php";
$snoopy = new Snoopy;

//Logging in
$submit_url =
'http://www.sortingcodes.co.uk/FormsLogin.asp?action=login&URL=Default%2Easp'
$submit_vars["Username"] = "Username"; //my username
$submit_vars["Password"] = "Password"; //my password
$submit_vars["Submit"] = "Go";
$snoopy->submit($submit_url,$submit_vars);

//Requesting for info
$snoopy->setcookies();
$submit_url =
'http://www.sortingcodes.co.uk/Results.asp?type=Sortcode&Page=1&Sortcode=402343'
$snoopy->fetch($submit_url);
echo $snoopy->results;

//loggin out
$snoopy->setcookies();
$snoopy->fetch("http://www.sortingcodes.co.uk/logout.asp");

?>

View Replies !
MS Access Data Stored In Arabic Language
am retriving data from MS Access MDB file ... database ... the probem is the data stored in arabic language, and when i get the result each arabic word appears Code:

View Replies !
Access Button In HTML File Through PHP File
I’m new to PHP and I’m working on a code and having a problem .
The problem is that I’m having an HTML file like this :

////////////////////////////////////

<p>some text</p> <form action="/project/myfile.php" method="post"> <input type="button" name="mybutton.1" value=" mybutton "><input type="text" name="aaa" /> </form>

<p> some text </p> <form action="/project/myfile.php" method="post"> <input type="button" name=" mybutton.2" value=" mybutton "><input type="text" name="aaa" /> </form>

//////////////////////////////////////

I want to open a new HTML file to the user when he clicks on any of these buttons . I want to do this in the file named “myfile.php “ . What should I write in the file “myfile.php “ to get access to each button and open a new page when the user clicks on it? Is it correct to put " action="/project/myfile.php""? Should I put include the HTML file in my PHP file? I want also to remember which button the user clicks on.

View Replies !
Multi-dimensional Arrays - Use Foreach() To Access The Data?
If I have a 2-dimensional array where the top key is year numbers (e.g. "2003"), the second key is month numbers (e.g. "8" to represent August), and the data stored is some cardinal number, how can I use foreach() (or anything else) to access the data?
I want to write one line of HTML for each year, along the lines of:

2003 [ 8(23) ]

assuming that 23 would be the cardinal number stored at $array[2003][8].
I s'pose what I'm trying to do is use the key, which is an array, as a string to print out. Or maybe I'm just confused? PHP Code:

View Replies !
Code To Insert Data Into An Access Database Using Odbc Commands
I developed some code to insert data into an access database using odbc commands, and my code is below. PHP Code:

View Replies !
File Cannot Be Access
I am trying to access a series of files in one directory. Currently there is only one file located in it. But the coding that I am trying to use can not access it for some reason Here is the coding of which I am having problems with PHP Code:

View Replies !
Cannot Access File
I have an issue that I cannot resolve. I have a program that runs on a windows machine that opens a file on a network share and processes the contents of the file. This process works fine when I run the job by clicking on the program. When I run the program throught a PHP script using exec an error message saying that the the file cannot be found. If I run this same program using exec except that I point to the same file that has been copied to a local drive I have no problem opening it and processing it.

View Replies !
File Access
I have made a simple login page to protect my photos. But then I realized that people can still access the photos by typing their path in url.

http://myhost/image.jpg

View Replies !
MySQL Vs MS Access
Thats right, I did say MS Access...

Excuse me for not putting this in its proper MySQL forum, but I have seen some great debates recently transpire regarding technology choices, and I am in desperate need of expert opinions!

My employer was recently bought out by another web development co. that unfortunately (for me) they specialize in ASP development... The funny thing is they don't even utilize MS SQL Server, they use MS Access. At first, I was astounded... Did they know something that I did not... Even Microsoft themselves have put huge warning signs all over their MSDN regarding Access's use over the internet...

I was scared to even suggest this to the managers, for fear that they knew some way of avoiding the fact that Access does not possess the power that MySQL or SQL Server (for that matter -at least) do!

In fact, I was dead wrong... They didn't know a thing! I even got in a debate with the lead Access "developer(?)"... He didn't consider MySQL to be a relational database because it 'did not support cascading modifications or referential integrity'... As well as it does not have a GUI considerable to MS ACCESS... I really just wanted to laugh at him, but I instead argued the usual points regarding portability, cost, as well as its close partnering with all of the available PHP functions for MySQL.which lead to a faster more effecient development process.

I know that this message seems a bit on the immature side, but I am honestly not sure how long this company will survive if they are telling their customers to use Access (we just got contracted to do a large financial provider's website today - the managers are actually considering to advise Access!)...

Anyone that can help me bomb these clowns with success stores (MySQL) or disaster stories (Access), as well as any other info, I would greatly appreciate it.

View Replies !
DB Access To DB MySQL
How is the simply way to transfert a DB Access with PHPMyAdmin to a DB
MySQL? Exporting each table from access in format .csv, I have a little
problem to insert them correctly with PHP my admin.

View Replies !
I Haven't Access To Mysql NG
I haven't access to Mysql NG, so let me ask here.

Query:

select distinct a,b from a left join b on a.id = b.id

table b:
id datefrom dateto
1 2005-01-01 2005-01-15
2 2005-01-02 2005-01-16
1 2005-01-17 2005-01-31

In my case, I'd like to show the last date for any ID.
So the result:
1 2005-01-31
2 2005-01-16
3 -

How to do so ? In my case, I get two rows for ID 1

Must I run 2 queries ? It's really hard to create a query with GroupBy, as
the real query takes 20 fields

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved