![]() |
|
#1
|
|||
|
|||
Parse error in PhPThis is new to me, but I am trying to make the "send mail" function work on my flash page. Any help would be greatly appriciated, I have been working on this for 3 days now
Here is the info: ERROR MESSAGE: Warning: main(Mail.php): failed to open stream: No such file or directory in /u34/swaves/email tutorial/php/sendtofriend.php on line 4 Fatal error: main(): Failed opening required 'Mail.php' (include_path='.:/usr/local/php/include') in /u34/swaves/email tutorial/php/sendtofriend.php on line 4 RELATED DOCUMENTS SENDFRIEND.PHP - PHP Code:
MAIL.PHP - PHP Code:
CONFIG.PHP - personal data *** out PHP Code:
Last edited by swaves : 04-Feb-2009 at 14:00.
Reason: Please insert your Php code between [php] & [/php] tags
|
|||
|
#2
|
||||
|
||||
Re: Parse error in PhPThat is not a parse error...
What is the full path to the 'Mail.php' file? If it is not [based on the 'include_path' in the fatal error message] in the same directory (the dot) where sendfriend.php is located, or in /usr/local/php/include, then PHP can't locate the file. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Parse error in PhPThanks for the reply.
My host server told me to have it in my "cgi-bin" folder . So how should the line read? Noob to all this and just trying to get it to work. Thanks again |
|
#4
|
||||
|
||||
Re: Parse error in PhPI'm not sure why they would want it there...is it something they reference too?
Why not, just for temporary testing sake, copy the file to your php directory and see how it goes? If that works ok, then there are two possibilities: 1. keep the file there, where specifically needed or (if it'll be needed by multiple scripts) 2. append another path (the cgi-bin path) to the 'include_path' using ini_set(). Be careful that you concatenate the additional path [including a path-separator, the colon], and not replace what's there now. At the top of the script, the ini_set() would be used like this: PHP Code:
EDIT: Oh, lest I forget: ini_set() only temporarily modifies the 'include_path' for the current script. So this method will be needed whenever you need a path included. Since you don't have control of php.ini, it won't be permanent. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#5
|
|||
|
|||
Re: Parse error in PhPTurns out it was just case sensitive...mail.php not Mail.php
But now i get this error. Note the config.php from previous post. Warning: main(Mail.php): failed to open stream: No such file or directory in /u34/swaves/email tutorial/php/sendtofriend.php on line 4 Fatal error: main(): Failed opening required 'Mail.php' (include_path='.:/usr/local/php/include') in /u34/swaves/email tutorial/php/sendtofriend.php on line 4 |
|
#6
|
||||
|
||||
Re: Parse error in PhPI don't see what that has to do with the config file?
Those appear to be the exact same messages from before, so what has changed? I still see [M]ail.php in the error, and the complaint [still] mentions the sendtofriend.php file. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#7
|
|||
|
|||
Re: Parse error in PhPSorry my error. Been trying to figure this out too long. I copied the old error.
This is the error message Warning: Missing argument 4 for sendemail() in /u34/swaves/email tutorial/php/config.php on line 14 Fatal error: Undefined class name 'mail' in /u34/swaves/email tutorial/php/config.php on line 20 |
|
#8
|
||||
|
||||
Re: Parse error in PhP1. Ok, so think about what the warning is telling you...
What is different between the definition of SendEmail() in the config vs. how it is called from the sendtofriend.php file? 2. The error appears to be at this line: PHP Code:
Or if the send() does return true, or false, [as to the success of send()] then change the condition. Maybe something like this: PHP Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! Last edited by TurboPT : 05-Feb-2009 at 14:45.
|
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parse error: parse error, unexpected T_STRING in /home/content/R/i/c/RichardAKnox/htm | Richardknox | MySQL / PHP Forum | 5 | 18-Nov-2006 22:20 |
| parse .html as php | petenyce405 | Apache Web Server Forum | 1 | 05-Aug-2005 07:21 |
| Help ! I need help starting up on Php ! | onauc | MySQL / PHP Forum | 11 | 05-Jan-2005 00:57 |
| PHP in HTML | jrobbio | Web Design Forum | 4 | 24-Jul-2003 07:05 |
| All the big PHP script collections that matter | jrobbio | MySQL / PHP Forum | 5 | 06-Jun-2003 17:14 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The