Problem with PHP - Post ID 76654

User 206564 Photo


Registered User
5 posts

I have the most recent version of Shopping Cart, and have just finished my first store.

On one of my servers, the PATH_TRANSLATED value is used to calculate the value of $absPath in the index.php file, but on my other server the PATH_TRANSLATED value is not defined, due I believe to the fact that other PHP variables are more reliable to get the path than PATH_TRANSLATED (and due to the fact that some PHP implementations don't set this value anyway).

I notice the fallback for $absPath is to look at the SCRIPT_FILENAME value, but this line (line 16 of the generated index.php file, and presumably present in the other PHP files) seems to be looking for a forward slash '/' character in a variable that contains only backslash characters (well, on my servers at least the SCRIPT_FILENAME variable gives script paths with backslashes, no forward slashes). This means that the algorithm never finds a forward slash and as such does not create the $absPath value correctly.

This has resulted in the online shop not running without tweaks to the generated PHP files... is this something that needs looking at?

Thanks.
User 103173 Photo


VP of Software Development
0 posts

I am not too sure about that one, I will have to ask our developers and see what they have to say.
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 206564 Photo


Registered User
5 posts

Ok cool thanks. Don't take it that I'm some guru of PHP who thinks he knows everything though about the language... ha ha! I may well be wrong, which is kinda the reason I am querying it anyway - to see if it's me or PHP or the code that's bad.

Thank you!
User 103173 Photo


VP of Software Development
0 posts

Keith, can you email me a link where I can see the php info on your server please? My direct email is scott@coffeecup.com
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 206564 Photo


Registered User
5 posts

Hi Scott,

I've actually rolled back the PHP versions on my servers. I was running 5.2.8 but have rolled back to 5.2.0 as I previously had that and I know it was working. I think I may have read a day or two ago a comment on the forum of the developers who make the server software I use, which said "It's sad to find out that the PHP guys are still messing with the basics of PHP PATH_INFO/PHP_SELF".

I'm kind of convinced (but may be wrong of course!) that the PATH_TRANSLATED variable is drawn from PATH_INFO which might have something to do with it, but I have sorted my own problem by rolling back.

If you want any more info though I'll be glad to send it, though the PHP info probably won't be relevant since it's not the version of PHP that was causing the error...
User 206564 Photo


Registered User
5 posts

Hi Scott,

I have remembered I still run PHP 5.2.8 on my mail server, so I have sent you an e-mail with the details... hopefully you might be able to shed some light on this??

Thanks!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.