|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-05-26 18:53 UTC] admin at donelson dot net
I saw in the docs that windows does not include http/ftp for some reason. Looking at the dates of the other simular messages I would think it would have been fixed by now. Any way I wrote the code and uploaded it to my host which is a unix box with apache. When run it from my site it does not include / require the intended file. Now, I use the Zend Studio and Integrated debugger, If I debug the page, localhost or remote windows or unix, IT WORKS! Why is this? Do I have to have everyone that will visit my page download and install the Zend Debugger and debug my site to see it? I have been stuck on this for months and monitoring for a fix or answer and nothing. HELP! btw heres some code and a URL so you can check it out. http://www.donelson.net/InetX/test.php Go here and you get this message: Fatal error: Cannot instantiate non-existent class: iunknown in /home/andydonelson/www/InetX/test.php on line 5 Why? A file that does exist on the server is not being loaded. Here is the require() call rom test.php line 5: require_once("http://www.donelson.net/InetX/Interface/IUnknown.php"); Purpose? no matter where you run this script, it will get this file from this location. Remember, This code works on a windows XP Home machine when debugging the page with Zend Debugger, But it wont work if I just open a brower and visit the page. On windows or unix. The debugger makes it work for windows (local) and unix (remote) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Mar 14 14:00:02 2026 UTC |
Here is the scripts you requested. I had done as you asked and looked into reporting a bug and here is the end result. This order.php reproduces the error perfectly. order.php is supposed to include McDonalds.php so it knows how to place and receive and order. <?PHP /* save anywhere as order.php */ /* Project: PHPBug File: order.php Purpose: To order a Happy Meal from another server. */ /* error info from Windows: PHP Script Interpreter szAppName : php.exe szAppVer : 4.3.3.3 szModName : php4ts.dll szModVer : 4.3.3.3 offset : 000b2edf */ // Enable first line below for local testing, // second URL local testing (not working), and third for actual usage (not Working) // The support files are uploaded for testing purposes. //require("phpBug/McDonalds.php"); // Works //require("http://localhost/phpBug/McDonalds.php"); // Nope require("http://www.donelson.net/phpBug/McDonalds.php"); // Nope $meal = new HappyMeal(1); $meal->Buy(); ?> <?php /* This file included just so you can see the source. It is at http://www.donelson.net/phpBug/McDonalds.php */ // Enable first line below for local testing, // second URL local testing, and third for actual usage // The support files are uploaded for testing purposes. require("food.php"); //require("http://localhost/phpBug/food.php"); //require("http://www.donelson.net/phpBug/food.php"); class HappyMeal { var $m_meal = array(); var $m_burger; var $m_side; var $m_drink; function HappyMeal($number=1) { $this->m_meal['burger'] = new Burger($number); $this->m_meal['side'] = new Side($number); $this->m_meal['drink'] = new Drink($number); } function Buy() { foreach ($this->m_meal as $item) { echo sprintf("Preparing %s<br />",$item->Prepare()); } } } ?> <?php /* This file included just so you can see the source. It is at http://www.donelson.net/phpBug/food.php */ class Item { var $name = ''; function Prepare() { return $this->name; } } class Burger extends Item { var $name = 'BigMAC'; } class Side extends Item { var $name = 'Fries'; } class Drink extends Item { var $name = 'Dr Pepper'; } ?>