FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Writing to file





riv_
Wel, I've been too busy trying to learn how to do this stuff to actually post for a while, so you guys have gooten off easy for a while... but get ready for the next barrage of stupid newbie questions.
I'm trying to write to a file... pretty simple stuff really. I'm getting the old "access denied" error. But I'm totally stumped, because I've set file permissions already.
Anyone know what's going on?
Don't know if it could be related to my binary .dat file format or frihost specific settings? or something else?
Or just something obvious and goofy that I've missed again... Embarassed
Your thoughts are appreciated!
-riv_
riv_
Well, it seems I can chmod my files to death and it won't make a bit of difference.
Frihost has changed their configuration to run in [url="[url="http://ca.php.net/features.safe-mode"]safe mode[/url] so we can't open or write to files... (See specifically open_basedir)
ANyone know how I can make my script work?
Or is it time to move on to paid hosting Crying or Very sad
kv
Try this. Just change the permissions of your directory where you want to write file to "777" from cpanel and from ftp session. If it doesn't work, remove the directory and recreate it with 777 using cpanel. Then try running your script to create file. It should work. I don't think frihost is running in safe mode.
riv_
Don't I want it to be set to 755?

I reset permissions for the dir and the specific file in CPanel to 755 and it gives the following message:
Warning: fopen() [function.fopen]: open_basedir restriction in effect.
Hence the suggestion that it must be in safe mode...
Please correct me if I'm wrong. It happens a lot.

Anyways, why 777... I don't want anyone to be able to write to the file, do I?
mathiaus
Apparently safe mode is off http://frih.net/phpinfo.php Eh?
I seem to be able to open, write and overwrite files, are you trying to write files in different folders or something?
riv_
I'm trying to write to A file in A folder....
Will that not work?
lesanciensdulad
I guess that like a lot of other free hosting network, FRIHOST has a php upload limitation of 2MB .

I am in the same situation with a PHP script that upload mp3's to a folder that display the upload on a playlist and add them to a player. anything that is bigger then 2MB does not pass to the folder.

my question to Frihost is can one get a php.ini control or request to extend their php upload limitation to at least 8 MB.

thank you for your prompt attention .
Related topics
File upload with PHP, Build an upload database for your site
writing COM components in Perl
Any writers here
PHP: Writing to txt file
Visual Basic Tutorial - File I/O in VB: Text Files
Open, Write to and Close a txt file using php
New Created Accounts
Appending file
Creating or writing to a file in javascript.
Server PHP file functions issues?
Maximum File Size
Read file backwards
File Permissions Writing/Reading
Writing to a file by form
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.