Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2013-11-01 14:30:02
- komputist
- Member
- From: Oslo, Norway
- Registered: 2013-11-01
- Posts: 17
Images not working due to non-standard install location. How to fix?
Situation:
- We installed textpattern under http://example.com/blog/textpattern
(The common/expected seems to be http://example.com/textpattern) - As result, the image functionality (and some other things) does not work properly
EXAMPLE of what doesn’t work:
- Open the Images section of the Admin: http://example.com/blog/textpattern/index.php?event=image
- Locate the image called ”txp_slug105x45.gif”
- Click on the link to that image to read/see all the details about it
RESULT: I get the name of the image, but I don’t get to see the image.
The trouble is, I guess, that TXP doesn’t know the path to the images (due to the non-standard installation location – may be in combination with something I did in .htaccess – I’m not sure …)
Is there a code I could change somewhere to make TXP understand where the images are stored?
Or should I take the trouble of relocating the blog to http://example.com/textpattern?
Offline
Re: Images not working due to non-standard install location. How to fix?
Hi.
It’s not mandatory to install Textpattern at the document root (ie. the root folder for example.com), and so, you are free to install it on a subfolder, like you did, and things should work out of the box.
The issue might be somewhere else.
Things to check:
- that the image really exists at the URL http://example.com/blog/images/txp_slug105×45.gif. From a filesystem POV, check that the image exist at the folder
/path/to/your/document-root/blog/images/
. - check the configuration for the Image Folder at “Admin -> Preferences”. It defaults to
images
. Adjust properly.
Offline
#3 2013-11-01 15:50:42
- komputist
- Member
- From: Oslo, Norway
- Registered: 2013-11-01
- Posts: 17
Re: Images not working due to non-standard install location. How to fix?
Hi! Images exists – that’s not the problem (after all the file ”txp_slug105×45.gif” is available to the Textpattern). Also, the name of the folder is ”images”. It must have something to do with the location of that folder/directory, I think. The help text says:
«Unlike other directory settings, this path is always a relative path (to the directory of your root Textpattern installation).» And also: «You must create the directory in the root of your Textpattern installation».
My ”images” folder is located inside the “/blog” directory: /blog/images. Thus, is a folder that is parallel to the directory /blog/textpattern. Is this correct/uncorrect?
NOTE 1: I briefly tried to place the images folder inside the textpattern folder: /blog/textpattern/images. However, it did not make things work. (However, perhaps I need to try a little longer/empty some cache(s)/whatever – and then it will work?)
NOTE 2: I have installed Textpattern via cPanel, and cPanel seems a bit rigid about where I put things.
NOTE 3: Basically, my problem is not that I am inable to access the images – I am able to to use them in blog posts etc. (But, as I recall it, I have to insert the URL manually – like typing the URL of the images – instead of relying on Textpattern. Irritating, but tolerable.) No, my real problem is that the image manager does not work – which means that we cannot use it for picking which images to insert. Of course, I suspect that once the image manager starts working, I don’t have to use manual techniques to insert the image.
Offline
#4 2013-11-01 15:58:45
- komputist
- Member
- From: Oslo, Norway
- Registered: 2013-11-01
- Posts: 17
Re: Images not working due to non-standard install location. How to fix?
Follow up: Moved the “images” inside /blog/textpattern/, but I get the message that the folder is not writable. Is it 777 that is the correct permission?
PS: Although I now have /blog/textpattern/images, the message I get from Textpattern, is this:
cannot write to /home/example/public_html/ blog/images/Last edited by komputist (2013-11-01 16:06:52)
Offline
Re: Images not working due to non-standard install location. How to fix?
Hi komputist,
Welcome to txp
As Julián already mentioned location is not the problem as there are countless installs on locations other than the root of the site. Can you please post the diagnostics? (found under Admin>diagnostics)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Images not working due to non-standard install location. How to fix?
komputist wrote:
PS: Although I now have /blog/textpattern/images, the message I get from Textpattern, is this:
cannot write to /home/example/public_html/ blog/images/
The answer is there in the error message you got from Textpattern. The /images
folder has to be inside the /blog
folder, not inside the /textpattern
folder. In other words, create the /blog/images
folder.
Follow up: Moved the “images” inside /blog/textpattern/, but I get the message that the folder is not writable. Is it 777 that is the correct permission?
Try with just 755 permissions, which are more secure.
Offline
Re: Images not working due to non-standard install location. How to fix?
Oh, komputist, sorry, I missed your reply to my first post.
Not sure what could be going on, but as colak said, post your diagnosis.
Offline
Re: Images not working due to non-standard install location. How to fix?
komputist wrote:
I have installed Textpattern via cPanel, and cPanel seems a bit rigid about where I put things.
If you are referring to a single click cPanel installer, we don’t offer cPanel installer modules ourselves; those are made by 3rd-party, whom is unknown to us. Installing Textpattern through means not provided us, can be error prone, and we can not offer any help in situations where the installation fails, or does something wrong. We just have no clue what the installer does or how its implemented.
The Textpattern version you have seems to be old too (or otherwise modified). This is evident by the txp_slug105×45.gif
file; that pre-uploaded file hasn’t been part of Textpattern in the last six releases. You should reinstall and get the most recent stable release, before you start working on your website.
Last edited by Gocom (2013-11-01 17:18:20)
Offline
#9 2013-11-01 17:23:36
- komputist
- Member
- From: Oslo, Norway
- Registered: 2013-11-01
- Posts: 17
Re: Images not working due to non-standard install location. How to fix?
Thanks for the replies! My first reply goes to Gocom:
Gocom wrote:
If you are referring to a single click cPanel installer, we don’t offer cPanel installer modules ourselves; those are made by 3rd-party, whom is unknown to us. Installing Textpattern through means not provided us, can be error prone, and we can not offer any help in situations where the installation fails, or does something wrong. We just have no clue what the installer does or how its implemented.
I am willing to start using the “native” installer. Does TXP have a built in back-up/export function that I can use before reinstalling?
The Textpattern version you have seems to be old too (or otherwise modified). This is evident by the
txp_slug105×45.gif
file; that pre-uploaded file hasn’t been part of Textpattern in the last six releases. You should reinstall and get the most recent stable release, before you start working on your website.
Don’t jump to conclusions. ;-) I am on version 4.5.4. (And cPanel already tol me the latest version is 4.5.5.) If there is one thing cPanel does right, then it is that it constantly tells me to update, when there is a new version of whatever CMS I installed through it. (I’m not sure how that image got there but, yeah, my assumption was that this is a file that “everyone have”.)
Last edited by komputist (2013-11-01 17:34:15)
Offline
#10 2013-11-01 17:30:20
- komputist
- Member
- From: Oslo, Norway
- Registered: 2013-11-01
- Posts: 17
Re: Images not working due to non-standard install location. How to fix?
Here is TXP’s diagnosis log (except that I altered references references to our site to ”example”) :
UPDATE: Replaced with English version:
Textpattern version: 4.5.4 (r4919)
Last update: 2013-03-10 00:11:00/2012-12-05 07:55:44
Document root: /home/example/public_html
$path_to_site: /home/example/public_html/blogg
Textpattern path: /home/example/public_html/blogg/textpattern
Permanent link mode: section_title
open_basedir: /home/:/usr/lib/php:/usr/local/lib/php:/tmp
Temporary directory path: /home/example/public_html/blogg/textpattern/tmp
Site URL: www.example.no
PHP version: 5.4.18
GD Graphics Library: bundled (2.1.0 compatible); supported formats: GIF, JPG, PNG.
Server TZ: Europe/Oslo
Server local time: 2013-11-01 18:31:43
DST enabled?: 0
Automatically adjust DST setting?: 1
Time zone: Europe/Oslo (3600)
MySQL: 5.0.96-community
Locale: en_US.UTF-8
Server: Apache
PHP server API: cgi-fcgi
RFC 2616 headers: 0
Server OS: Linux 2.6.18-308.13.1.el5PAE
Admin-side theme: classic 4.5.4
Pre-flight check:
------------------------
/home/example/public_html/blogg/textpattern/setup/ still exists
Site URL preference might be incorrect: www.example.no/blogg
------------------------
.htaccess file contents:
------------------------
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /relative/web/path/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*) index.php
RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
#php_value register_globals 0
# SVG
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
------------------------
Last edited by komputist (2013-11-01 17:33:25)
Offline
Re: Images not working due to non-standard install location. How to fix?
komputist wrote:
Does TXP have a built in back-up/export function that I can use before reinstalling?
We don’t have real import or export functions. We have import functions from other systems, but that is about it. You can take a database dump (using CLI or scripts like phpMyAdmin), but its then defeats the point of reinstalling, since you would get back the same database structure and themes (if there is an image, then theme is outdated too).
You can try downloading latest release and updating, but that is pointless too; it won’t run the installer again either. If there is any abnormalities in the database, they won’t be gone. Well, at least you can be sure the files aren’t modified.
Anyways, you can find downloads and installation instructions here.
Don’t jump to conclusions. ;-) I am on version 4.5.4. If there is one thing cPanel does right, then it is that it constantly tells me to update, when there is a new version of whatever CMS I installed through it. (I’m not sure how that image got there but, yeah, my assumption was that this is a file that “everyone have”.)
The last release that shipped with that image was 4.4.1. 4.5.x (current release is 4.5.5) and nightlies do not ship with any pre-uploaded images or files. If the installation is new and had that image, then the cPanel installer is evidently doing something really strange.
Offline
#12 2013-11-01 17:51:44
- komputist
- Member
- From: Oslo, Norway
- Registered: 2013-11-01
- Posts: 17
Re: Images not working due to non-standard install location. How to fix?
Gocom wrote:
We don’t have real import or export functions. We have import functions from other systems, but that is about it. You can take a database dump (using CLI or scripts like phpMyAdmin), but its then defeats the point of reinstalling, since you would get back the same database structure and themes (if there is an image, then theme is outdated too).
Well, I guess that whether it defeats the point of reinstalling depends on where ther error is? (For instance, if the error is related to the cPanel installer.)
PS: You could have mentioned rss admin db manager: – https://github.com/Ciges/rss_admin_db_manager.
You can try downloading latest release and updating, but that is pointless too; it won’t run the installer again either. If there is any abnormalities in the database, they won’t be gone. Well, at least you can be sure the files aren’t modified.
Again, it could be related to the cPanel – and so it could help … may be. (Or else, why be so clear on the fact that the cPanel installer is not ”official”, from the TXP team?)
Anyways, you can find downloads and installation instructions here.
Unless there are better tips, I’ll give it a try!
The last release that shipped with that image was 4.4.1. 4.5.x (current release is 4.5.5) and nightlies do not ship with any pre-uploaded images or files. If the installation is new and had that image, then the cPanel installer is evidently doing something really strange.
If so, then yet another glimpse of hope that resinstalling but not via cPanel, could actually help … ;-)
Offline