strange PHP_SELF behavior

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
astpaul
Forum Newbie
Posts: 3
Joined: Mon May 09, 2005 4:21 am

strange PHP_SELF behavior

Post by astpaul »

Hi,

I am migrating a self-made CMS app from one linux server to another and i am getting very strange PHP_SELF behavior on the new server.
I hope someone will be able to help me!

This app uses SEF URLs like http://domain.com/index.php/title/4/ (4 being the id)

When i use PHP_SELF in all the server but the new one i get as an answer "/index.php/title/4/".

When i use it on the new server, i get "/title/4/"!!!!!!!
I am at a loss here. What could be triggering such a change? What parameter should i change in the new server's config???

Help!!!!!!

For info purposes, i can PM the PHPInfo for both servers: the working one and the new, not working one.


Thanks for any help
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Perhaps post a

Code: Select all

echo '<pre>'; print_r($_SERVER); echo '</pre>';
From both servers, along with phpinfo() that you can link to us.

What version of PHP are you using?
astpaul
Forum Newbie
Posts: 3
Joined: Mon May 09, 2005 4:21 am

Post by astpaul »

Here they are:

NOT working server:
http://new.microcar.es/phpinfo.php (PHP v4.3.11)

working server:
http://www.microcar.es/phpinfo.php (PHP v4.3.10)

Hint: You could try http://new.microcar.es/phpinfo.php/title/4/ and see the result for yourself.


Thanks again for your help
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

im guessing it is an Apache issue.

The new one is using Apache 2, the old one is Apache 1.3.

I dont know what in particular is causing it tho
astpaul
Forum Newbie
Posts: 3
Joined: Mon May 09, 2005 4:21 am

Post by astpaul »

Pimptastic wrote:im guessing it is an Apache issue.

The new one is using Apache 2, the old one is Apache 1.3.

I dont know what in particular is causing it tho
no it is the contrary. It is working under the 2.0 platform but not on the 1.3 one. Anyway i tried under another 1.3 server and it works well.

So..... :?
Post Reply