Unable to chdir("..") -- blocks phpMyAdmin setup

Unable to chdir("..") -- blocks phpMyAdmin setup

am 29.01.2007 21:34:09 von Reinhard Mayr aka Czerwinski

Hi on the list!

I encountered severe troubles when I tried to get phpMyAdmin running. Strange things are happening:

There is a script: phpMyAdmin\scripts\setup.php. When I change into that directory and call "php-cgi setup.php", I recieve a nice HTML output. When I do that via http://server/mysql/scripts/setup.php, I reviece error messages:
-----
D:\FileServer\IT\mysql\phpMyAdmin\scripts PHP Warning: chdir() [function.chdir]: No such file or directory (errno 2) in D:\FileServer\IT\mysql\phpMyAdmin\scripts\setup.php on line 11 PHP Warning: require_once(./libraries/common.lib.php) [function.require-once]: failed to open stream: No such file or directory in D:\FileServer\IT\mysql\phpMyAdmin\scripts\setup.php on line 12 PHP Fatal error: require_once() [function.require]: Failed opening required './libraries/common.lib.php' (include_path='.;C:\php5\pear') in D:\FileServer\IT\mysql\phpMyAdmin\scripts\setup.php on line 12
-----

hmmm.... looks like I am not able to change the directory. I wonder where I am and add a line in the beginning before the chdir('..') statement:
echo getcwd() . "\n";

I call from command line interface (CLI) and get:
´╗┐D:\FileServer\IT\mysql\phpMyAdmin\scripts

And I wonder where these strange signs before the path originate from...

I call via http, and the working directory looks nice, but maybe that's just a matter of presentation. I try setting the working directory by a hard-coded chdir statement. Works fine with CLI, but it turns out that when called via http the working directory never changes!

I even tried to go on ISAPI, but the situation did not improve -- An earlier script failed to chdir...

Please, help me finding out why it behaves like that and how I can get the script running!

Thanks very much!

Cz.

OS: Windows Server 2003
Server: IIS6
PHP 5.2.0 via CGI
MySQL 5.0.27

--
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Unable to chdir("..") -- blocks phpMyAdmin setup

am 30.01.2007 10:54:19 von Reinhard Mayr aka Czerwinski

Well.... that was strange. My fix was:

php.ini had entries for upload_tmp_dir and session.save_path pointing to a local dir c:\documents and settings\\local settings\temp\php\upload. Although I created this directory and set permissions to IUSR, it did not work. I set upload_tmp_dir=c:\temp and commented out session.save_path ... and now it works fine...

Cheers,

Cz.
-------- Original-Nachricht --------
Datum: Tue, 30 Jan 2007 08:21:50 +0700
Von: "bedul"
An: "Reinhard Mayr aka Czerwinski"
Betreff: Re: [PHP-WIN] Unable to chdir(\'..\') -- blocks phpMyAdmin setup

> i think..
> you mistaken on chdir?
> what i know.. chdir("..") is false.. the right was
> chdir("../");
>
> cmiiw
>
>
> regard
> ----- Original Message -----
> From: "Reinhard Mayr aka Czerwinski"
> To:
> Sent: Tuesday, January 30, 2007 3:34 AM
> Subject: [PHP-WIN] Unable to chdir('..') -- blocks phpMyAdmin setup
>
>
> > Hi on the list!
> >
> > I encountered severe troubles when I tried to get phpMyAdmin running.
> Strange things are happening:
> >
> > There is a script: phpMyAdmin\scripts\setup.php. When I change into that
> directory and call "php-cgi setup.php", I recieve a nice HTML output. When
> I
> do that via http://server/mysql/scripts/setup.php, I reviece error
> messages:
> > -----
> > D:\FileServer\IT\mysql\phpMyAdmin\scripts PHP Warning: chdir()
> [function.chdir]: No such file or directory (errno 2) in
> D:\FileServer\IT\mysql\phpMyAdmin\scripts\setup.php on line 11 PHP
> Warning:
> require_once(./libraries/common.lib.php) [function.require-once]: failed
> to
> open stream: No such file or directory in
> D:\FileServer\IT\mysql\phpMyAdmin\scripts\setup.php on line 12 PHP Fatal
> error: require_once() [function.require]: Failed opening required
> './libraries/common.lib.php' (include_path='.;C:\php5\pear') in
> D:\FileServer\IT\mysql\phpMyAdmin\scripts\setup.php on line 12
> > -----
> >
> > hmmm.... looks like I am not able to change the directory. I wonder
> where
> I am and add a line in the beginning before the chdir('..') statement:
> > echo getcwd() . "\n";
> >
> > I call from command line interface (CLI) and get:
> > ´╗┐D:\FileServer\IT\mysql\phpMyAdmin\scripts
> >
> > And I wonder where these strange signs before the path originate from...
> >
> > I call via http, and the working directory looks nice, but maybe that's
> just a matter of presentation. I try setting the working directory by a
> hard-coded chdir statement. Works fine with CLI, but it turns out that
> when
> called via http the working directory never changes!
> >
> > I even tried to go on ISAPI, but the situation did not improve -- An
> earlier script failed to chdir...
> >
> > Please, help me finding out why it behaves like that and how I can get
> the
> script running!
> >
> > Thanks very much!
> >
> > Cz.
> >
> > OS: Windows Server 2003
> > Server: IIS6
> > PHP 5.2.0 via CGI
> > MySQL 5.0.27
> >
> > --
> > "Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
> > Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >

--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php