Flux rss
Search : in
By : Keywords Username
Unanswered messages

Problem with include on windows NT server

Office23, on Friday February 22, 2008 06:39:10 AM 
 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

1

Htmlgirl, on Friday February 22, 2008 08:44:32 AM
  • +1

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 Friday February 22, 2008 08:56:28 AM
  • +1

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 Friday February 22, 2008 09:10:43 AM
  • +1

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 Friday February 22, 2008 09:18:28 AM
  • +1

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 Friday February 22, 2008 09:24:33 AM
  • +1

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 Tuesday March 25, 2008 03:35:03 PM

I solved this using the code:

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

Reply to nonamer

7

 crazy_phoebe, on Sunday July 6, 2008 11:16:33 AM

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
User management in Windows NT The 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... en.kioskea.net/contents/winnt/ntusers.php3
Introduction to Windows NT 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... en.kioskea.net/contents/winnt/ntintro.php3
MICROSOFT OEM Microsoft Windows Web Server 2008 32Bit/x64 DVD 1-2Cpu - OEM PRODUCT x 64 32 Bit, Windows Web Server 2008 is designed to be used specifically as a single-purpose Web server, and delivers on a rock-solid foundation of Web infrastructure capabilities in the next-generation Windows Server 2008. Integrated with the newly... en.kioskea.net/guide/651898343-microsoft-oem-microsoft-windows-web-server-2008-32bit-x64-dvd-1-2cpu-oem-product
How to use a driver ODBC 32 BITS under the Window 2003(64 bits)?How to use a driver ODBC 32 BITS under the Window 2003(64 bits)? You have a Windows 2003 server (64-bits) and you want to use a 32 bits ODBC driver: one that is usually found in the administrative panel for ODBC on Windows or an external... en.kioskea.net/faq/sujet-707-how-to-use-a-driver-odbc-32-bits-under-the-window-2003-64-bits
The RPC server is unavailableThe RPC server is unavailable First Solution Second Solution When the printers installed on the machine are no longer available and that the Windows system displays the following message: Unable to continue operation due to lack of... en.kioskea.net/faq/sujet-1918-the-rpc-server-is-unavailable
Command prompts for WindowsCommand prompts for Windows *Control Panel *Windows utility and applications *Disk management *Connection management *Miscellaneous commands Some of these command below can cause harmful an undesirable functions,... en.kioskea.net/faq/sujet-403-command-prompts-for-windows
Make vista as client to windows 2003 serverHello, This is my first time to setup a network, I'm using a windows vista client pc and a windows server 2003 domain controller server, how do i configure the client pc and the server so that the client pc needs to logon to the server so that the... en.kioskea.net/forum/affich-67775-make-vista-as-client-to-windows-2003-server
Downgrade Win 2008 Server to 2003 ServerHello, I am trying to install W2003 Server. I am told that MS no longer do 2003 Server licences, and that now the only way of getting a licensed W2003 Server installation is to use 2008 server media. I've been given a legitimate licensed 2008 Server... en.kioskea.net/forum/affich-1819-downgrade-win-2008-server-to-2003-server
Connecting server 2003 and window XPHello, kioskea.net Please help me. I have a problem. I want to connect two computer. One pc is running window XP SP2. And one pc is running server 2003. I give ipaddress 192.168.0.2 and 192.168.0.1 correspondingly. Before making Active Directory in... en.kioskea.net/forum/affich-60121-connecting-server-2003-and-window-xp
Download TFTP serverIt is the only free DHCP server under Windows and is useful to configure automatically the IP address of your local area network. Moreover, it is a TFTP client, TFTP, SNTP and SYSLOG client. Its size is only 192 Kb. en.kioskea.net/telecharger/telecharger-1962-tftp-server
Download Windows XP SP3 Service PackThe 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... en.kioskea.net/telecharger/telecharger-2494-windows-xp-sp3-service-pack
Download Windows Worms Doors CleanerThe most part of the firewall, particularly the most renowned, use vulnerabilities known in the services of Windows which are allowed by default and that cannot often be made disabled via the configuration of the OS.Even with these services the... en.kioskea.net/telecharger/telecharger-291-windows-worms-doors-cleaner
Windows networkingNetworking in Windows 2000/XP To configure each computer, simply go to the control panel, then double-click "network connections" and right-click "local area connection", then choose properties! The local area connection window displays the... en.kioskea.net/contents/configuration-reseau/configurer-reseau-windows-xp.php3
Microsoft Windows - The registryWhat is the registry? In version 3.1 of Microsoft Windows, applications that had been installed were configured in Windows with configuration files (which had the extension .ini). There were also two configuration files for Windows itself:... en.kioskea.net/contents/win/winreg.php3
Security Policies in Windows NTUnderstanding the notion of policy Security policy is the set of all security rules that are to be implemented in an organisation, and the ways in which they are implemented. The user manager located in the Start Menu (Programs/Administration... en.kioskea.net/contents/winnt/ntstrat.php3