Search : in
By :

Problem with include on windows NT server

Last answer on Jul 6, 2008 11:16:33 am BST Office23, on Feb 22, 2008 6:39:10 am GMT 
 Report this message to moderators

Hello,

im on a windows NT server, and somehow, when i use the include methode include('../functions.php');

it doesn't find the functions.php page!!

i have a file name post.php, it's in a folder, and i need to include the functions file to it.. i also tried a relative path which doesn't work either.

Some people told me to try the code below since im on a windows NT server

Code:
include('C:\hshome\host-user\xfzo.com\functions.php')
but i got these warning messages

Warning: main('C:\hshome\host-user\xfzo.com\functions.php') [function.main]: failed to open stream: No such file or directory in 'C:\hshome\host-user\xfzo.com\posts.php'on line 4

Warning: main() [function.include]: Failed opening 'C:\hshome\host-user\xfzo.com\functions.php' for inclusion (include_path='.;c:\php4\pear') in C:\hshome\host-user\xfzo.com\shoutbox\posts.php on line 4

What should i do?

Configuration: Windows XP
Internet Explorer 6.0

Best answers for « problem with include on windows NT server » in :
[Windows NT]NT 4.0 SP2+:Enabling the DMA Show [Windows NT]NT 4.0 SP2+:Enabling the DMA Intro Enabling DMA on Windows NT 4.0 SP2 +: Check NT service pack Installation Intro Handling the DMA, for IDE drives is much more difficult under NT4 than under Windows 9x series. Unlike the...
Introduction to Windows NT Show Introduction to Microsoft Windows NT Windows NT (for "New Technology") is a 32-bit operating system developed by Microsoft. Windows NT's outward appearance makes it look a lot like Windows 95/98/Millennium, but Windows NT has a separately...
Sharing a Printer ShowSharing a Printer Sharing a computer with printer server Sharing printer with a print server How to share a printer to make it accessible from any workstation with a Microsoft Windows NT/2000/XP: First, we must quickly...
How to disable the security Center under windows XP? ShowHow to disable the security Center under windows XP? Intruduction Disable Alerts Turn off Windows Security Center Intruduction Windows security Center is a component that works under Windows XP service pack 2 for providing...
Audio services missing ShowStereo Mixer/Audio Mixer missing Forcing the start of Windows Audio Service Installation of standard audio codecs If the audio mixer of Windows fails to launch, make sure that you have installed the drivers for sound card, downloaded...
Download Windows XP SP3 Service Pack ShowThe service pack 3 of Windows XP (XP SP3) is a major update for Windows XP which has more than 1000 corrective softwares with numerous corrections for security problems as well as some supplementary features. The new features of the Service Pack...
Download Windows XP SP2 ShowWindows XP SP2 Pack services constitute a practical means, everything in one, to reach the last drivers, the tools and the improvement in security as well as the other critical updates. Windows XP SP2 (Pack 2 service), the last Pack service for...
Download Windows Installer ShowMicrosoft WindowsIinstaller is a service of installation and application configuration, allowing to manage the applications containing the MSI extension MSI. Windows Installer 3.1 is a secondary update of Windows Installer 3.0 published in...
User management in Windows NT ShowThe notion of a user Windows NT is an operating system which manages sessions, meaning that when the system is started, it is necessary to log in with a user name and password. When Windows NT is installed, the administrator account is created by...
Services - services.exe Showservices - services.exe services.exe (Windows Service Controller) is a Windows NT/2000/XP generic process used for recognising and implementing system changes without requiring the user's involvement. The process scm is not in any way a virus, a...
Sharing and permissions in Windows NT ShowIntroduction to folder sharing Sharing allows resources to be designated as being available to all users over a network. When a folder is shared, users can log into the folder from across the network and access the files within, as though the...

1

Htmlgirl, on Feb 22, 2008 8:44:32 am GMT

Hello Office23,

You can use the set_include_path or set_require_path. i tried this before..

Visit www.php.net for more information

Reply to Htmlgirl

2

Itboy26, on Feb 22, 2008 8:56:28 am GMT

Hi office23, welcome to the forum..

You can also make a test.. make two page, one named test1.php and another one name test2.php.

Put test2.php in the root folder and test1.php in a folder called test!

in test1.php just type

<?php
echo "Hello ";
include "test2.php";
?>


in test2.php just type

<?php
echo "World";
?>

Then open test1.php. You should get Hello world on the page

Reply to Itboy26

3

Jamescracker, on Feb 22, 2008 9:10:43 am GMT

Office23, you should specify that you are using php as your programming language in your thread title. Otherwise people won't be able to determine if you're talking about it. The warning message you got from php already told you the error.

include_path='.;c:\php4\pear'. <--- that's the actual error

in your php.ini setting, just change it from the location you want to include your file. Hope that makes sense. Try it and tell me if it works.

Reply to Jamescracker

4

Office23, on Feb 22, 2008 9:18:28 am GMT

Hi Htmlgirl, i tried using the set_include_path but i don't really understand it. How should I apply this code in my actual code? It's for a project I'm working on and the deadline is three days.

Reply to Office23

5

Itboy26, on Feb 22, 2008 9:24:33 am GMT

According to that error message, you can only include files that are in the same directory(folder) as your script or in c:\php4\pear unless you change it from your php.ini as mentioned by Jamescracker. If you don't have access to php.ini, just ask your host provider to change it or just put the file that you need to include in the same directory. As long as it doesn't affect your script, it's fine.

Reply to Itboy26

6

nonamer, on Mar 25, 2008 3:35:03 pm GMT

I solved this using the code:

require_once ( $_SERVER['DOCUMENT_ROOT'].'/test.php' );

Reply to nonamer

7

 crazy_phoebe, on Jul 6, 2008 11:16:33 am BST

Hi office 23,i have the same problem and i have solve it by using the ;set_include_path or set_require_path. it really solved the problem automatically.try it and you will be alright;-]

Reply to crazy_phoebe