473,396 Members | 2,089 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Running PHP in windows

I'using windows-base server and running PHP script. The coding below running wisely in Apache Server but error in windows-base.

<?php include("/home/monrzcom/httpdocs/password_page.php"); ?>

The error is

Warning: include() [function.include]: Failed opening '/home/monrzcom/httpdocs/password_page.php' for inclusion (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\gishumanities.com\httpdocs\downl oad_page.php on line 1


So, what is the php coding that support by window server in order to call the file. Please advice me with example.

TQ
Dec 13 '10 #1
8 2041
Aimee Bailey
197 Expert 100+
include() is great for re-usable code, however i believe require() or require_once() maybe more suited to your needs. This error is thrown because php can't find the file you have asked to include.

Aimee.
Dec 13 '10 #2
Can you give me the example of the code...please
Dec 13 '10 #3
Aimee Bailey
197 Expert 100+
<?php require_once("/home/monrzcom/httpdocs/password_page.php"); ?>
Dec 13 '10 #4
I have tried require() and require_once() but stil got error. Below is the error.

Fatal error: require() [function.require]: Failed opening required '/home/monrzcom/httpdocs/password_page.php' (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\gishumanities.com\httpdocs\downl oad_page.php
Dec 14 '10 #5
Dormilich
8,658 Expert Mod 8TB
I have tried require() and require_once() but stil got error. Below is the error.
if include couldn’t find the file, require and require_once will fail as well …

the more important question is, where in the file system is the file and where is the server root directory.
Dec 14 '10 #6
I believe that path and root directory is correct because its run nicely in LINUX server. But when I try in windows server, its error. Seems that it cannot read include command.

Below is the same coding that i used in linux and window serve.

<?php include("/home/monrzcom/httpdocs/password_page.php"); ?>

TQ
Dec 15 '10 #7
Aimee Bailey
197 Expert 100+
the url you have specified looks like a linux uri, "home" does not exist in windows unless you create it within your root directory.

Can you also tell us what server you are running, Apache/PHP, IIS, EasyPHP etc...?
Dec 15 '10 #8
Samishii23
246 100+
If your running on Windows, you'll have to use the base folder, example: C:/WWW/ as your "Root", and would look like this: /, while linux uses the base root of the drive, /home/monrzcom/httpdocs/.

So for you it would simply be: /password_page.php.

Note that using Include or Require you'll never be able to go outside of the Root folder.
Dec 18 '10 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Claire | last post by:
How can I switch between running Windows applications programmatically form C#? Any help appreciated, Claire
1
by: Darren Jensen | last post by:
Hi, I have a machine which is running Windows Server 2003, IIS and .NET V1.1. I have been using this machine very well for about 6 months now for running ASP.NET on IIS and the occasional .NET...
0
by: Yoyako | last post by:
We made the application program by VB.Net. When I installed it into w2K PC the installer( SEUP.EXE) works fine. However I try to install it into Win XP/SP2 PC the installer( SEUP.EXE) show up...
0
by: Claire | last post by:
How can I switch between running Windows applications programmatically form C#? Any help appreciated, Claire
6
by: AP | last post by:
Hello, I am having trouble trying to assign an object to a running program in windows in VB.NET A COM component class with the same name as the windows program is avaliable to use in VB.NET. The...
4
by: Jeremy S. | last post by:
We're in the process of writing a new Windows Forms app and the desktop support folks want for it to be run from a network share. I know it's possible (i.e., just have the framework on the clients...
30
by: HangEveryRepubliKKKan | last post by:
Ahahahaha.. Lets see if I get this Demented Lintard reasoning right. Vista is a failure becuase after 300 days after it's release, it only has 7.5% of the OS market while the Lintard OS, is a...
0
by: =?Utf-8?B?Q2hyaXN0aW5h?= | last post by:
Whoever can figure this problem out will be a genius. I have a home network that includes: 2 desktop computers both running on Windows XP and 1 laptop running Windows Vista. The desktop computers...
7
by: Sheena777 | last post by:
I have just finished creating a windows application with visual studio 2005 and have made the setup package for it. Everything works fine when I go to install this program on my own computer it works...
1
by: bolineni | last post by:
Do i need to insatall any softwares when i am running windows mobile app in Palm tungsten E2(new) device.just i installed cd which is i got with device and synchronized with HotSync. Pls Give an...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.