icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » Are These Functions Allowed?

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Closed Thread
 
LinkBack Thread Tools Search this Thread Rate Thread
Old August 14th, 2003, 1:12 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2003
Lives in Belgium
18 posts
Gave thanks: 0
Thanked 0 times
are functions like fopen() allowed on surpasshosting? :ask:

my site uses them, but it's not really needed. When I use it I get this error:

Warning: fopen(temp.php): failed to open stream: Permission denied in /home/cosmicc/public_html/index.php on line 47
crebilis is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old August 14th, 2003, 1:45 PM   #2 (permalink)
Peaches!
Excelling Contributor
 
Joined in Jul 2003
Lives in Ottawa, Ontario, Canada
Hosted on Jose, Pass19
564 posts
Gave thanks: 0
Thanked 0 times
They are, but you need to make sure the files are CHMODded correctly.
__________________
alex.honeywell [ seigousei.net - pass19, binuweb.com - jose ]
AlexH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old August 14th, 2003, 2:18 PM   #3 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2003
Lives in Belgium
18 posts
Gave thanks: 0
Thanked 0 times
I have no idea on how to do that :dongget:

this is my code:

Code:
$fp = fopen("temp.php","w+");
fputs($fp, $code);
fclose($fp);
include("temp.php");
unlink("temp.php");
where I get the variable code from a database

Anyone can help me? thx

edit:

this is the whole error thingy:

Warning: fopen(temp.php): failed to open stream: Permission denied in /home/cosmicc/public_html/index.php on line 47

Warning: fputs(): supplied argument is not a valid stream resource in /home/cosmicc/public_html/index.php on line 48

Warning: fclose(): supplied argument is not a valid stream resource in /home/cosmicc/public_html/index.php on line 49

Warning: main(temp.php): failed to open stream: No such file or directory in /home/cosmicc/public_html/index.php on line 50

Warning: main(): Failed opening 'temp.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cosmicc/public_html/index.php on line 50

Warning: unlink(temp.php): No such file or directory in /home/cosmicc/public_html/index.php on line 51
crebilis is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old August 14th, 2003, 10:35 PM   #4 (permalink)
Registered User
Seasoned Poster
 
Joined in Jul 2003
44 posts
Gave thanks: 0
Thanked 0 times
You might need to set the permissions of the directory your trying to work on which i think is public_html/. Try making it writeable? You can change the permissions from the cpanel file manager.
sowdog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old September 26th, 2003, 5:40 AM   #5 (permalink)
Registered User
Super #1
 
Joined in Jul 2003
Lives in So. NJ
1,557 posts
Gave thanks: 0
Thanked 9 times
crebilis, are you still having the issue?
__________________
Dime13 | Pass17
snide is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On