php php5 file extensions problem [SOLVED] [message #7987] |
Tue, 27 June 2006 12:25  |
pezetgee Messages: 734 Registered: March 2006 |
Faithful Member |
|
|
In order to use PHP5 on my web host I need to change script file's extensions to php5, what basically breaks my app.
I cannot use AddHandler directive in .htaccess file, as the host doesn't support it as well
So far, I started analysing logs and found that sfWebRequest gets incorrect request parameters. Instead of ( module => "my_module_name", action => "my_action" ) I get ( module => "5", action => "my_module_name" )
The '5' comes then from php5 as apposed to php
I'm starting to fiddle around symfony code, however if someone had that experience before and found a way around that would probably save me lots of time..
Thanx a lot in advance,
Peter
[Updated on: Wed, 28 June 2006 09:20]
|
|
|
| Re: PHP4 / PHP5 extensions problem [message #7989 is a reply to message #7987 ] |
Tue, 27 June 2006 12:44   |
pezetgee Messages: 734 Registered: March 2006 |
Faithful Member |
|
|
I got it to work by modifying sfWebRequest.class.php
It seems to work, but I'd like someone from symfony development team to comment if that was good way to do it.
The changes:
1.
public function getPathInfo()
[...]
replaced lines
if ($pos = stripos($pathInfo, '.php'))
{
$pathInfo = substr($pathInfo, $pos + 4)
}
with
if ($pos = stripos($pathInfo, '.php5'))
{
$pathInfo = substr($pathInfo, $pos + 5)
}
2.
public function getRelativeUrlRoot()
[...]
replaced line
%this->relativeUrlRoot = preg_replace('#/[^/]+\.php$#', '', $pathArray['SCRIPT_NAME']);
with
%this->relativeUrlRoot = preg_replace('#/[^/]+\.php5$#', '', $pathArray['SCRIPT_NAME']);
Now testing all app...
Peter
[Updated on: Tue, 27 June 2006 18:22]
|
|
|
Re: PHP4 / PHP5 extensions problem [message #7994 is a reply to message #7989 ] |
Tue, 27 June 2006 13:26   |
pezetgee Messages: 734 Registered: March 2006 |
Faithful Member |
|
|
|
All seems to work ok.
[Updated on: Wed, 28 June 2006 09:22]
|
|
|
|