List Info

Thread: PHP 5.1.3/5.1.4 FastCGI & pathinfo




PHP 5.1.3/5.1.4 FastCGI & pathinfo
user name
2006-05-07 13:44:40
Hi all,

I noticed after upgrading a server from PHP 5.1.2 to 5.1.4
that
suddenly phpMyAdmin is complaining that
"PmaAbsoluteUri" isn't set.
As far as I understand, this warning is caused by the
automatic
path detection failing. It wasn't there with PHP 5.1.2.

The PHP changelog states the FastCGI interface was entirely
rewritten
for 5.1.3, which I guess is the cause.

Does anyone know the correct combination of PHP compile
options, php.ini
settings (cgi.fix_pathinfo) and lighttpd settings
(broken-scriptfilename) that makes things work correctly
with PHP
5.1.3/5.1.4?

-- 
GCP

PHP 5.1.3/5.1.4 FastCGI & pathinfo
user name
2006-05-07 16:21:03
On 2006-05-07 15:44:40 +0200, Gian-Carlo Pascutto wrote:
> I noticed after upgrading a server from PHP 5.1.2 to
5.1.4 that
> suddenly phpMyAdmin is complaining that
"PmaAbsoluteUri" isn't set.
> As far as I understand, this warning is caused by the
automatic
> path detection failing. It wasn't there with PHP
5.1.2.
> 
> The PHP changelog states the FastCGI interface was
entirely rewritten
> for 5.1.3, which I guess is the cause.
> 
> Does anyone know the correct combination of PHP compile
options, php.ini
> settings (cgi.fix_pathinfo) and lighttpd settings
> (broken-scriptfilename) that makes things work
correctly with PHP
> 5.1.3/5.1.4?

just set the uri in the config?

darix

-- 
           openSUSE - SUSE Linux is my linux
               openSUSE is good for you
                   www.opensuse.org

PHP 5.1.3/5.1.4 FastCGI & pathinfo
user name
2006-05-07 16:23:36
Marcus Rueckert wrote:
> On 2006-05-07 15:44:40 +0200, Gian-Carlo Pascutto
wrote:
> 
>>I noticed after upgrading a server from PHP 5.1.2 to
5.1.4 that
>>suddenly phpMyAdmin is complaining that
"PmaAbsoluteUri" isn't set.
>>As far as I understand, this warning is caused by
the automatic
>>path detection failing. It wasn't there with PHP
5.1.2.
>>
>>The PHP changelog states the FastCGI interface was
entirely rewritten
>>for 5.1.3, which I guess is the cause.
>>
>>Does anyone know the correct combination of PHP
compile options, php.ini
>>settings (cgi.fix_pathinfo) and lighttpd settings
>>(broken-scriptfilename) that makes things work
correctly with PHP
>>5.1.3/5.1.4?
> 
> 
> just set the uri in the config?

Hiding problem != solving it.

-- 
GCP

PHP 5.1.3/5.1.4 FastCGI & pathinfo
user name
2006-05-07 18:54:07
On May 7, 2006, at 15:44, Gian-Carlo Pascutto wrote:

> I noticed after upgrading a server from PHP 5.1.2 to
5.1.4 that
> suddenly phpMyAdmin is complaining that
"PmaAbsoluteUri" isn't set.
> As far as I understand, this warning is caused by the
automatic
> path detection failing. It wasn't there with PHP
5.1.2.
>
> The PHP changelog states the FastCGI interface was
entirely rewritten
> for 5.1.3, which I guess is the cause.
>
> Does anyone know the correct combination of PHP compile
options,  
> php.ini
> settings (cgi.fix_pathinfo) and lighttpd settings
> (broken-scriptfilename) that makes things work
correctly with PHP
> 5.1.3/5.1.4?

Your message prompted me to finally upgrade to 5.1.4. We had
problems  
with 5.1.3 (like everyone else, of course) so I wasn't in
any hurry  
to try 5.1.4, but now I did. phpMyAdmin continues to work
for me! I  
don't have the pmaAbsoluteUrl specified, and I don't get
any message  
about needing to. I wonder why it's not working for you....




PHP 5.1.3/5.1.4 FastCGI & pathinfo
user name
2006-05-07 22:24:46
On 2006-05-07 18:23:36 +0200, Gian-Carlo Pascutto wrote:
> > just set the uri in the config?
> 
> Hiding problem != solving it.

