database failure

Status
Not open for further replies.

stalkio

New Member
Messages
45
Reaction score
0
Points
0
I have created a search page and made the action to go to my results page, but on testing this in the browser the results page is unable to function reading:

Warning: require_once(Connections/dic3.php) [function.require-once]: failed to open stream: No such file or directory in /home/stalkio/public_html/results2.php on line 1

Fatal error: require_once() [function.require]: Failed opening required 'Connections/dic3.php' (include_path='.:/x10hosting/php2/pear/PEAR') in /home/stalkio/public_html/results2.php on line 1

I don't know how to solve this problem to test if it works, has someone experienced this?
 

LHVWB

New Member
Messages
1,308
Reaction score
0
Points
0
That is a classic file not found error with php, make sure that the correct location for that file has been given to the require_once() function.

Remember that you should probably give it a location starting with the server root, or a '/'. So something like 'require_once("/home/stalkio/public_html/Connections/dic3.php");', should work.
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
Remember if the url you provide starts with / it's considerred to be the server root, while any other charachter is the active directory
 

sybregunne

Member
Messages
54
Reaction score
0
Points
6
Even "../" will work fine.

eg.

Home
+----pictures
|
+----scripts

your file inside scripts folder can have a
PHP:
include "../pictures/random_nude_pix_album.php";
it will work.

another thing to note is x10hosting is files and directories are case sensitive.
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
Hopefully you wouldn't have a Random Nude Pix Album on x10's servers though, as that'd of course be against our Terms of Service. ;)
 

stalkio

New Member
Messages
45
Reaction score
0
Points
0
just to say thanks for your replies - the problem was embarrassingly simple for anyone who gets the same problem = the database I was attempting to use wasn't uploaded to the remote server - I did so in a file named 'connections'.
 

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
Since this has been solved I'm going to close it.

*Closed*
 
Status
Not open for further replies.
Top