Topic: Backslash instead of slash

First things first: Chevereto is amazing! It works like a charm!  big_smile

There is only one thing i can't really figure out, maybe it's a problem i created myself, but i would like to know if anyone knows a solution for this. The automaticcaly generated URL's contain a backslash after the domain name instead of a slash. This results in viewing problems on some browsers/mobile phones. It can be easily fixed by altering the backslash into a slash manually, but not everyone knows how to do that  hmm

Chevereto 1.9r1 is running on a server with Windows Server 2008 R2 Enterprise, IIS 7.5 with PHP version 5.2.17, there are some minor changes in the Chevereto-script to make it work on a subdomain (http://upload.rijstraket.nl) and some changes to make it look more like the real website www.rijstraket.nl.

Here is a partial screenshot from my site after i upload an image, the problem(s) are in the red boxes wink

http://upload.rijstraket.nl/images/problem.png

Copy of Config.php: here
Copy of Engine.php: here
Copy of Index.php: here


Does anybody know what causes this?

Thumbs up

Re: Backslash instead of slash

Could you create a new file and add the following content in it, after post the result please
Thank you

create whatever.php

<?php
require('config.php');
print('PATH_SCRIPT: '.PATH_SCRIPT.'<br />');
print('URL_SCRIPT: '.URL_SCRIPT);
?>

Last edited by Danny.Domb (2011-06-07 13:09:13)

~ Sup?!

Thumbs up

Re: Backslash instead of slash

Danny.Domb wrote:

Could you create a new file and add the following content in it, after post the result please
Thank you

create whatever.php

<?php
require('config.php');
print('PATH_SCRIPT: '.PATH_SCRIPT.'<br />');
print('URL_SCRIPT: '.URL_SCRIPT);
?>

Here you go smile

http://upload.rijstraket.nl/whatever.php


I looked in config.php for the "PATH_SCRIPT"-line, and found the following:

// PATH
/* Uhhh.. Can't touch this!. */
$path = dirname($_SERVER['PHP_SELF']);
if (strlen($path)>1) { 
    define('PATH_SCRIPT', $path.'/');
} else {
    define('PATH_SCRIPT', $path);
}

Thumbs up

Re: Backslash instead of slash

I had the same issue. I resolved it by modifying the config.php file.

// PATH
/* Uhhh.. Can't touch this!. */
$path = dirname($_SERVER['PHP_SELF']);
if (strlen($path)>1) { 
    define('PATH_SCRIPT', $path.'/');
} else {
    define('PATH_SCRIPT', $path);
}

// URL
/* Uhhh... Uhhh.. Can't touch this!. */
define('URL_SCRIPT', 'http://www.yourdomainhere.com/');

?>

Thumbs up

Re: Backslash instead of slash

Instant succes!  big_smile

Thank you for your suggestion, it worked out great!

Thumbs up