Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

reports URL problem - magento putting backslash where it shouldn’t
 
Netismine
Sr. Member
 
Avatar
Total Posts:  174
Joined:  2008-10-28
 

Hi all,

Im running magento on windows, apache.
I have a problem of magento putting backslashes in url-s when it tries to display report:

http://website/index.php/oscommerce/adminhtml_import/run/id/1/report/\/report/?id=811826007&s;=admin

this particular example was generated while using oscommerce migration tool.
I got the same error when magento was trying to tell me that my database name was bad. it put \ / where it shouldn’t. when I delete the backslash page works. I suspect it’s cause of windows?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Netismine
Sr. Member
 
Avatar
Total Posts:  174
Joined:  2008-10-28
 

anyone has a solution? why does magento put backslashes in urls?

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

I’ve never heard of this one.
Try checking your settings for the secure and unsecure URL and deleting the cache.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Netismine
Sr. Member
 
Avatar
Total Posts:  174
Joined:  2008-10-28
 

I found the error.

As I presumed, it was because of the windows environment.

Problem is in printException function (app/mage.php), on line 601:

$baseUrl = rtrim(dirname($_SERVER[’SCRIPT_NAME’]), ‘/’); // dirname on windows returns backslash ( \ ) that causes 404

of course, there are many ways you can solve this one (str_replace ... ), but I think magento team should take a look at that.

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

Make sure you report it as a bug.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top