php-install Digest 20 Jan 2003 21:30:43 -0000 Issue 1210

Topics (messages 9738 through 9746):

undefined variable error
        9738 by: Rod D
        9739 by: Timothy Hitchens \(HiTCHO\)

include() and cwd
        9740 by: Joe Laffey

PHP seems to be garbled?
        9741 by: Edwin Boersma

php & pear
        9742 by: Stain

Re: php install problem (--with-gd)
        9743 by: toby -

Re: [PEAR] php & pear
        9744 by: Xavier Noguer

Re: include() and cwd -Answer
        9745 by: Joe Laffey

Unable to load dynamic library php_oci8.dll on Windows XP SPK1
        9746 by: Andre Matos

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
hi folks,
 
i need help. i am currently taking a php course, my instructor can't even figure it out why i'm the only one getting this problem.
 
just installed php 4 in my system details below:
 
1. used php-4.3.0- IIS installer
2. have: win2kserver with IIS
            pentium 1G laptop
            ie 5.00
3. went to php.ini and changed extension_dir = "c:/php"
 
 
i can't seem to get my php to work if it involves "FORMS"
i have attached 2 files and below is what i am getting as my output:
   

Example 3-4: Form Results


Notice: Undefined variable: FirstName in c:\inetpub\wwwroot\myweb\example3-4.php on line 14
Your first name is .

Notice: Undefined variable: LastName in c:\inetpub\wwwroot\myweb\example3-4.php on line 15
Your last name is .

Notice: Undefined variable: Email in c:\inetpub\wwwroot\myweb\example3-4.php on line 16
Your E-mail address is .

Notice: Undefined variable: Comments in c:\inetpub\wwwroot\myweb\example3-4.php on line 17
This is what you had to say:
--- End Message ---
--- Begin Message ---
Global vars are turned off and you instructor needs to go back to
school.
 
 

Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED] 

 
 -----Original Message-----
From: Rod D [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 20 January 2003 4:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP-INST] undefined variable error



hi folks,
 
i need help. i am currently taking a php course, my instructor can't
even figure it out why i'm the only one getting this problem.
 
just installed php 4 in my system details below:
 
1. used php-4.3.0- IIS installer
2. have: win2kserver with IIS
            pentium 1G laptop
            ie 5.00
3. went to php.ini and changed extension_dir = "c:/php"
 
 
i can't seem to get my php to work if it involves "FORMS"
i have attached 2 files and below is what i am getting as my output:
    

Example 3-4: Form Results


Notice: Undefined variable: FirstName in
c:\inetpub\wwwroot\myweb\example3-4.php on line 14
Your first name is .

Notice: Undefined variable: LastName in
c:\inetpub\wwwroot\myweb\example3-4.php on line 15
Your last name is .

Notice: Undefined variable: Email in
c:\inetpub\wwwroot\myweb\example3-4.php on line 16
Your E-mail address is .

Notice: Undefined variable: Comments in
c:\inetpub\wwwroot\myweb\example3-4.php on line 17
This is what you had to say:

--- End Message ---
--- Begin Message ---
I just installed PHP 4.3.0 on 3 different systems. I built apache 1.3.27
and php with the exact same configure strings on each of the three
systems. I am having some strange issues with the cwd.

All systems have the same php.ini and almost identical httpd.conf files.
The directory structure has been mirrored among the three using rsync with
persmission ad users intact. So these all match.

I have a directory "mydir" with a subdirectory "subdir".

The script I am executing is "myscript.php" inside "mydir".

On linux:
 I can include("subdir/filename") and it works fine.

On Mac OS X (client):
 include("subdir/filename") fails (file not found)
 include("./subdir/filename") works

On NetBSd 1.5.3 Mac 68k (yeah, old)
 include("subdir/filename") fails (file not found)
 include("./subdir/filename") fails (file not found)
 Only including the full path works
 echo()ing the getcwd() returns an empty string


Including the full path works on all (so that is what I am using).

Any thoughts as to why this is happening, or how to avoid it. Note that
the files are inside a parent directory "/web". FWIW, web is world
executable, but not world readable.

I just tested it with the "/web/" directory 755 (world readable and
executable) and it works!

So the big question is: Am I crazy to expect PHP to work the same way on
these different un*x variants? IS this a known problem, and is there seom
other solution?

If unknown I may just dig through the source myself...

Thanks,

--
Joe Laffey              |  Want to convert subnet masks between different
LAFFEY Computer Imaging |  notations, or figure the number of IPs in a block?
St. Louis, MO           |  Whatmask-It's FREE - www.laffeycomputer.com/wm.html
------------------------------------------------------------------------------
--- End Message ---
--- Begin Message --- I successfully compiled PHP 4.3.0 on SuSE Linux 7.1 and Apache 1.3.22, using the same options as my previous version, 4.1.2: --with-mysql --with-apxs=/usr/local/apache/bin/apxs. When I start Apache, it cannot start because libphp4.so "seems to be garbled". What does this mean and how can I solve this?

