alex1985
Apr 24 2008, 10:34 AM
| | I did create this topic mainly because I want to know everything about that configuration file. I will post other replies if I want to know more depending on your experience.
Is this code correct for that file:
CODE <? $host="localhost"; $dbname="XXX"; $dbuser="XXX"; $dbpass="XXX"; $connection=mysql_connect($host, $dbuser, $dbpass) or die(mysql_error()); mysql_select_db($dbname) or die(mysql_error()); ?>
Add your suggestions or improve it. |
Reply
jlhaslip
Apr 24 2008, 01:47 PM
CODE <? $host="localhost"; $dbname="XXX"; $dbuser="XXX"; $dbpass="XXX"; $connection=mysql_connect($host, $dbuser, $dbpass) or die(mysql_error()); mysql_select_db($dbname) or die(mysql_error()); ?> It looks like it is a "typical" configuration file, but you need to replace the "XXX" with the correct data for your account and MySql information. Localhost is correct for a trap17 account, the dbname and dbuser will be prefixed with your trap17 account name and an underscore so that it would become jlhaslip_ followed by the actual name of the database. The password would be specific to your database, too. You need to have the database built using the MySql selection in the cpanel and a user/password also needs to be previously created and allowed the privileges for the database.
Reply
alex1985
Apr 24 2008, 06:28 PM
If there is a more stuff to write that configuration file based on security issue?
Reply
jlhaslip
Apr 24 2008, 07:43 PM
Not really, that I am aware of. Be sure to safe that file with a PHP file extension, though, in case someone links to it. When you use a php file extension, the contents can not be read in a Browser since there are not echo commands. You also might want to save it using the "common" inc.php file extension so you know that it is a file to be "included" and that it is a php file. file name would become: "mysql.inc.php" then include ("mysql.inc.php"); is what you would need in the php file which calls the include. Another security issue would be to store the "mysql.inc.php" file outside of the public_html folder so that it is not available via the web, only by the php parser. Then you would access it using include ("../mysql.inc.php"); (assuming the calling file is in the public_html folder.
Reply
alex1985
Apr 24 2008, 09:27 PM
SO, you mean it's better to use like db.inc.php instead of confg.php?
Reply
jlhaslip
Apr 24 2008, 11:49 PM
galexcd
Apr 30 2008, 03:56 PM
I wouldn't suggest putting this file in the public_html folder. Put it up one directory in your root folder. This should keep your password hidden if the php parser were to ever break.
Reply
mafiastreetz
May 3 2008, 11:32 AM
CODE <?php $_CONFIG = array( 'hostname' => 'localhost', 'username' => 'xxxxx', 'password' => 'xxxxx', 'database' => 'xxxxx', 'persistent' => 0, 'driver' => 'mysql', ); ?> Wouldnt that be alrite for the config php aswell as thats what i use??
Reply
galexcd
May 3 2008, 03:23 PM
QUOTE(mafiastreetz @ May 3 2008, 04:32 AM)  CODE <?php $_CONFIG = array( 'hostname' => 'localhost', 'username' => 'xxxxx', 'password' => 'xxxxx', 'database' => 'xxxxx', 'persistent' => 0, 'driver' => 'mysql', ); ?> Wouldnt that be alrite for the config php aswell as thats what i use?? well if you did that then you would have to connect to sql in every single file, just taking up your time every time you want to add a new file.
Reply
Recent Queries:--
how to write php code read config.php file - 15.73 hr back.
-
upload flat file with php - 98.22 hr back.
-
php write a html file - 117.62 hr back.
-
php configuration include - 148.06 hr back.
-
loose php configuration - 171.66 hr back.
-
php configuration files forms - 176.05 hr back.
-
php advanced transfer manager config.php - 389.70 hr back.
Similar Topics
Keywords : php, configution, file, config, php
- Search For Video Files And Display Them
Using a batch file in windows (0)
Html Ascii Codes - A Complete List
downloadable php file (3) I was often frustrated at how, despite there being thousands of ASCII "special characters" such as
&8659; , websites that claimed to list them all only listed the first 256. To combat this issue,
I have created a table which lists the first 10,001 - from � to &10000; I am sure
there are many more but it is simply not feasible to create a table with many more rows as viewing
it would put terrific strain on the browser.! You can download the file in two forms. One uses
PHP to dynamically create the table (1KB), the other has it ready-made in pure HT....
How Many Times Was The File Taken?
Counting downloads (5) I was wondering if someone could help me with the following: On my website there is a small file
which can be downloaded. I would like to be able to monitor how many times it has been downloaded,
the result does not need to appear on the site, it is just for me personally. Has anyone got some
code in HTML or PHP which can achieve that? Thanks in advance. ....
Canadian Tax Software
Free Tax Calculations and e-file (0) http://www.studiotax.com/en/main.htm Download the StudioTax Canadian Personal Income Tax software
from the above link. Fantastic piece of software. The input forms mimic the actual paper documents,
line numbers are the same, easy to follow directions, in general, a really useful piece of software.
Approved for electronic submission to speed the process. No paper to mail in. (Although you should
save the receipts and stuff for 7 years) Allows for all the Standard forms, like for reporting
self-employed Income, etcetara. It doesn't work for all returns, but I imag....
Need Some Help In File Browser
listing all sub folders and files in them. (8) Hey I want to create a very simple file browser, so that, it reads all the sub-folders which are
places in a directory, and the files inside the sub-folders (It reads only files inside sub-folders
and list them in simply. ) Also, it creates a directory (any name) inside each sub folder. My
Following code reads on the files inside the main directory, it does not read the files inside the
sub-folders.. I appreciate any help. CODE <? $path = "./"; $dir_handle =
@opendir($path) or die("Unable to open $path"); whil....
Rappelz Players! I Need A Missing File! [resolved]
Help please! (4) Ok... so I spent all night downloading Rappelz, all this morning installing it and making room on my
pc.... and guess what.... I'm missing one file.... so now it refuses to work. So if anyone
plays Rappelz could they upload 'd3d9.dll' so a file sharing site, etc. and pm me the link
please. Your help would be greatly appreciated.....
Timer Command In Dos
batch file help (4) I wish to execute a command at regular intervals .....precisely every half an hour....Is there any
Dos command which can do it I havent found any so far...and i've heard there are no timer
commands in DOS. So how should i go about it...i want the batch file to be executed at regular
intervals....any external process or application that will invoke it?????....
Updating Php File Through A Web Form
(5) Hello, i'm not sure if this can be done with php or not but what i need is a way to make an php
file that have an html form on it and it will take the info you put in to that form and write it to
an existing php file, for example: if i have the file news.php and the file news_update.php. if you
went to news_update.php you would get an form with a text area for you to write a new addition for
the news.php file and when you hit submit it will add what you typed in the form to the file
news.php. If this is going to be a big code or a hard one to make but some one think....
Ftp Problem
zero file-length? (8) I'm using FileZilla right now, and trying to upload a second copy of WordPress onto the account
to use as a comic repository. For some reason, a lot of the files are missing, and when I look into
the folders, I see that a lot of the files have a filelength of 0. What gives? Could someone
please help me out?....
I Have Received One File Called As { Read Joke.doc }
it says your task manager is disabled (9) Can any one help out I have recived one file called as { read joke.doc } after download the file I
open the file in the file contain is { read jock.exe } I did not fine any contain so I close the
file I try to delete the file but its not deleting so I ignore then I try to open regedit,
msconfig, task manager, etc its not opening its say your task manager is disabled then I thought it
may be virus so any one tell me what to do I don’t want to format my system and I need best solution
tell me how to enable the services....
File Sharing Hosts
$?$ (6) Any own knows the file sharing programs which pay you money for your downloaded files. Who knows are
free to reply in this topic. I know just two of them: 1. www.depositfiles.com 2. www.uploading.com
And I'm not actually satisfied with them, because the downloading speed is too slow. Imagine,
someone want to download you uploaded files, for what your account is getting credited, and the
downloading speed is slow, therefore, the users might cancel due to download speed. So, your files
may not be downloaded frequently, then, your getting less money. That's main ....
Question Regarding File Transfer!
FILE TRANSFER (3) Hi friends, I am looking for a secure and robust file transfer web service. I am handling a sales
force which is stationed at different locations and is frequently moving. They need to upload there
activity reports frequently to our servers. So I am looking for an easy to use secure and robust
file transfer web service which can be used by my sales force for their needs. Thanks & Warm
Regards. ....
Iframe Src = A Local File In My Computer
(6) Is it possible to call a file, i.e. 1.htm, from my web browser using such tag HTML iframe src
=" file:///C:/1.htm "> /iframe > file:///C:/1.htm is the correct path since when I
enter it to my web browser's address box it shows up properly. But when I use the same call
function in my PHP it does not. My situation is that I'm running Apache with PHP, therefore I
am running my own mimi-webserver on my computer. There's no risk of someone else accessing my
file because it's for my testing purpose. I thought it had to do with some Apach....
File
(1) There are several signs to take note as you access your computer daily. This need not necessarily be
a conscious act of scrutiny. But as you work around with your machine and stumble upon a hiccup, it
may be advisable to check your disks and files for errors to minimize the chances of further
extensive damage . Alike your physical health, always perform a checkup when you sense something
dubious. Petter Smith http://www.hdrconline.com ....
Secure File Transfer For Mainframe Systems
(2) Hi guys, I would like to transfer files from UNIX machine to Mainframe system (using UNIX machine as
client). The transfer process needs to be secure (i.e. data sent thro network should be encrypted
using 128-bit encryption algorithm). I came to know that SFTP server is not available for Mainframe
systems and hence using SFTP is not an option. Please let me know any other alternatives for the
"Secured File Transfer to Mainframe system". Thanks! ....
Install An Aef Forum Onto The Trap17
From a zip file (11) Installing an AEF Forum on the Trap17 Server Preparation for Installing the AEF Forum
The following items are required for the installation of the packaage onto your site: 1. - a copy
of the AEF Forum zip package from http://anelectron.com/download.php 2. - a MySql Database 3. - a
Database User 4. - a password for the Database User 5. - Privileges allowed for the Database User
The details for ensuring that you have all of these items are as follows: 1. - a copy of the AEF
Forum zip package from http://anelectron.com/download.php . Simply browse to t....
Windows Ntfs Folder And File Compression. Good Or Bad?
(5) I believe everyone in this forum knows what a file system means and that every windows user knows
what FAT and NTFS means so I am not gonna start going into those. Well, the NTFS (Windows NT file
system) offers a few advantages over the good ol' FAT (File allocation table) file system one of
which is the files and folders compression. This I have done quite a number of times to save disc
space (and it really does save some disc space). i am using my computer as an example here. Consider
my 35GB partition which is carrying my Windows Vista Operating sys and has less ....
Flat-file Cms
tutorial inspired by jlhaslip (4) Ok, for this tutorial i am only going to show you how to add updates to your site simply by storing
the information into a text file, and then displaying it with predefined formatting... OK lets get
down to business... Lets start out by making a PHP file and call it mycms.php put this code at
the top of the page. What this will do is allow us to edit the selected update when it comes time
and show and hide the add an update field and validate the form.. <script
language="javascript"> function ShowHide(id1, id2) { if (id1 != '') expMenu(id1)....
Need Help With A Network / Printer Lock Up
Cannot delete file in que, so no printing can be done (7) Ok, so the way the network is set up is like this, (with more computers but this is just an example)
Computer (a -----> network hub ^ l l l v Printer (1 So computer (b
tryed to print a document on printer (1, now at the top of the que (since 7 this morning, it is now
7 in the evening) is that document, at about 8 this morning the printing task was "Deleted" so the
current status is "Deleting printing" but in no way will it delete the printing (it has had I have
tryed to delete the printing from Computer (a and Computer (b and i have res....
What Happens To A File When You Delete It From Windows ?
(14) now have you ever wondered what happens to a file when you delete it and empty the recycle bin ?
surely it should not be in the computer by then ?? well i ahd a big sprise waiting for today morning
when i turned on my computer , i will tell you waht happened , yesterday a colleague of mine put sum
flash files on my desktop and when i went home i deleted them and emptied recycle bin assuming he
should have made a copy and has taken to his computer , but when i turned on my office computer this
morning the files i deleted were sitting right on my desktop again !! b....
How To Open A .daa File
(27) Hi there, How do i have to open a file with extension .daa Somebody told me to copy it on cd and to
run it from cd rom but i got the same problems. What dp i need to do to ppen the file? Thanks....
How To Put Music In The Background Of A Powerpoint Presentation
without having the viewer download the music file (6) Well, i made this power poit presentation in memory of my grandfather as many of you kno, passed
away exactly a week ago....and i am trying to get this song to play as background music..and i did,
but there is one humongus problem... in order for the people who are viewing it to hear the
background music they have to download the music file as well ad the powerpoint presentation, which
on my DSL conntection taked almost 2 minutes, and i could just imagine what it will be for a dial-up
user (my grandma who wants to see it)... Some people may say, its impossible, but i kn....
Simple C File Handling In Action
Small code snipet which covers most of basic file handling and navigat (2) Yesterday I suddenly got a lot of work. The same work we try to push off, yes you are right all
formalities to get the code review incorporated and update all source code files with code review
headers. Imagine if you need to open 300 files one by one and append code review headers at the
end. Since most files are reviewed in groups of 20 to 30 files. We require one header to be placed
in say 20 to 30 files. To simplify I went back to my class assignment days and wrote this small c
utility to open all files passed on command line and open attach code review headers an....
Cannot Delete Folder After Lost Ftp Connection
permission not given to delete file (7) hello, well i had created a subdomain and was transferring files into the folder i was disconnect
from the server many times while uploading the files via ftp once when i reconnect, i saw a file
with an unusual name something starting with preftp... i tried deleting the file, but it said that
permission was not granted to do that i tired deleting the complete folder and also tried deleting
the subdomain from the cpanel but it was of no use can anyone help me with this? thx for your time
Modified topic title. ....
Css Cal Config Client
CASEYS config (5) Casey's Source Config & Tweak Guide Last Updated: 12/18/05 Below is my expanded tweak guide
for getting the best performance out of CS: Source. Drivers First and foremost, drivers are key to
performance; but not all drivers are created equal, and no one driver is right for every card. It is
up to you to research and test to find the best driver for your specific card. However, below are
some generally recommended 3rd-party drivers for your brand of card. One thing to keep in mind: Just
because a driver is newer doesn't mean it's better. You'll need to....
Include File.php?id=something
using the include() function (13) Well, I am making a full CMS system for my site, and want to make the index.php file to include the
view.php?id=1 file. I tried with this code, but it didn't work: CODE <?php include
'view.php?id=1' ?> This is the error I get: CODE Warning:
main(view.php?id=1) [function.main]: failed to open stream: Invalid argument
in C:\server\xampp\htdocs\test\index.php on line 1 Warning:
main() [function.include]: Failed opening 'view.php?id=1' for inclusion
(i....
My Review Of Megaupload.com
File Sharing Service (23) I'm sure most of you have heard of Megaupload, a service which enables you to upload your files
to their server and share it with other people for free. I use such services so that I can share
unlicensed manga through my site. Well, here's my review, and a bit of a rant at the end...
/happy.gif' border='0' style='vertical-align:middle' alt='happy.gif' /> UPLOAD: 9/10 It's so
easy! All you have to do is click on the browse button and choose the file you want to upload.
Then, fill up the other options in the bottom when necessary. Send it and watch it ....
How To Delete An Undeleatable File...
on your computer! (27) Open a command prompt window and leave it open. Close all open programs. Click Start, Run and
enter TASKMGR.EXE - go to the Processes tab and End Process on Explorer.exe. Leave Task Manager
open. Go back to the Command Prompt window and change to the directory the AVI (or other undeletable
file) is located in. At the command prompt type DEL where is the file you wish to delete. Go
back to Task Manager, click File, New Task and enter EXPLORER.EXE to restart the GUI shell. Close
Task Manager. Jack.....
Import From Excel File Into Mysql Database
(5) Has anyone tried using the excel import function that comes with phpmyadmin
http://www.phpmyadmin.net/home_page/ - it does not require any additional plug-ins or scripts and
is fairly straightforward to use. In phpmyadmin, if you click on the database table which you wish
to import the data to , there is a link on the bottom left corner which says "insert data from a
text file into the table" - although it says text file it still can be used to import an excel file.
When you click on this link you will be taken to a page where you will be asked for the file name
(the....
Script: Php Jukebox
A one file script! (3) This scripts is so simple, you dont need to edit ANY of it! All you have to do is make a folder
called 'songs' and put some audio files in it. Here is the whole page, I named it index.php
and put it in a folder called 'music': CODE <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
<title>PHP jukebox</title> </head> <body> <!-- ©2005 Craig
lloyd. All rights reserved. Visit cragllo.com for more sc....
Looking for php, configution, file, config, php
|
|
Searching Video's for php, configution, file, config, php
|
advertisement
|
|