Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP Error - Require assistance
Old 02-20-2005, 09:57 PM PHP Error - Require assistance
Novice Talker

Posts: 6
Trades: 0
Hi Guys,

Ive just purchased a customised PHP website from another company which has decided to close down. I cant get in contact with them anymore. Ive installed the script and everything is working fine until I go to the checkout I get the following error message:

Warning: fclose(): supplied argument is not a valid stream resource in /usr/home/********/public_html/includes/global_functions.php on line 126

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/********/public_html/includes/global_functions.php:126) in /usr/home/********/public_html/after_cart.php on line 125

Can anyone be of any assistance?? It would be greatly appreciated.

Kind Regards
Khoder.
Khoder is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-20-2005, 10:12 PM
Skilled Talker

Posts: 62
Trades: 0
the fclose() error means that whatever file it is trying to open does not exist.
The headers error means that in global_functions.php there is something being printed, echod, or there is a space inbetween php tags.
The Jasong is offline
Reply With Quote
View Public Profile
 
Old 02-20-2005, 10:12 PM
Novice Talker

Posts: 6
Trades: 0
Here is the code in my global_function.php file from Line 119 to Line 129

Maybe that help. Could it be a permission error?


PHP Code:
    /**
      Saves string to the specified file.
    */

    
@$handle fopen($filepath"w");
    @
fwrite($handle$save_string);

    
fclose($handle);
}

function 
get_global_results_headings($gender,$this_url,$images,$type,$specials) { 
Kind Regards
Khoder.
Khoder is offline
Reply With Quote
View Public Profile
 
Old 02-20-2005, 11:06 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
It could well be - if you don't have permission to write to the file, that command will fail. Since the line starts with '@' it will fail with no error messages and will only get caught on the fclose().

The error about headers is not a problem - as JasonG says it happens when something has been sent to the browser before headers are sent - in this case it is the previous error message that has been sent. Clear up the first error and the second should disappear too.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 02-20-2005, 11:57 PM
Novice Talker

Posts: 6
Trades: 0
Hi Oberon,

Thanx for your assistance. Theres only 1 issue. I have no idea whatsoever about PHP. Is there anything anyone can do to assist me?
Khoder is offline
Reply With Quote
View Public Profile
 
Old 02-21-2005, 12:13 AM
Novice Talker

Posts: 6
Trades: 0
Hi..

I removed the @ at the beginning of the two lines in question and now the error message has changed.

This is what I am getting.

Warning: fopen(_temp_session_store/3c022caf62c3b7b1f335134cf9e7e2db): failed to open stream: No such file or directory in /usr/home/pparlour/public_html/includes/global_functions.php on line 123

Warning: fwrite(): supplied argument is not a valid stream resource in /usr/home/pparlour/public_html/includes/global_functions.php on line 124

Warning: fclose(): supplied argument is not a valid stream resource in /usr/home/pparlour/public_html/includes/global_functions.php on line 126

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/pparlour/public_html/includes/global_functions.php:123) in /usr/home/pparlour/public_html/after_cart.php on line 125

Kind Regards
Khoder.
Khoder is offline
Reply With Quote
View Public Profile
 
Old 02-21-2005, 02:27 AM
Novice Talker

Posts: 6
Trades: 0
Fixed the problem.

Continuing on.
Khoder is offline
Reply With Quote
View Public Profile
 
Old 03-14-2005, 02:41 PM
boosterz's Avatar
Junior Talker

Posts: 2
Trades: 0
my problem like you, how to fix it ? please tell me...
boosterz is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP Error - Require assistance
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25872 seconds with 12 queries