Extrange behaviour with index.php and a plain link ( windows vs linux )

Hi all,

This is my first comment here, thanks in advance to all who contribute.

I´m starting with nginx + php + fastCGI in windows environment, and I´m
having following behaviour:

I have two index.php files :

/public/index.php
/index.php

The content of /index.php file is :

----------------------------- content -------------------------
./public/index.php

As you can see the content of this PHP file don´t have <?php .... ?>
block, just a relative link to another file, so I´m seeing two different
behaviours in windows & linux.

Windows)

The text “./public/index.php” is showed in the browser and the php
processing ends.

Linux)

This content is interpreted “like a link” to /public/index.php file and
the content of /public/index.php is processed,
without rendering the plain text “./public/index.php” like in windows.

Any idea ? Perhaps it could be a trivial problem related only with PHP,
but I´m just a beginner with both PHP and NGnix.

Regards

Antonio Fernández
www.jaraxa.com

Posted at Nginx Forum:

On Fri, Sep 12, 2014 at 04:37:24AM -0400, antoniofernandez wrote:

Hi there,


nginx doesn’t “do” php.

It is probably worth checking the logs of your fastcgi server to see
what is going on.

Or maybe your browser is trying to be clever – what http response do
you get for the initial request? Do you see one or two requests made by
the browser when you test (you can check the nginx logs to see that).

f

Francis D. [email protected]

The content of /index.php file is :

----------------------------- content -------------------------
./public/index.php

if it’s a git repository checkout, probably caused by your windows’
git build treating symlink files as plaintext file with content of
target path.

Hi Francis, thanks for the reply.

The problem was just a misundertanding between the NTFS filesystem and
EXT3
in Linux. The index.php file is a symbolink link, but Windows don´t
recognize symbolik links, that´s explains the different behaviour.

Regards,
Antonio

Posted at Nginx Forum:

Hi Edho,

That´s it , exactly my problem.

Thanks a lot,

Regards,
Antonio

Posted at Nginx Forum: