Page 1 of 2
what do i do!!
Posted: Mon Jul 04, 2005 4:07 am
by gaogier
I am tring to install a topsites database but there is an error.
Warning: fopen(./config.php): failed to open stream: Permission denied in /home/gaogier/public_html/top100sites/install.php on line 185
You do not have permission to write to ./config.php Make sure you CHMOD 666 config.php
Here is the correct lines of the code
Code: Select all
\$CONFIGї'version'] = '4.2.2 (2005-01-10)';
\$TMPLї'version'] = \$CONFIGї'version'];
?>
EndHTML;
$file = $FORMї'path']."e;/config.php"e;;
$fh_config = fopen($file, "e;w"e;) or die("e;You do not have permission to write to
"e;.$FORMї'path']."e;/config.php Make sure you CHMOD 666 config.php."e;);
fwrite($fh_config, $newconfig);
fclose($fh_config);
Line 185 is $file = $FORM['path']."/config.php";
what do i need to do?
Posted: Mon Jul 04, 2005 4:50 am
by Chris Corbyn
Moved to PHP Code
Posted: Mon Jul 04, 2005 4:51 am
by Chris Corbyn
I guess the error nicely devugs that one for you
Use FTP to CHMOD config.php to 666.
Posted: Mon Jul 04, 2005 4:59 am
by gaogier
FTP??
what mean?
Posted: Mon Jul 04, 2005 5:24 am
by Chris Corbyn
FTP... the protocol you *probably* use to upload your files to the server.
If you are hosting from your own machine then it's just a case of chaning the permissions for the file.
On unix it's simply:
Via FTP you issue the same command but if you use an FTP program with a GUI like WS_FTP you right click the folder and choose CHMOD, then type 666 in the value field.
CHMOD is just the command for changing file permissions (i.e. read/write/execute)

Posted: Mon Jul 04, 2005 5:38 am
by gaogier
o ya i remember, i had one, then my pc went so i havnt got it back yet, where i can i get a free one untill i can get my old one back?
Posted: Mon Jul 04, 2005 6:05 am
by Chris Corbyn
Free free free....
Open a command line and type the follwoing... you need to learn FTP command for that though.
Code: Select all
ftp
ftp> o servername.com
User: username
Password:
Welcome blah blah blah
ftp>
There's quite a few GUI ones too. WS_FTP has a free trial I believe.
A quick search in Google should provide some links (or a search fro "FTP" on
http://www.download.com/)

Posted: Mon Jul 04, 2005 6:26 am
by djot
see filepermission of the file you wanna access, also check the folder/path:
<PATH>."/config.php";
Posted: Mon Jul 04, 2005 7:09 am
by gaogier
im going to uplad all again, i think i could of missed somethings
Posted: Mon Jul 04, 2005 7:19 am
by gaogier
ftp is not connecting Y? whats the host name?
Posted: Mon Jul 04, 2005 7:22 am
by djot
-
See help/support of your webhosting company... (sometimes it's just your domainname, ftp.yourdomain.com or yourdomain.com, or some server address of the company userXY.companyname.com)
djot
-
Posted: Mon Jul 04, 2005 7:36 am
by gaogier
thanks
fixed
Posted: Mon Jul 04, 2005 8:19 am
by gaogier
more problem creaping up!!
Warning: Cannot modify header information - headers already sent by (output started at /home/gaogier/public_html/topsites2/config.php:55) in /home/gaogier/public_html/topsites2/out.php on line 68
here is hte line
Code: Select all
header("e;Location: "e;.$url);
Posted: Mon Jul 04, 2005 8:21 am
by Chris Corbyn
*yawn* Search
There must be at least 100 posts on this topic alone on this forum... look at lines
above that one. If anything sends output back to the browser then the header can't be sent since headers come before page content.
Posted: Mon Jul 04, 2005 10:10 am
by John Cartwright
hey ma! we got a tutorial on this!
viewtopic.php?t=1157