it is not really hiding the problem. i run all my instances
with this
setting set. no matter if apache+mod_php or
apache/lighttpd+php via
fastcgi.

darix

-- 
           openSUSE - SUSE Linux is my linux
               openSUSE is good for you
                   www.opensuse.org

PHP 5.1.3/5.1.4 FastCGI & pathinfo
user name
2006-05-08 05:33:37
Ryan Schmidt wrote:

> Your message prompted me to finally upgrade to 5.1.4.
We had problems 
> with 5.1.3 (like everyone else, of course) so I wasn't
in any hurry  to
> try 5.1.4, but now I did. phpMyAdmin continues to work
for me! I  don't
> have the pmaAbsoluteUrl specified, and I don't get any
message  about
> needing to. I wonder why it's not working for you....

Which lighttpd settings, PHP compile options, php.ini
options?

-- 
GCP

PHP 5.1.3/5.1.4 FastCGI & pathinfo
user name
2006-05-08 06:02:28
On Son 07.05.2006 18:23, Gian-Carlo Pascutto wrote:
>Marcus Rueckert wrote:
>> 
>> just set the uri in the config?
>
>Hiding problem != solving it.

Due the fact that i don't know which phpmyadmin version you
are using i
have looked in the latest one from:

htt
p://www.phpmyadmin.net/home_page/downloads.php =>
2.8.0.3

And in the code of libraries/Config.class.php is the
following comment:

---
/**
     * $cfg['PmaAbsoluteUri'] is a required directive else
cookies won't be
     * set properly and, depending on browsers, inserting or
updating a
     * record might fail
     */
---

and http:
//www.phpmyadmin.net/documentation/#config mean:

---
$cfg[PmaAbsoluteUri] string

Sets here the complete URL (with full path) to your
phpMyAdmin
installation's
directory.
E.g. http://www.your_web.net/path_to_your_phpMyAdmin_direc
tory/. Note
also that the URL on some web servers are case?sensitive.
Don't forget
the trailing slash at the end.

Starting with version 2.3.0, it is advisable to try leaving
this
blank. In most cases phpMyAdmin automatically detects the
proper
setting. Users of port forwarding will need to set
PmaAbsoluteUri (more
info). A good test is to browse a table, edit a row and save
it. There
should be an error message if phpMyAdmin is having trouble
auto?detecting the correct value. If you get an error that
this must be
set or if the autodetect code fails to detect your path,
please post a
bug report on our bug tracker so we can improve the code.
---

If you don't set it the code try to search for it.

Here some links from google search:

http://archives.neohapsis.com/archives/mysql/2005-
q2/0639.html
http://www.n
etvigilance.com/advisory0005
http://friendso
fed.infopop.net/2/OpenTopic?a=tpc&s=989094322&f=5293
053165&m=622109323

HTH && regards

Alex

PHP 5.1.3/5.1.4 FastCGI & pathinfo
user name
2006-05-08 10:54:52
I think you're misunderstanding the problem. In the text
you quoted,
note this part:

> Starting with version 2.3.0, it is advisable to try
leaving this
> blank. In most cases phpMyAdmin automatically detects
the proper
> setting. Users of port forwarding will need to set
PmaAbsoluteUri (more
> info). A good test is to browse a table, edit a row and
save it. There
> should be an error message if phpMyAdmin is having
trouble
> auto?detecting the correct value. If you get an error
that this must be
> set or if the autodetect code fails to detect your
path, please post a
> bug report on our bug tracker so we can improve the
code.


The issue is that with PHP 5.1.2 + lighttpd this automatic
detection
WORKS, whereas with PHP 5.1.4 + lighttpd it FAILS [1].

I'm not interested in getting rid of the warning, I am
interested in
what is causing it to appear after the upgrade. It seems PHP
+ lighttpd
behaviour changed with regards to this.

PATH_INFO seems to be a quite fragile thing, note that for
example the
PHP configuration has things like cgi.fix_pathinfo and
lighttpd itself
has workarounds such as the
"broken-scripfilename" setting. Perhaps PHP
5.1.4 broke one of the workarounds, or simply doesn't need
them anymore,
and this is what I'm interested in, not phpMyAdmin...

