I wrote a PHP content management system and it worked fine on old
servers. I just moved it to a new server on Rackspace. I'm trying to
debug. At the top of the first file (index.php) I need to include a
file. The file won't be included. In the code below, $success remains
false. I've checked a million times and the file is there.
error_reporting (E_ALL);
$success = include("ppKern el/McControllerFor All.php");
if (!$success) $success = include("ppExtr as/McControllerFor All.php");
if (!$success) $success = include("McCont rollerForAll.ph p");
if (!$success) $success = @include("../McControllerFor All.php");
if (!$success) $success = @include("../../McControllerFor All.php");
if (!$success) $success = @include("../../../McControllerFor All.php");
if (!$success) $success =
@include("../../../../McControllerFor All.php"); 6 1386
did you print the value of $succes ? and does the first file has (and the
others) a "return" at the end ? if not, after a successfull include $success
will have value "1" which will results in failure on the checks ....
see include manual for details info.
<lk******@geoci ties.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. . I wrote a PHP content management system and it worked fine on old servers. I just moved it to a new server on Rackspace. I'm trying to debug. At the top of the first file (index.php) I need to include a file. The file won't be included. In the code below, $success remains false. I've checked a million times and the file is there. error_reporting (E_ALL);
$success = include("ppKern el/McControllerFor All.php"); if (!$success) $success = include("ppExtr as/McControllerFor All.php"); if (!$success) $success = include("McCont rollerForAll.ph p"); if (!$success) $success = @include("../McControllerFor All.php"); if (!$success) $success = @include("../../McControllerFor All.php"); if (!$success) $success = @include("../../../McControllerFor All.php"); if (!$success) $success = @include("../../../../McControllerFor All.php"); lk******@geocit ies.com wrote : I wrote a PHP content management system and it worked fine on old servers. I just moved it to a new server on Rackspace. I'm trying to debug. At the top of the first file (index.php) I need to include a file. The file won't be included. In the code below, $success remains false. I've checked a million times and the file is there. error_reporting (E_ALL);
$success = include("ppKern el/McControllerFor All.php"); if (!$success) $success = include("ppExtr as/McControllerFor All.php"); if (!$success) $success = include("McCont rollerForAll.ph p"); if (!$success) $success = @include("../McControllerFor All.php"); if (!$success) $success = @include("../../McControllerFor All.php"); if (!$success) $success = @include("../../../McControllerFor All.php"); if (!$success) $success = @include("../../../../McControllerFor All.php");
do you know what the include_path is set to in your php config
settings? (php.ini or equivilent) are you able to modify that setting,
or at least check it?
--
talk to the teacher now and then about something other than the subject
The include path reads like this:
include_path .:/usr/share/pear .:/usr/share/pear lk******@geocit ies.com wrote: I wrote a PHP content management system and it worked fine on old servers. I just moved it to a new server on Rackspace. I'm trying to debug. At the top of the first file (index.php) I need to include a file. The file won't be included. In the code below, $success remains false. I've checked a million times and the file is there. include_once ("db_fns.php ");
error_reporting (E_ALL);
$success = include("ppKern el/McControllerFor All.php"); if (!$success) $success = include("ppExtr as/McControllerFor All.php"); if (!$success) $success = include("McCont rollerForAll.ph p"); if (!$success) $success = @include("../McControllerFor All.php"); if (!$success) $success = @include("../../McControllerFor All.php"); if (!$success) $success = @include("../../../McControllerFor All.php"); if (!$success) $success = @include("../../../../McControllerFor All.php");
I am not positive but I think you have to fully qualify your
path name. Try setting up an ini_set statement. For example my
ISP requires the following:
ini_set('includ e_path','/usr/local/lib/php');
You should then be able to use your first include statement.
HTH
Jerry lk******@geocit ies.com wrote: I wrote a PHP content management system and it worked fine on old servers. I just moved it to a new server on Rackspace. I'm trying to debug. At the top of the first file (index.php) I need to include a file. The file won't be included. In the code below, $success remains false. I've checked a million times and the file is there.
error_reporting (E_ALL); $success = include("ppKern el/McControllerFor All.php"); if (!$success) $success = include("ppExtr as/McControllerFor All.php");
Most likely, this is a permissions problem. The user on behalf
of which Apache is running must be allowed to read the file
being included. When this is not the case, an include() can't
take place.
On shared servers, these permission are ususally set up
automatically during account activation. At Rackspace,
where you get a dedicated server, you are the administrator
and must make sure the correct privileges are set.
Cheers,
NC
Okay, apparently it turned out that the file I was trying to include
had a parse error in it. Not sure how. The buffer didn't allow the
error message to reach my screen. I don't have ssh on this machine so I
had no easy way to check the PHP error log.
I did ob_off_flush(), or whatever that command is, but it didn't help.
The text didn't reach my screen. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: wEEdpEckEr |
last post by:
Hi,
here's the deal:
I have a config.php file in which I have set a few var's, to use in the
whole site. E.g.:
$db_host = "localhost";
Then I also have a class, which is supposed to handle all database
functions. In this class I try to recover the var's from my config file,
|
by: Brad Tilley |
last post by:
I've written and tested a *very basic* socket server that I'll have to
deploy soon... sooner than I'd like as much of the functionality that I
want to include hasn't been implemented or even tested yet. So, I've
been thinking about writing a function that has the ability to upgrade
the socket server remotely. However, I have never done anything like
this so I'm looking for tips and advice on the subject.
The socket server runs...
|
by: puzzlecracker |
last post by:
Large scale C++ software design, by John Lakos - people any good
recommendations to this book?
|
by: hntgzr |
last post by:
I am trying to include a function in a .php file on a different server from
the main .php files.
I am using:
include_path=http://www.anotherserver.com/foldername;
include(http://www.anotherserver.com/foldername/phpfiletocall.inc);
The .inc file is php formatted. Variables are passed to it (not via GET or
POST though) and returned using return(variablenames, etc);
|
by: JDS |
last post by:
Hi all. I don't know if this is possible, and if it is, whether it needs
to be done within Apache configuration or PHP configuration, but here goes:
I am migrating my web server to another machine. In fact, it is two
machines -- one for the web server itself, and one as a data server for
user home directories and MySQL.
The users' home dirs will be mounted on the web server as NFS mounts.
Now, the original, current, configuration...
| |
by: John Wells |
last post by:
Yes, I know you've seen the above subject before, so please be gentle with
the flamethrowers.
I'm preparing to enter a discussion with management at my company
regarding going forward as either a MySql shop or a Postgresql shop.
It's my opinion that we should be using PG, because of the full ACID
support, and the license involved. A consultant my company hired before
bringing me in is pushing hard for MySql, citing speed and community...
|
by: Steve Pope |
last post by:
Compiling the following works on my system:
file main.cpp:
#include <iostream>
namespace space {
int foo;
}
|
by: mark4asp |
last post by:
I moved a page to another web-site and now it's broke!
I had 5 pages in their own web-site. These pages have now been moved
to another web-site. Everything is fine except that one of the pages,
which I had trouble with in the past (i.e. same problem), is now
partly broke. The paging no longer fully works in the gridview.
The gvAwarded_RowDataBound code works to load the ddlPager with the
correct number of pages.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |