473,509 Members | 2,900 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with include()

Hi,

I am trying to upload my site to a new server, and am finding a hard
time with the include() function.

I am getting this...

Warning: main(includes/site_auth.inc) [function.main]: failed to open
stream: No such file or directory in
/usr/home/vhosts/example.com/web/maint/index.php on line 2

line 2 of my file looks like this...
include ('site_auth.inc');

I have given this in my .htaccess file....
php_value include_path
".:/users/example/includes:/home/vhosts/example.com/includes"

and, the really interesting thing is I am getting a FALSE when I
execute this....
file_exists(/users/example/includes/site_auth.inc)
....even when I KNOW that the file is there.

The file is *definately* in that location, but I am still getting the
error.

Any ideas?

Thanks

--
a beef jerky site http://www.choicebeefjerky.com.au
not a beef jerky site http://mycoolwheels.com/vote.cmks
eat beef jerky
Aug 3 '05 #1
2 1578
Disco Octopus wrote:
Hi,

I am trying to upload my site to a new server, and am finding a hard
time with the include() function.

I am getting this...

Warning: main(includes/site_auth.inc) [function.main]: failed to open
stream: No such file or directory in
/usr/home/vhosts/example.com/web/maint/index.php on line 2

line 2 of my file looks like this...
include ('site_auth.inc');

I have given this in my .htaccess file....
php_value include_path
".:/users/example/includes:/home/vhosts/example.com/includes"

and, the really interesting thing is I am getting a FALSE when I
execute this....
file_exists(/users/example/includes/site_auth.inc)
...even when I KNOW that the file is there.

The file is *definately* in that location, but I am still getting the
error.

Any ideas?


Try to check for
file_exists('/usr/home/vhosts/example.com/web/maint/users/example/includes/site_auth.inc')

I have a feeling this might come up true...

Berislav
Aug 3 '05 #2

Disco Octopus wrote:
Hi,

I am trying to upload my site to a new server, and am finding a hard
time with the include() function.

I am getting this...

Warning: main(includes/site_auth.inc) [function.main]: failed to open
stream: No such file or directory in
/usr/home/vhosts/example.com/web/maint/index.php on line 2

line 2 of my file looks like this...
include ('site_auth.inc');

I have given this in my .htaccess file....
php_value include_path
".:/users/example/includes:/home/vhosts/example.com/includes"

and, the really interesting thing is I am getting a FALSE when I
execute this....
file_exists(/users/example/includes/site_auth.inc)
...even when I KNOW that the file is there.

The file is *definately* in that location, but I am still getting the
error.

Any ideas?

Thanks

--
a beef jerky site http://www.choicebeefjerky.com.au
not a beef jerky site http://mycoolwheels.com/vote.cmks
eat beef jerky


Since your moving to a new server (are you managing server?), they may
have these functions disabled for some crazy reason. Run a phpinfo();
and check PHPs settings.

Aug 3 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2622
by: Bartosz Wegrzyn | last post by:
I need help with sessions. I createt set of web site for nav with authorization. first I go into main.php which looks like this: <?php //common functions include_once '../login/common.php';...
7
10613
by: Forecast | last post by:
I run the following code in UNIX compiled by g++ 3.3.2 successfully. : // proj2.cc: returns a dynamic vector and prints out at main~~ : // : #include <iostream> : #include <vector> : : using...
1
1759
by: David Li | last post by:
I am having a lot of problem with following code. To start with I have a working sets of code and the top level SystemC code looks like this: ----------working main.cpp start here...
13
1948
by: Winbatch | last post by:
Hi, If this should be directed to another group, please let me know... I've been working with templates for a few weeks and have been able to develop some nice code on solaris using the Forte C++...
9
3464
by: ludocluba | last post by:
Hello, here is my problem: I have 3 files: main.c toto.c toto.h: ----------------------------------------------------------- toto.h: #ifndef _toto_h #define _toto_h int var; void test(void);...
2
2510
by: Fernando Barsoba | last post by:
Dear all, I have been posting about a problem trying to encrypt certain data using HMAC-SHA1 functions. I posted that my problem was solved, but unfortunately, I was being overly optimistic. I...
9
13242
by: Prasad | last post by:
HI, I am a beginner in VC++.. I am trying to write a Win32 console application in visual studio.. I am using following header files.. #include <STRING> using namespace std; #include...
5
2205
by: Tio | last post by:
I have project in MFC(vc++) . There are files and classes: classes:dialog1,dialog2,aaa,bbb ---------------------- main.cpp --------------------- #include "mainfrm.h" #include "dialog1.h"...
2
2953
by: Dark Wind | last post by:
Hi, I have been using OPT++ to solve a non linear programming problem. I am totally new to C++, but I looked at an example given on OPT++ website and modified it according to my problem. But I...
19
4379
by: foolsmart2005 | last post by:
I have written a snake game. There are 2 levels in the game(I finished 1st level). It can run in VC++ without problem but, when I run it on the dev C++ 4.9.9.2, it cannot run. I want to...
0
7136
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.