Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-11-25 16:10:13
- eagleeye
- New Member
- Registered: 2007-11-25
- Posts: 4
Local install on OS X and clean URLs
I am working my way through the excellent Textpattern Solution book and have now done a local install to start generating some pages. I followed the install steps to the letter (well apart from the obvious changes to site names and id’s etc.) using MAMP and the latest version of TXP.
Everything has worked first time, except I cannot get clean URLs to work, as the Diagnostics page keeps saying Clean URL test failed. I have double checked that mod_rewrite is available and have also tried altering the .htaccess file as indicated in the book. I have spend a few hours reading all the postings I can find on this, but none of the suggestions make any difference.
I know it is not a show stopper, and I can use TXP in messy mode, but of all the paces I would have expected clean URLs to work it would have been via a local install. Has anyone any ideas about a solution in relation to a setup like mine, not that it’s unique?
Cheers
eagleeye
Offline
Re: Local install on OS X and clean URLs
see FAQ
Offline
#3 2007-11-25 16:53:41
- eagleeye
- New Member
- Registered: 2007-11-25
- Posts: 4
Re: Local install on OS X and clean URLs
Er.. okay thanks for the reply but as I mentioned in my post I have read through all those and tried the solutions suggested.
As it is all a local install, any of the hosting issues discussed are taken out of the equation. As the install for Apache, PHP etc. are all done via MAMP, there seems little chance there is a problem there. I have confirmed mod_rewrite is available, so TXP should work ‘out of the box’ in relation to clean URLs and this type of install.
Maybe it doesn’t like Leopard.
Offline
Re: Local install on OS X and clean URLs
With MAMP I could not get it to work like it is in the book. I use the /Sites folder, but found the port numbers a problem. Switching it back to the default port numbers worked for me. No editing of the .htaccess was necessary. This on Tiger – no idea about Leopard.
Offline
Re: Local install on OS X and clean URLs
Try uncommenting the following in your .htaccess:
Options +FollowSymLinks
I’ve got TXP running with clean URLs on Leopard (with built-in, slightly broken PHP module and MySQL – not MAMP). Running a custom MAMP is less resource intensive than MAMP.app. All you have to install is MySQL – the rest is just uncommenting a couple lines in httpd.conf.
Offline
#6 2007-11-26 21:23:26
- eagleeye
- New Member
- Registered: 2007-11-25
- Posts: 4
Re: Local install on OS X and clean URLs
Okay here is my .htaccess file:
DirectoryIndex index.php index.html
Options +FollowSymLinks
#Options -Indexes
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php
</IfModule>
#php_value register_globals 0
and I can confirm that the mod_rewrite module is active, so why does TXP still report a failure on clean URLs? What is frustrating is that I installed TXP on our Apache development server this morning and it worked out the box without having to hack the .htaccess file. Obviously mod_rewrite was already there, as we use it all the time. I feel I’m missing something simple, but cannot for the life of me think what it can be.
jm – what lines did you uncomment in the http.conf file?
Offline
Re: Local install on OS X and clean URLs
Are you on Tiger or Leopard? If it’s Tiger, any /etc/apache2/ path translates to /etc/httpd/.
- Enable Web Sharing in System Preferences. Take note of your “short name”/username.
- /etc/apache2/httpd.conf: Uncomment
LoadModule php5_module libexec/apache2/libphp5.so
- Leopard only: uncomment the very last line,
Include /private/etc/apache2/other/*.conf
. - Open the username.conf file (/etc/httpd/users – I think – in Tiger). Use the following for your .conf file:
<Directory "/Users/your-short-name/Sites/">
Options Indexes FollowSymLinks
AllowOverride All
Allow from All
</Directory>
Once everything is saved, open Terminal and type sudo apachectl graceful
.
For MySQL, download the latest free version and install it. If you’re on Leopard, run these commands afterwards.
Tiger and Leopard’s PHP versions are both screwy, but they work OK for a quick setup. Leopard, however, didn’t compile PHP with GD (no idea why!), which is a problem if you want to create thumbnails with TXP. In that case, follow this comment. If you’re on Tiger, you’ll probably want to replace its PHP with a proper install if you do any XSLT work, so install this package.
Offline
#8 2008-02-06 04:18:22
- rirby_2
- New Member
- Registered: 2008-02-06
- Posts: 3
Re: Local install on OS X and clean URLs
I’m encountering the same problem. I’m running Leopard, as long as fairly recent versions of MySQL and PHP. To the best of my knowledge, I’ve implemented all of the the changes jm mentioned in his last post with the exception of the bit regarding MySQL. (There’s nothing related to MySQL in my sys prefs.)
Here’s a copy of the high-detail log from TXP:
[notextile. Textpattern version: 4.0.6 (r2805)
Last Update: 2008-02-03 23:45:10/2008-01-28 01:59:12
Document root: /(blah)/xalantwww
$path_to_site: /(blah)/xalantwww/txp
Textpattern path: /(blah)/xalantwww/txp/textpattern
Permanent link mode: section_id_title
Temporary directory path: /(blah)/xalantwww/txp/tmp
Site URL: xalantwww/txp
PHP version: 5.2.4
GD Image Library: unavailable
Server Local Time: 2008-02-05 22:02:10
MySQL: 5.0.45
Locale: en_US.UTF-8
Server: Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7l DAV/2 PHP/5.2.4
Apache version: Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7l DAV/2 PHP/5.2.4
PHP Server API: apache2handler
RFC 2616 headers:
Server OS: Darwin 9.1.0
Active plugins: zem_contact_reborn-4.0.3.20, rss_admin_db_manager-4.3
Pre-flight check:
————————————
Clean URL test failed.
————————————
.htaccess file contents:
————————————
DirectoryIndex index.php index.html
Options +FollowSymLinks
RewriteBase /txp/
<IfModule mod_rewrite.c> RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php
RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
#php_value register_globals 0
————————————
Charset (default/config): latin1/utf8
character_set_client: utf8
character_set_connection: utf8
character_set_database: latin1
character_set_filesystem: binary
character_set_results: utf8
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/local/mysql-5.0.45-osx10.4-i686/share/mysql/charsets/
17 Tables: OK
PHP extensions: libxml, xsl/0.1, xmlwriter/0.1, xmlrpc/0.51, dom/20031129, xmlreader/0.1, xml, tokenizer/0.1, session, pcre, SimpleXML/0.1, SPL/0.2, PDO/1.0.4dev, sockets, SQLite/2.0-dev, standard/5.2.4, Reflection/0.1, posix, pdo_sqlite/1.0.1, odbc/1.0, mysqli/0.1, mysql/1.0, mbstring, ldap, json/1.2.1, iconv, hash/1.0, ftp, filter/0.11.0, exif/1.4 $Id: exif.c,v 1.173.2.5.2.20 2007/06/10 20:12:45 iliaa Exp $, date/5.2.4, curl, ctype, zlib/1.1, openssl, apache2handler
Apache modules: core, prefork, http_core, mod_so, mod_authn_file, mod_authn_dbm, mod_authn_anon, mod_authn_dbd, mod_authn_default, mod_authz_host, mod_authz_groupfile, mod_authz_user, mod_authz_dbm, mod_authz_owner, mod_authz_default, mod_auth_basic, mod_auth_digest, mod_cache, mod_disk_cache, mod_mem_cache, mod_dbd, mod_dumpio, mod_ext_filter, mod_include, mod_filter, mod_deflate, mod_log_config, mod_log_forensic, mod_logio, mod_env, mod_mime_magic, mod_cern_meta, mod_expires, mod_headers, mod_ident, mod_usertrack, mod_setenvif, mod_version, mod_proxy, mod_proxy_connect, mod_proxy_ftp, mod_proxy_http, mod_proxy_ajp, mod_proxy_balancer, mod_ssl, mod_mime, mod_dav, mod_status, mod_autoindex, mod_asis, mod_info, mod_cgi, mod_dav_fs, mod_vhost_alias, mod_negotiation, mod_dir, mod_imagemap, mod_actions, mod_speling, mod_userdir, mod_alias, mod_rewrite, mod_bonjour2, mod_php5
/../index.php: r2774 (66519e6f500fa0e59fa27567e97d3675)
/css.php: r2772 (4807cbc15661213f2b4d0fd26c7179ff)
/include/txp_admin.php: r2729 (0c2b3cf59ff433c943bcc293a526651a)
/include/txp_article.php: r2680 (49a7155d831f843bcf3e8de306dfe7f1)
/include/txp_auth.php: r2728 (c472bfbe49a71fd35e89000c8a18de08)
/include/txp_category.php: r2243 (0ed99b6f44b5d221bdf35674240141ab)
/include/txp_css.php: r2730 (7974aa87728b39d3afaba5a3b18cf6b5)
/include/txp_diag.php: r2791 (aeb96445180b68c31821e237b6150332)
/include/txp_discuss.php: r2774 (852a8a4d4307358e161e0501124b7247)
/include/txp_file.php: r2530 (9f34fdbf98b9b649d65e2ced4c9ca763)
/include/txp_form.php: r1913 (780340d28f384113c72924843194b43e)
/include/txp_image.php: r2668 (11269b464db6cfa3affff47674533a50)
/include/txp_import.php: r1238 (86f0e64d2c9362066e6c48b9cd486e37)
/include/txp_link.php: r2463 (2379d25f83b37ec6c8d5f3edb1122ce8)
/include/txp_list.php: r2725 (1ed6c6f729eaeb7f8a582b27cd5b9e78)
/include/txp_log.php: r2796 (f249e0962a996f05041b899fea91ccae)
/include/txp_page.php: r2717 (807ff04b4a649b54b3d710c1ab0a428f)
/include/txp_plugin.php: r2774 (e9fdc47a3ed9bdd13197d929161c6a13)
/include/txp_prefs.php: r2528 (50bd3be8c22e17d5ca2855ccea081bac)
/include/txp_preview.php: r1238 (c45992b3273ac8019477e2f959d63120)
/include/txp_section.php: r2759 (9208297e0bd7b3d41bd0e6f9fc9ab120)
/include/txp_tag.php: r2774 (f371b400e8d7318e2ac48e032fe6c274)
/index.php: r2805 (ee8ab2e3c4bc9abd77aa7384ecba5268)
/lib/IXRClass.php: r765 (0120eb4713c9b6446a0eebe8b1039d1c)
/lib/admin_config.php: r1747 (b972529744cb37a7695fe00316dada41)
/lib/class.thumb.php: r2329 (c7f66a32531f32d6dfcbe5c7d26c7852)
/lib/classTextile.php: r2779 (b6d5b9cecbc5bc6475b5d1ee6a5231ea)
/lib/constants.php: r2361 (5338211ece1b2592804acdd204c9df33)
/lib/taglib.php: r2612 (727737ebd08127c632b9822bae87fee0)
/lib/txplib_admin.php: r2726 (c4f65bac2ddef62867f5bfee97ad7dfe)
/lib/txplib_db.php: r2748 (3feb369b1c34f251815cd6085a216d62)
/lib/txplib_forms.php: r2759 (a2d3de62110e582fab2a3a20224661f4)
/lib/txplib_head.php: r2783 (74ced647523a94da307af9853d7ed596)
/lib/txplib_html.php: r2696 (57985ebd2501bc303d2e97ae7538db1f)
/lib/txplib_misc.php: r2788 (7ecfaa5d4fabefbf411d01615dea9485)
/lib/txplib_update.php: r1239 (e3bd2d0c2b491d4028a656b8301a0086)
/lib/txplib_wrapper.php: r2800 (4ad38ee67f3ee8d9e7b51544a4f0f58b)
/publish.php: r2777 (0ce3da212329e7d34de07e53e109d182)
/publish/atom.php: r2774 (50aa384a2edf7cc07effee9020e0893b)
/publish/comment.php: r2776 (0e1ea64316087edcd75f394494b42100)
/publish/log.php: r1637 (f69237dc2ff39bd7a691c8ca1bc87808)
/publish/rss.php: r2793 (022caa22c756c64f2255aae6625686d8)
/publish/search.php: r1748 (ea84e04b2c688b0bb8b5a9ecf395749a)
/publish/taghandlers.php: r2774 (59dc36e6dabc619e23c43f722fe7b8f1)
/update/_to_1.0.0.php: r711 (0f49fca8fbd8e6fca0fc48b0f69f0461)
/update/_to_4.0.2.php: r711 (e77c0e0d972868f19eaee4565bd0b4c4)
/update/_to_4.0.3.php: r711 (f5506cfd0fbc3ad4bd9a9b2299468775)
/update/_to_4.0.4.php: r711 (4d867b42ee87a7f11d2bff3a8e91bed0)
/update/_to_4.0.5.php: r2464 (dbe80cd4a775d3a43a203c3c4a2d0e3f)
/update/_to_4.0.6.php: r2464 (7e5ae73eb64c24438918697089a1f321)
/update/_update.php: r2792 (6ff7b4dedb2c7735a01e76b13b3f1fb1)]
Offline
Re: Local install on OS X and clean URLs
I’m running MAMP Leopard and had only one problem on a clients site I updated to 4.0.6 which had a zem_rewrite plugin.
The other sites I maintain and develop locally work fine with clean url’s.
I didn’t change anything in the .htaccess file.
How have you configured etc/host and your MAMP/conf/httpd.conf ??
At the bottom of my httpd.conf
NameVirtualHost *
#127.0.0.1
<VirtualHost *>
ServerName localhost
DocumentRoot "/Applications/MAMP/Library"
</VirtualHost>
<VirtualHost *>
ServerName localhost
DocumentRoot "Users/yourname/Sites"
</VirtualHost>
<VirtualHost *>
ServerName sitename.dev
DocumentRoot "Users/yourname/Sites/sitename.dev"
</VirtualHost>
My etc/host
127.0.0.1 localhost sitename.dev
255.255.255.255 broadcasthost
MAMP ports
Apache:80
MySQL:3306
If your running Parrallels and you want to test your site in IE, which is excellent and quick for development,
locate your Parallels guest ip address under system preferences – network
Then in Parallels window enter and comment out the following in C:\WINDOWS\system32\drivers\etc\hosts
#127.0.0.1 localhost
#127.0.0.1 .psf
10.37.129.2 localhost sitename.dev
Works a treat for me.
I don’t think I left anything out, Hope this helps:)
Last edited by anthonybooth (2008-02-06 22:01:50)
Forever learning.
Offline
#10 2008-02-06 23:59:46
- rirby_2
- New Member
- Registered: 2008-02-06
- Posts: 3
Re: Local install on OS X and clean URLs
I’m not running MAMP. But, the two of you did help me. It turns out there was a conflict between my htaccess file (properly set) and which overrides were allowed for the particular local host in my Apache httpd.conf file. It works now. Thanks to all!
Offline
Pages: 1