PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old March 9th, 2006, 10:36 AM
henrik1409 henrik1409 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Copenhagen, Denmark
Posts: 1 henrik1409 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Include Issue - No vars passed

Hi!

I have the strangest problem i have ever seen while working with PHP. I'm running on Suse Linux with PHP 4.3.4.

The easiest way to explain is through an example:

php Code:
Original - php Code
  1. //MyIncludeFile.inc:
  2.  
  3. $myVar = "apple";
  4.  
  5. function echoVar() {
  6. global $myVar;
  7.     echo $myVar;
  8. }
  9.  
  10. //MyRunFile.php:
  11.  
  12. include "MyIncludeFile.inc";
  13.  
  14. echo $myVar;// no output - failure
  15.  
  16. echoVar(); //outputs "apple" - success
  17.  


This is so #&?!# strange that i can't begin to see where the problem lies. I'm a pretty experienced PHP user and modest Linux.

Heres my config line:
'./configure' '--prefix=/usr' '--datadir=/usr/share/php' '--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib' '--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' '--disable-debug' '--enable-inline-optimization' '--enable-memory-limit' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild' '--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli' '--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork' 'i586-suse-linux'

Reply With Quote
  #2  
Old March 9th, 2006, 09:48 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,721 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 26 m 5 sec
Reputation Power: 6
RE: Include Issue - No vars passed

That is odd. I can't give you any direction - but if you don't find an answer here - I suggest you try the php-general mailing list.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Include Issue - No vars passed


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway