leiaah
Feb 14 2005, 01:19 PM
| | Can anyone help me with this error?
Warning: fopen(guests\guest.txt): failed to open stream: Permission denied in /home/leiaah/public_html/images/goguest.php on line 28
Warning: flock(): supplied argument is not a valid stream resource in /home/leiaah/public_html/images/goguest.php on line 30
This is part of the code I wrote
// open file for appending $fp = fopen("guests\guest.txt", 'a');
flock($fp, LOCK_EX);
This works well with my offline server but I'm having the error after I published it and when I view it online. Help! |
Reply
finaldesign
Feb 14 2005, 02:21 PM
QUOTE(leiaah @ Feb 14 2005, 02:19 PM) Can anyone help me with this error? Warning: fopen(guests\guest.txt): failed to open stream: Permission denied in /home/leiaah/public_html/images/goguest.php on line 28 Hello there.. Now this is easy. The problem is in file permission system. When you run it on your computer (with server installed) it works because you are administrator of computer, and you have all access rights... On the other hand when you upload code and file guest.txt to web hosting server you must give pleople public access to that files, now *.php files are by default accessible, but you must give an access to that GUEST.TXT file where you write via php page... Now, how you can do that? If you know how to use unix/linux it's pretty easy, but if you login to you trap17 cpanel you must change it via filemanager, or alternatively you can use some of FTP clients to do that directly on server... Example: connect to your webhost server on trap17 via some FTP program (like CuteFTP) and rightclick on file guest.txt and choose CHMOD... (in some other FTP program thing's may be different, but this is generaly same....) then change chmod into number 777 - that way anyone will gain access to that file... I assume it's your guestbook...  feel free to contact me if you do not understand what I've tryeed to explain here... 
Reply
leiaah
Feb 14 2005, 04:26 PM
Thanks I've set the permission already. But again I'm having a few troubles with the same line of code // open file for appending $fp = fopen("guest.txt", 'a'); flock($fp, LOCK_EX); guest.txt and the php file reside on the same folder so what do you think is the problem? Thanks again.
Reply
leiaah
Feb 16 2005, 12:41 AM
It works already thanks a lot! I'll give you reputation.
Reply
Similar Topics
Keywords : error, files, streams
- How Can You Get Audio Files From Itunes Videos?
(1)
Naming Web Page Files
Which way you like- MyPage.html or my-page.html or my_page.html (5) Everybody talks about meta tags, keywords, good title names and how they can increase page rankings,
etc. But I was wondering whether the page name itself holds any value in indexing. Yes, I am
talking about the web page file names (some-thing.html) NOT the one which you put in title tags. I
am going to express my views and want to know what you think is correct. I have seen pages named in
various ways like these: 1) my_web_page.html 2) DoYouLikeMyPage.html 3) hey-see-my-webpage.html (I
think this way is more appropriate) 4) this.is.a.page.html (somewhat confusing) ....
Audio Files?
(3) I need some help. Is it possible to get audio files off of sites? Like IMEEM and YouTube. I know the
whole http://www.file2hd.com thing. It doesn't always work though. Are there other ways? Is
there a way people hack audio files off of sites? NOTE: I DO NOT WANT DO THIS! I merely want to
know so that I can protect my sites from it. Thanks.....
Jar Executable Files
(1) I have been supplied with a digital log book for use this semester and it comes in the form of a
.jar file and a .mdb file. I tried running it on my mac but it crashes every time but it seems to
run perfectly on windows xp. Does anyone have any ideas why? I thought .jar files would be
computable on any platform. ....
Help Me _ Error Message: "could Not Retrieve Session Record"
IPB-Forum error message (2) Hi ... Please I need help quickly ... I am an administrator of a "IPB-Invision Power Board Forum"
and I cannot login in the ACP (Admin Control Panel) anymore. When I write the user name and password
both are accepted and the login is successfull but then suddenly I get an error message that says:
Could not retrieve session record What can I do to solve the problem ? Please help me
!!!!!....
Phpbb3 - Error 28
(5) I get the following error when I try changing a users group of my Phpbb3 powered forums. QUOTE
SQL ERROR Got error 28 from storage engine SQL SELECT ug.*, g.* FROM groups g, user_group ug
WHERE ug.user_id = 83 AND g.group_id = ug.group_id ORDER BY g.group_type DESC, ug.user_pending ASC,
g.group_name BACKTRACE FILE: includes/db/mysql.php LINE: 158 CALL: dbal->sql_error() FILE:
includes/acp/acp_users.php LINE: 1881 CALL: dbal_mysql->sql_query() FILE:
includes/functions_module.php LINE: 471 CALL: acp_users->main() FILE: adm/index.php LINE: 74 CALL:
p_master->l....
No "safe" Music
Even Streams can be copied (7) It doesn't take a computer hacker with special apps to steal music. Anyone who runs Windows can
steal music, even if you are streaming, encoding, using special file types, whatever. I know that
many individuals use special flash programs to stream music, but it still isn't safe, and
here's why: Many improfessional streaming programs acutally download the song to
'stream' it. Many of you are web-savvies, but for those of you who are not, there is a
directory in Windows called "Temporary Internet Files." Now, the best streaming programs don't
use....
Best Way To Transfer Files
I just bought a laptop (6) Hi there guys, I just bought a brand new Dell Inspiron laptop for $729.99. It has a
processing speed of 2.0ghz, 3GB RAM, and a 250gb hard drive. I'm really satisfied, especially
with the wireless internet and the fact that I can carry my computer around with me, allowing you to
use your computer in comfortable spots -- outside in the shade, on the train, or even in your bed
where I'm using it write now as I type. If you didn't already guess, this is my first
laptop. But I do have some issues. Does anyone happen to know an easy way to transfer some ....
Error 28 (on Phpmyadmin)
What does this error message mean? (6) I have a shopping cart system on my website. It always worked before, but all of a sudden, when I
try to access it i get "Got error 28 from storage engine". Has that got something to do with the
recent problems again, or can someone tell me what this error message means? Thanks. After posting
this I noticed I cannot get into my PHPAdmin anymore. It gives loads of errors: QUOTE Warning:
session_write_close() : SQLite: session write query failed: database is full in
/usr/local/cpanel/base/3rdparty/phpMyAdmin/index.php on line 42 Warning: session_write_close() :
Fai....
1350 Great Free Logos (jpg + Psd)
With both jpg and original psd files to edit (7) 1350 Great Free Logos (With both jpg and psd files)
http://rapidshare.com/files/126291346/1346...Great.Logos.zip This is a great collection of
logos, they are already made logos which you can use like that or just use to create other logos, do
what you want, they are free, they came from free websites that give this logos for free and lot
more, but i just took the good ones mainly. There is also a small collection of 100 logos inside
the compressed file, which you can use to insert those graphics in your logo/design/web design
projects, do what you want with them ....
Page Load Error When Accessing Cpanel
(0) Not sure what the issue is. I cannot even load up any of the cpanel's to allow me to put in a
password. I have tried the link that is located in the Credit System 2.0 I have tried the links
with subdomain/cpanel I have tried the links with subdomain:2082 All 3 of these just give page
load errors. Please note : This isn't a "my password doesn't work" thread. This is a "I
can't even get cpanel to TRY to load" thread. Thanks in advance.....
Coppermine Gallery Error
(2) Okay.. so i have my gallery set up at photos.chantellepaige.org and everytime i try to access it i
get this error "Coppermine critical error: Unable to connect to database ! MySQL said: Access
denied for user 'giselle_copp1'@'localhost' (using password: YES)" how do i change
the password etc?? or fix the problem??....
Cannot Open Display - Error
(2) I basically have some problems in accessing xWindow applications(SAS and nedit in particular) in the
server. i get "Cannot open display" when i try to access nedit and other applications. I did some
findings on this and thought this might be of some help to you. But I was not able to zero in on
the problem yet. The problem I guess, is the remote not able to enable the display to the server.
The display settings has to be set properly in the remote machine. Commands I tried
setenv DISPLAY xhost + DISPLAY=gl5705rk02:10.0 ....
Error
I REALLY NEED HELP! (0) Well .. I got a problem.. I got an error in the compiler.. Do you know where i can get JDK 5.0? ....
Debug Exe Files
How to debug an exe file. (4) Think that we have written a program, and some codes are wrong. We can go back to compiler and
change the code, and compile again. But I will show you how to correct our mistakes without using
the compiler. Let's start: I have written a program in Delphi. Let's see my mistake. I
have created a form like this. After this I wrote the codes in the Compare Button click as
below. CODE 1. procedure TForm1.ComparebuttonClick(Sender: TObject); 2. var
3. a,b:integer; 4. begin 5. a := StrToInt(EditA.Text); 6. b :....
The True Story Of The Internet (without Error)
video about the development of Internet (0) first of all I didn't meant to spam but there was an error with the previous post so I have
posted it again The true story of the Internet was name of the video I watched on
Discovery channel, and since it's an interesting video so I have decided to share it with you...
It talks about the development of the Internet and it makes an Interview with important site owners
such as facebook ,you tube and e b a y The video is divided into 5
parts... I do recommend watching it. /biggrin.gif" style="vertical-align:middl....
Converting Audio Files In Vista
how do you do it? (7) Ok, so I have some .wav files that I'd like converted into .mp3. I knew how to do it in XP, but
I can't find windows audio converter in Vista....does vista even have that, or is it under a new
name? Also, is it possible to convert video files, like .flv into .avi?....
Error While Activating Account
(10) Hello, I was signing up for an account, and it sent me an email with a link to follow to activate
my account and when i cliked on the link i got the following: QUOTE(error message) 404 :: Neave
Not Found Whatever you were looking for, it ain't here. Sorry about that. 2006
Imagefilez.com :: www.imagefilez.com the link that was sent in the email is
http://www.imagefilez.com/validate.php?ses...3e6cffc8c1bd2bb ....
Error E74? (xbox 360)
(7) Okay so me and my friend were playing guitar hero and all of a sudden the screen got all block like
and the graphics all turned into green swirly squares. So we thought maybe the A/v cord was loose or
something i turned off the xbox and re-plugged the a/v cords in now every time i turn the xbox on it
flashes 1 red light and says Error E74 in about every language i know of... I have called
1-800-4myxbox and all they said is that they only fix xbox's with the 3 red light error.... what
do i do? thanks.....
How To Disable "show Hidden Files And Folders" In Folder Option
(11) How to disable "Show hidden files and folders" in Folder Option As you know, you can hide files
or folders in Microsoft Windows ( to hide a file or folder , right click on file or folder >select
properties and then select Hide file) But if you open Folder Option and check "Show hidden files
and folders " you can see hidden files. to disable "Show hidden files and folders" feature follow
below steps : 1- Click start > Run > type regedit to run Windows Registry Editor. 2- Go to following
address: QUOTE HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/Current Versio....
Informix To Sql Server (or How To Open .unl Files)
how to import .unl files into SQL Server 2000 without Informix softwar (2) Does anyone know how to import .unl files into SQLServer 2000? My boss gave me this task to migrate
an old database into SQLServer. I don't have informix installed since the files were sent to me
via email. All files have .unl extension and I don't have a clue how to view them. I've
tried opening them using excel but it can't be read. Does anyone know how to do this? Or at
least know how to open/view the file using excel or any other program that could be easily migrated
to sqlserver? Please, I need to migrate the files as soon as possible. Thanks....
Strange .log Files On My Desktop
(10) Since this morning, two new visitors has camped out on my desktop. One is lcapi0.log , & when you
open it you get: QUOTE 19:50:36.703 F20:F24 WARN :: module=lcapi flavor=fre
version=1.7.226.0 (RTC Version 4.3.5371.0) 19:50:38.109 F20:F24 INFO :: Initialize(0) 19:50:38.609
F20:F24 INFO :: MUI not Enabled 19:50:44.625 F20:F24 INFO :: SetDeviceDisabled 0->0 19:50:44.656
F20:F24 INFO :: SetDeviceDisabled 0->1 19:50:44.656 F20:F24 TRACE :: SetDevice 00000000->00000000
19:50:44.656 F20:F24 INFO :: SetDeviceDisabled 0->0 19:50:44.656 F20:F24 TRACE :: SetDevic....
Psp Error- Tut On How To Fix
When you try to use the internet does your psp get an internal error? (28) First of all, psp can browse the internet with its simple browser. BUT! What you may not know
is that there is a bug where when you try to search or use a wireless lan connection (WLAN) the psp
may say something like: Internal Error (80410A0B) To fix this without any memory loss, take out
the UMD which is in the psp, and also take out the memory card. Next, go to settings, then system
settings and click restore settings, the psp may freeze up, but it is not broken, take out the
batter pack and put it back in, the settings should be restored and all should work.....
Linux Question: Amarok And File Permissions
please help, i can't get it to work with all music files (4) hey, i use to use Linux DC++ to download music from some hubs and i usually download it to
/home/downloads/ and then i move the files to my collection on another HDD a sata one, on
sda3/music/ but when i move the files using krushader root mode they become posessed by root and
amarok can't play them displaying a locker on the file's icon. I tried to " chmod 774 music
", where music is my music directory, as root in konsole but no luck. What should i do to make a
whole directory accessible from amarok as user?....
Gmail: 502 Server Error
GMail: 502 Server Error (20) Hey The topic name says it all. Well I have been trying for the last half an hour to log into my
GMail account, but it kept on occuring a Server 502 error. Just wondering if it is just me
or....yeah. QUOTE Server Error The server encountered a temporary error and could not complete
your request. Please try again in 30 seconds. Yep I have tried every minute..for the last half
an hour...(The Time now is 12.13pm Australian Eastern Standard Time) ....
Operating System Not Found
Error Displayed On Start Up (13) So I've been having some difficulties with my Laptop computer. Not the least significant of
them was this problem of not being able to find the O/S. What to do about it? How does the
computer not find the Operating System? I know that it is in there someplace, I had just
re-installed it, but the BIOS was not able to locate it. On the phone to the Manufacturer's
Help Centre. Explain the problem. Real nice guy. Had the answer right handy. Send me an email right
away. Good thing I had another machine available,huh? On startup, the powering on of the machine
tri....
Error Installing Windows Xp -error 7 Ntkrnlmp.exe
(10) i have tried to install windows xp on my pc and i get an error right after it ask at the bottom of
the screen to press f2 to restore an error pops up saying FILE
\$win_nt$.~bt\NTKRNLMP.EXE cannot be open error 7 setup cannot complete and has
to close i have had windows xp on the pc before so i know its compatible but i used a different
version of windows before ,this tinme im using a new one and i get this error i seem to find no
solution anywhere about how to resolve this and I was wondering if possible theres something i need
to do,I am not to sm....
Does Anyone Know How To Make Exe Files
(17) Does anyone know any software for making exe files, I want to make simple programs not propper
one's. Thanks.....
Error Not A Valid Win32 Application
(10) I get this error message when I try to open some files for example
C:\Downloads\Games\James_Bond_007 is not a valid win32 application or some other
files the error message is always "is not a valid win32 application" What can I do to open these
files so that the error message does not come up? How can I open this kind of file? I am using
Windows Me Pentium 4 1.3 Gigs 256 dram....
Converting Video Files From One Format To Another
help plz :) (6) hey i have learnt this nice way to open mov files in imageready and insert them in sigs,graphics and
other stuff its really cool,this only works with .mov files and i really need to know if sumone here
can do that,i need to change a wmv file into a .mov file so i cant add the movie to a sig,i have
tried many video format conversion programs but they dont accept the mov format,the mov format is a
quicktime video format,so anyone here know how to change a video file into a quicktime mov video
format? thnx in advance....
Looking for error, files, streams
|
|
Searching Video's for error, files, streams
|
advertisement
|
|