PHP question
- Started
- Last post
- 26 Responses
- mikotondria30
....................(((*)
^tumbleweed
- 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
- i_was0
ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็
- 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.
- 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..
- detritus0
Same domain?
- mikotondria30
Not without seeing the script and running some debugz.. Check any paths that are in the script, see if the mail() function is working, that sort of thing. Sorry not to be more help :/ Chuck it up on pastebin and we can see if there's anything obvious or where to start a line of inquiry..
- ETM0
Doesn't work is pretty broad. Any specific errors?
If you moved the files, the permissions of certain files may no longer be correct. Is there any documentation? Is the old server available so you can check file permissions there, versus the new setup?
- mikotondria30
Is php switched on ? :)
- 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
- dbloc0
so this is the page?
http://genuiforma.com/contact.ph…
- dbloc0
look here.
http://www.freecontactform.com/e…
- 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.
- 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
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