[1] phpMyAdmin seems to work regardless, but for the third
time, that's
not the issue.

-- 
GCP

PHP 5.1.3/5.1.4 FastCGI & pathinfo
user name
2006-05-08 11:34:16
On May 8, 2006, at 08:02, Alexander Lazic wrote:

> Due the fact that i don't know which phpmyadmin
version you are  
> using i
> have looked in the latest one from:
>
> htt
p://www.phpmyadmin.net/home_page/downloads.php =>
2.8.0.3
>
> And in the code of libraries/Config.class.php is the
following  
> comment:
>
> ---
> /**
>     * $cfg['PmaAbsoluteUri'] is a required directive
else cookies  
> won't be
>     * set properly and, depending on browsers,
inserting or updating a
>     * record might fail
>     */
> ---

The comment must be old. The directive is not required, and
as you  
saw in the documentation:

> Starting with version 2.3.0, it is advisable to try
leaving this
> blank. In most cases phpMyAdmin automatically detects
the proper
> setting. [snip]

it's a good idea to leave it blank because in most cases
the URI get  
auto-detected. The auto-detection code was fairly
bullet-proof as of  
the end of the 2.7.x series. In 2.8.0 it was rewritten again
and some  
problems were introduced, but I believe 2.8.0.3 is stable
again.


PHP 5.1.3/5.1.4 FastCGI & pathinfo
user name
2006-05-08 11:42:35
On May 8, 2006, at 07:33, Gian-Carlo Pascutto wrote:

> Ryan Schmidt wrote:
>
>> Your message prompted me to finally upgrade to
5.1.4. We had problems
>> with 5.1.3 (like everyone else, of course) so I
wasn't in any  
>> hurry  to
>> try 5.1.4, but now I did. phpMyAdmin continues to
work for me! I   
>> don't
>> have the pmaAbsoluteUrl specified, and I don't get
any message  about
>> needing to. I wonder why it's not working for
you....
>
> Which lighttpd settings, PHP compile options, php.ini
options?


In my lighttpd.conf I have PHP set up this way:

	fastcgi.server = (".php" =>
		("localhost" =>
			(
				"socket" =>
"/tmp/php5-fastcgi-socket",
				"bin-path" =>
"/usr/local/php-5/bin/php-fcgi",
				"broken-scriptfilename" =>
"enable",
				"allow-x-send-file" =>
"enable",
				"min-procs" => 2,
				"max-procs" => 2,
				"bin-environment" => (
					"PHP_FCGI_CHILDREN" => "4",
					"PHP_FCGI_MAX_REQUESTS" =>
"500"
				)
			)
		)
	)

My php.ini is a copy of php.ini-recommended plus a few
changes  
including this addition:

	cgi.fix_pathinfo = 1

As far as I know, the relevant PHP configure options are
--enable- 
discard-path, --enable-fastcgi and
--enable-force-cgi-redirect.  
Here's how I build PHP for Lighty:

	mkdir mysql	
	ln -s /opt/local/include/mysql5/mysql mysql/include
	ln -s /opt/local/lib/mysql5/mysql mysql/lib

	./configure \
	--prefix=/usr/local/php-5.1.4 \
	--with-config-file-path=/web \
	--enable-discard-path \
	--enable-fastcgi \
	--enable-force-cgi-redirect \
	--enable-mbstring \
	--with-curl=/opt/local \
	--with-gd \
	--with-gettext=/opt/local \
	--with-jpeg-dir=/opt/local \
	--with-mysql=./mysql \
	--with-mysqli=/opt/local/bin/mysql_config5 \
	--with-pdo-mysql=/opt/local/bin/mysql_config5 \
	--with-png-dir=/opt/local \
	--with-freetype-dir=/opt/local \
	--with-zlib-dir=/opt/local \
	--with-bz2=/opt/local \
	--enable-memory-limit

	make
	sudo make install
	sudo cp /usr/local/php-5.1.4/bin/{php,php-fcgi}
	sudo make install-cli

	sudo rm /usr/local/php-5
	sudo ln -s /usr/local/php-{5.1.4,5}

I'm on Mac OS X, and all the stuff in /opt/local is
installed using  
DarwinPorts.


[1-10]

about | contact  Other archives ( Real Estate discussion Medical topics )