scripts/config.php

pest01
2011-08-11
2014-01-09
  • pest01
    pest01
    2011-08-11

    Using the scripts/config.php supplied in version sphpblog-0.7.0 I am able to login to my site. But all links in the sidebar other than login and log out point to:

    e:\inetpub\esvc\blog/add.php , categories.php etc.

    Is this  a server issue I need to resolve with my web host or do I need to modify the script?

     
  • pest01
    pest01
    2011-08-13

    I have been able to resolve the above sidebar issue (in my way) by modifying the script below after finding the following settings from the server.

    The ROOT_DIR value of 1 (confuses the hell out of me but then thats not dificult)
    And as the Server isn't giving a DOCUMENT_ROOT I took that part out of the script.

    By doing the below I can now navigate my site but saving data returns server errors.

    Server Response -. Entry not saved. I ran into a problem while saving your entry.

    Server Reported:
    e:\inetpub\esvc000023\blog/content/11/08/entry110813-124143.txt   - when trying to post a comment.

    I'm thinking this is a chmod issue on the folders config/, content/ and  images/  - my web host has these folders set to rw-rw-rw-. Should this be sufficient for the scripts to post the data? To give greater rights the server admin need to change them - ftp chmod won't do it.

    But then again it might be that I have just buggered the site with my changes. Any advise greatly appreciated

    echo define('ROOT_DIR', dirname(dirname(__file__)). '/');      // returns the value     1
    echo basename(dirname(dirname(__file__)))         //returns the value    blog
    echo realpath($_SERVER)   //returns the value     e:\inetpub\esvc000023\blog\scripts\x.php (x.php being the echo script)
    echo $_SERVER;  //returns - blank page (nothing)


    if ($_SERVER == realpath($_SERVER)) {
    define('BASEURL', preg_replace("www.randomdomain.com.au/blog/", "e:\inetpub\esvc000023/blog/" . str_replace("www.randomdomain.com.au/blog/", "e:\inetpub\esvc000023/blog/")));;
    } else {
    define('BASEURL', '/blog/');
    }

     
  • pest01
    pest01
    2011-08-13

    OK - I've now got this setup as the config page. But still have same error of not being able to change settings or post comments etc.

    Just a note: During setup the scripts couldn't create the /config /content or /image folder - I had to create them manually.
    All files and folders are set to rw-rw-rw-, and I checked the phpinfo.php file and safe mode is off.

    // Root Directory
    if (!defined('ROOT_DIR')){
    define('ROOT_DIR', dirname(dirname(__file__)) . '/');
    }

    // Base URL
    // You need to set this manually if you are using symlinks, sorry, this is a PHP limitation
    // we will assume this is a directory off of your root
    //if ($_SERVER == realpath($_SERVER)) {
    // define('BASEURL', preg_replace("/^" . str_replace("/", "\/", $_SERVER) . "/", "", ROOT_DIR));
    //}
    //else {
    define('BASEURL', '/blog/');
    //}

     
  • pest01
    pest01
    2011-08-20

    New Issue - can't delete posts.

    Select a post to delete -
    press the "delete" link - new page loads with -   Do you really want to can't undo etc).
    Select ok and returns the  message  -- Whoops coldn't delete entry. with a date from the 70s - ThursdayJanuary 11970, 10:00 AM

    I am  able to post entries and viewing the config folder with ftp client shows '~blog_entry_ listing.temp' and the content folder and subfolders contain the post text files.

    The only file I have edited is the scripts/config.php. and had the write permissions enabled on config images and content folders (see above post)
    .
    This is all on a windows ISS server.
    I have tested it on my own computer (linux ubuntu webserver and the blog works out of the box no issues).

    Any help greatly appreciated.

     
  • nabber00
    nabber00
    2011-08-21

    If you believe you have found a bug in the software please open a bug report in the tracker.  This allows me to track and prioritize issues.  Also please include more detailed information such as version numbers of windows, IIS, and other software and copy/paste error messages.  Also URLs can be helpful.

     
  • Graham
    Graham
    2014-01-09

    I've installed a test version in localhost/www/domain/blog/ but when I navigate to this the first time I am redirected to localhost/blog/install00.php Have been able to resolve this by going to localhost/www/domain/blog/install00.php but I wonder if there are any other troubles lurking...