Regards,
Edwin

--- End Message ---
--- Begin Message ---
hi all

i would install php with pear support, but i also would manually install pear.

well, to explain better, i would build php with apache, but while building php 
i don't want it to modify my pear installation. however i would make use of 
pear within php scrips (so i suppose i can't configure php with 
--without-pear option...).

can i have any information about it, since php manual is not so clear as i 
would...

thank you

bye, stain.

-- 
"If there is any, error is human"
--- End Message ---
--- Begin Message --- hi chir

i ve never worked with linux but heres a shot at ur problem

1. did u uncomment
extension=php_gd.dll

2. u need two more liberaries jpeg and tiff
get them

3. do
--with-gd
--with-jpeg-dir=C:\WINNT\system32\inetsrv\php\libjpeg
--with-tiff-dir=C:\WINNT\system32\inetsrv\php\tiff
change the C:\.... to ur paths


welll i hope this works for u

goodluck ....

toby ......

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--- End Message ---
--- Begin Message ---
El Lun 20 Ene 2003 08:37, Stain escribió:
> hi all
>
> i would install php with pear support, but i also would manually install
> pear.
>
> well, to explain better, i would build php with apache, but while building
> php i don't want it to modify my pear installation. however i would make
> use of pear within php scrips (so i suppose i can't configure php with
> --without-pear option...).

 the --without-pear option should work. To continue using your previous pear 
installation you just have to make sure that the pear install directory 
(usually /usr/share/pear on UNIX) is in your include path (include_path 
option on the php.ini file).

  Xavier

--- End Message ---
--- Begin Message ---
On Mon, 20 Jan 2003, Joe Laffey wrote:

> I just installed PHP 4.3.0 on 3 different systems. I built apache 1.3.27
> and php with the exact same configure strings on each of the three
> systems. I am having some strange issues with the cwd.
>
> All systems have the same php.ini and almost identical httpd.conf files.
> The directory structure has been mirrored among the three using rsync with
> persmission ad users intact. So these all match.
>
> I have a directory "mydir" with a subdirectory "subdir".
>
> The script I am executing is "myscript.php" inside "mydir".
>
> On linux:
>  I can include("subdir/filename") and it works fine.
>
> On Mac OS X (client):
>  include("subdir/filename") fails (file not found)
>  include("./subdir/filename") works
>
> On NetBSd 1.5.3 Mac 68k (yeah, old)
>  include("subdir/filename") fails (file not found)
>  include("./subdir/filename") fails (file not found)
>  Only including the full path works
>  echo()ing the getcwd() returns an empty string
>
>
> Including the full path works on all (so that is what I am using).
>
> Any thoughts as to why this is happening, or how to avoid it. Note that
> the files are inside a parent directory "/web". FWIW, web is world
> executable, but not world readable.
>
> I just tested it with the "/web/" directory 755 (world readable and
> executable) and it works!
>
> So the big question is: Am I crazy to expect PHP to work the same way on
> these different un*x variants? IS this a known problem, and is there seom
> other solution?
>

It looks like the getcwd call on the BSD systems returns the empty string
because it cannot read the parent directory. On linux getcwd uses the proc
filesystem to get this info when it cannot read the dir. Since the BSDs
(by default) don't have that they fail.

However, PHP should report an error when the PHP getcwd() fails due to
access restrictions. I shall report this as a bug.

A workaround to this, still allowing the scripts to be portable throught
the filesystem (i.e. no hard coded full paths is below):

<?
$scriptDir = dirname(getenv("DOCUMENT_ROOT").getenv("SCRIPT_NAME"));
include_once("$scriptDir/subdir/standard.inc");

...

?>

Include ALL files with the $scriptDir first and you are set. I think this
would be a good general practice to avoid this problem on any system where
it might occur.


--
Joe Laffey              |  Want to convert subnet masks between different
LAFFEY Computer Imaging |  notations, or figure the number of IPs in a block?
St. Louis, MO           |  Whatmask-It's FREE - www.laffeycomputer.com/wm.html
------------------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
Hi,

I am receiving the mensage "Unable to load dynamic library
"C:\ApacheGroup\PHP\extensions\php_oci8.dll"

I am using Windows XP SPK1 with Apache2.0.43 with PHP4-4.2.3.

I tried to use with Oracle but when I uncomment the line:

extension=php_oci8.dll

I started to receive this mensage:

Unable to load dynamic library "C:\ApacheGroup\PHP\extensions\php_oci8.dll


Regards,
Andre Matos


--- End Message ---

Reply via email to