PHP question
- Started
- Last post
- 26 Responses
- vaxorcist0
mikotondria3's right... you want to find out the filepath of your script, then you can start pointing things without errors like this.....
you can write a one-line script in the same folder, call it info.php and make it like:
<?php
phpinfo();
?>you'll see a HUGE amount of stuff.... it's probably a filepath in there, I'd check the $_SERVER['PHP_SELF'] var, and/or a few others like it after scrolling through all the stuff...
you can also find out with this info if your server is weirdly configured..... or running on Windows instead of Linux/Unix.... PHP on Windows can be quirky
- mikotondria30
I would probably:
Go into the includes/mail.inc.php file and put, at the top,
echo $_SERVER['PHP_SELF'];
then just go straight to it, like domain.com/includes/mail.inc.php
and see 'where' it really thinks it is...
If the contact.php is in the root, then just have the require as
require(includes/mail... etc..
If it's simple, you shouldn't need anything like $_SERVER[...
just point the contact script to where the includes/mail.inc.php script is.
Hope that makes some sense..
- boobs0
So, is anyone able to give me any guidance on how to fix this path issue?
I imagine I'm supposed to change ['DOCUMENT_ROOT'] to something else. But I honestly have no idea what to try to change it to.
- i_was0
ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็
- i_was0
you cant ,it's an error path, they use document root ,this mean if the path is changed the path dont point anymore to the file,use relative paths and dont use document root for that fucking dioits!
- I'm afraid you forgot to capitalize the start of your sentence. And you were rude again. How hard is it not to be rude to Boobs ?mikotondria3
- i'm sorry , i'm just playing and being a dickheadi_was
- Fine. Hard to tell.
Extra points for that.mikotondria3
- mikotondria30
....................(((*)
^tumbleweed
- mikotondria30
So what's the precise solution then, you rather rude young man ?
Don't make even the tiniest typo or error in your response - you can't now, can you, after all that rambunctiousness ?
Pastebin up the correct solution: now...- aka "Guess the bitter, oft-rejected old-timer with social development issues".detritus
- i_was0
[27-Mar-2012 11:15:00] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/includes/mail.inc.php' (include_path='.:/usr/lib64/php... in /home3/genuifor/public_html/cont... on line 65
Parsed in 0.012 seconds
[27-Mar-2012 11:15:00] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/includes/mail.inc.php' (include_path='.:/usr/lib64/php... in /home3/genuifor/public_html/cont... on line 65Parsed in 0.012 seconds
[27-Mar-2012 11:15:00] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/includes/mail.inc.php' (include_path='.:/usr/lib64/php... in /home3/genuifor/public_html/cont... on line 65Parsed in 0.012 seconds
[27-Mar-2012 11:15:00] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/includes/mail.inc.php' (include_path='.:/usr/lib64/php... in /home3/genuifor/public_html/cont... on line 65Parsed in 0.012 seconds
[27-Mar-2012 11:15:00] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/includes/mail.inc.php' (include_path='.:/usr/lib64/php... in /home3/genuifor/public_html/cont... on line 65Parsed in 0.012 seconds
[27-Mar-2012 11:15:00] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/includes/mail.inc.php' (include_path='.:/usr/lib64/php... in /home3/genuifor/public_html/cont... on line 65Parsed in 0.012 seconds
[27-Mar-2012 11:15:00] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/includes/mail.inc.php' (include_path='.:/usr/lib64/php... in /home3/genuifor/public_html/cont... on line 65Parsed in 0.012 seconds
[27-Mar-2012 11:15:00] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/includes/mail.inc.php' (include_path='.:/usr/lib64/php... in /home3/genuifor/public_html/cont... on line 65Parsed in 0.012 seconds
- i_was0
[27-Mar-2012 11:15:00] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/includes/mail.inc.php' (include_path='.:/usr/lib64/php... in /home3/genuifor/public_html/cont... on line 65
Parsed in 0.012 seconds
- i_was0
ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็
- mikotondria30
mm...it would be a little easier if you could pastebin the error..qbn is cutting off the full paths, as in "/includ... (inc"
I would also just try to upload and execute
<? print_r($_SERVER); ?>
just to see what's what in that set up..
or even of course
<? php_info(); ?>
- boobs0
Here's the error message:
[27-Mar-2012 10:45:04] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/usr/local/apache/htdocs/includ... (include_path='.:/usr/lib64/php... in /home3/genuifor/public_html/cont... on line 65
- There is a module or library missing with the php install. Or it's in a different path than before.ETM
- The error is truncated and it's hard to see which one.ETM
- pastebin us the error :)mikotondria3
- ETM0
But HOW does it not work now?? Is there an error? Is it not relaying the message to the user's inbox? Help us help you.
- boobs0
The file above does work properly. It does send the form info to the owner.
But this same file, moved to another hosting company server (along with all the rest of the site and folders), does not work there.
- dbloc0
look here.
http://www.freecontactform.com/e…
- dbloc0
so this is the page?
http://genuiforma.com/contact.ph…