473,604 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Includes in PHP causes Failure.


First off, I'm posting this question for a friend that doesn't have
access to the news groups.

Problem:
Using PHP as the base and has several PHP < includes > for various
functions, all this by its self works just fine.

Failure occurs on adding the XML include.

Here's the wierd: If all the PHP includes are removed/commented out,
the XML includes work fine. As soon as you replace/uncomment the PHP
includes everything fails.

Any Idea's would be greatly appreciated.

J

Jul 17 '05 #1
2 1603
Joe Mowry <jm****@joment. com> wrote in
news:k4******** *************** *********@4ax.c om:

First off, I'm posting this question for a friend that doesn't have
access to the news groups.

Problem:
Using PHP as the base and has several PHP < includes > for various
functions, all this by its self works just fine.

Failure occurs on adding the XML include.

Here's the wierd: If all the PHP includes are removed/commented out,
the XML includes work fine. As soon as you replace/uncomment the PHP
includes everything fails.

Any Idea's would be greatly appreciated.

J


just an idea...

make sure the PHP-includes open with: <?php and not just <?

Jul 17 '05 #2
Here are the code snippets of three pieces. The first is where the
problem comes in. When you uncomment the includes/DBConnector.php and
following lines, it fails.

file: _enginGallerySv r.php
<?php
include("feed/xmlrpc.inc");
include("feed/xmlrpcs.inc");

function eventList($para ms){

$pUserID=$param s->getParam(0);
$pPassword=$par ams->getParam(1);
$pType=$params->getParam(2);
$pMaxWidth=$par ams->getParam(3);
$pMaxHeight=$pa rams->getParam(4);
$pQuality=$para ms->getParam(5);
$pUseFixed=$par ams->getParam(6);
$pFixedWidth=$p arams->getParam(7);
$pFixedHeight=$ params->getParam(8);
$pHStyle=$param s->getParam(9);
$pSStyle=$param s->getParam(10) ;

// require_once('i ncludes/DbConnector.php ');
// $connector = new DbConnector();
// require_once('i ncludes/ImageManipulati on.php');
// require_once('i ncludes/SystemComponent .php');
// $settings = SystemComponent ::getSettings() ;

$dbstr="<div class='".$pSSty le->scalarval()."' >--
SUCCESS
--".$pUserID->scalarval(). "-".$pPasswor d->scalarval(). "</div>";

//...

return new xmlrpcresp(new xmlrpcval($dbst r,
"string"));
}

$s=new xmlrpc_server(a rray("wiplus.ev entList" =>

array("function " => "eventList" )));
?>
============
file :SystemComponen t.php
<?php
class SystemComponent {

var $settings;

function getSettings() {

// System variables
$settings['uploadDir'] = '../../../';
// Main Collection Images
$settings['thumbDir'] = 'imagethumbs/';
$settings['imageDir'] = 'imagelib/';
// Web Gallery Thumbnails
$settings['thumbDirWG'] = 'imagethumbs2/'; // High Res Images
$settings['imageDirHR'] = 'imagelib2/'; // Member Profile
Images
$settings['imageDirPR'] = 'imagelib3/';

// Database variables
$settings['dbhost'] = '99.99.99.99';
$settings['dbusername'] = 'myuser';
$settings['dbpassword'] = 'mypassword';
$settings['dbname'] = 'mydbname';

return $settings;

}

}
?>
=============
file: DbConnector.php
<?php
////////////////////////////////////////////////////////////////////////////////////////
// Class: DbConnector
// Purpose: Connect to a database, MySQL version
///////////////////////////////////////////////////////////////////////////////////////
require_once 'SystemComponen t.php';

class DbConnector extends SystemComponent {

var $theQuery;
var $link;

//*** Function: DbConnector, Purpose: Connect to the database ***
function DbConnector(){

// Load settings from parent class
$settings = SystemComponent ::getSettings() ;

// Get the main settings from the array we just loaded
$host = $settings['dbhost'];
$db = $settings['dbname'];
$user = $settings['dbusername'];
$pass = $settings['dbpassword'];

// Connect to the database
$this->link = mysql_connect($ host, $user, $pass);
mysql_select_db ($db);
register_shutdo wn_function(arr ay(&$this, 'close'));

}

//*** Function: query, Purpose: Execute a database query *** function
query($query) {
$this->theQuery = $query;
return mysql_query($qu ery, $this->link); }

//*** Function: getQuery, Purpose: Returns the last database query,
for debugging *** function getQuery() {
return $this->theQuery;
}

//*** Function: getNumRows, Purpose: Return row count, MySQL
versi6*** function getNumRows($res ult){
return mysql_num_rows( $result);
}

//*** Function: fetchArray, Purpose: Get array of query results ***
function fetchArray($res ult) {
return mysql_fetch_arr ay($result);
}

//*** Function: close, Purpose: Close the connection *** function
close() {
mysql_close($th is->link);
}
}
?>
On Tue, 19 Apr 2005 10:11:17 -0500, in comp.lang.php you wrote:
Joe Mowry <jm****@joment. com> wrote in
news:k4******* *************** **********@4ax. com:

First off, I'm posting this question for a friend that doesn't have
access to the news groups.

Problem:
Using PHP as the base and has several PHP < includes > for various
functions, all this by its self works just fine.

Failure occurs on adding the XML include.

Here's the wierd: If all the PHP includes are removed/commented out,
the XML includes work fine. As soon as you replace/uncomment the PHP
includes everything fails.

Any Idea's would be greatly appreciated.

J
just an idea...

make sure the PHP-includes open with: <?php and not just <?


On Mon, 18 Apr 2005 20:39:08 -0400, Joe Mowry <jm****@joment. com>
wrote:

First off, I'm posting this question for a friend that doesn't have
access to the news groups.

Problem:
Using PHP as the base and has several PHP < includes > for various
functions, all this by its self works just fine.

Failure occurs on adding the XML include.

Here's the wierd: If all the PHP includes are removed/commented out,
the XML includes work fine. As soon as you replace/uncomment the PHP
includes everything fails.

Any Idea's would be greatly appreciated.

J


Jul 17 '05 #3

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

Similar topics

6
6968
by: VK | last post by:
I'm using window.open method in my script to open poup window. Recently Internet Explorer users reported that the script crashes on their machine with different runtime errors. See the bug: <http://support.microsoft.com/default.aspx?scid=kb;en-us;888021> The statement like myPopup = window.open(args); gives you runtime error and halts the script execution *if a 3rd party
7
2359
by: MyndPhlyp | last post by:
I am building up a library of Class'es that represent various columns of table layouts. One often used column is "name" and each occurrence is treated identically. (What a concept, eh?) Part of that library of Class'es includes representations of various tables. (Just let me know if you see a trend going on here.) These Class'es use the column Class'es. What I would like to do, but I have yet to find a way around duplicated names, is...
7
5941
by: James Leddy | last post by:
For some reason, I get a segmentation fault when I exit this program I made. Most of the time when I have seen this it has occured in the middle of the program and the program terminates. However, in this instance, the program gets a segmentation fault on exit. I already posted this question, but people were asking for some code, so here it is: #define DWORD unsigned long
3
1241
by: Venkat | last post by:
This is the piece of code in Early Binding and works as expected. --------------------------------------------------------------------------- using ControlLicenseService LicenseInfoClient lic =new ControlLicenseService LicenseInfoClient(); lic.Initialize("sk26901CODA904O",10300); if (lic.IsSuccess ) { MessageBox.Show("Success"); }
8
5022
by: John Blair | last post by:
Hi, I updated the latest .Net patch on my system this moring and now my SQL Web Data Administrator application is not working. I get the following error: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
6
2859
by: William F. Zachmann | last post by:
We've got a project going that involves moving an old web site with a massive dll written in C++ that produces most of the output from a SQL 7.0 data base on NT4 onto IIS on Windows 2003 Server with SQL 2000. All new code is being written in C# using ASP.NET and we are using forms authentication to control access to particular directories/applications. We are having a hard time figuring out how to configure the thing so that existing...
6
3410
by: DFS | last post by:
One of my systems grew exponentially - from 13mb to 43mb - after adding some 10 temp tables (with no data), a new form, and about a thousand lines of code. The .mdb has mostly table links, lots of forms and queries, and a good bit of code overall. But 43mb is totally unreasonble. I can't figure out where the problem is occurring. It was fine for a long time. I even created a new file and imported the objects and it blew back up to...
7
2543
by: semut | last post by:
Given that the string is of null-terminated type. What could be the possible causes (by experience) the string to have no null character (\0) and cause buffer overflow later. I know it is quite broad, just like to find out the causes as much as possible so that I could impose stricter checking toward my codes. note: I could not use std::string cause it will require a total rewrite.
6
3548
by: Marvin Barley | last post by:
I have a class that throws exceptions in new initializer, and a static array of objects of this type. When something is wrong in initialization, CGI program crashes miserably. Debugging shows uncaught exception. How to catch an exception that happened before main() try { ... } catch (...) { ... } block? Is there a way?
0
7997
marktang
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...
0
7929
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,...
0
8409
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 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...
1
8065
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,...
0
5441
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3907
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3955
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2434
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
0
1266
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 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...

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.