Can't edit articles.

Please post all install related problems here. Visit this forum first for troubleshooting.
antipodean
Posts: 10
Joined: Thu 25. Mar 2004, 16:39

Can't edit articles.

Post by antipodean »

Hello guys.

I've installed phpwcms locally on my powerbook to test a site I'm building with it. Everything works perfectly EXCEPT I can't edit articles I create. I can click on the edit icon but just get a blank arean in the page where the article content (and I presume, the editor, should be).

I've searched the forum and found a few references to this but no fix. I've tried everything suggested and can't work out what the problem is.

I also have a copy of phpwcms installed on a remote server (installed using Fantastico auto installer in my cPanel) and it works just fine. I can't find any differences between the installations (other than that mine is on a mac OS X, apache, php 4.3.4 and the remote server is LAMP)

I really want this to work because I think this an excellent system, simple to use but with loads of features.

Any suggestions??
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

what have you tried? you say 'everything' but that is hard for us to assume ;)
also would to post your conf.inc.php too - no pass/user/db name
ionrock
Posts: 279
Joined: Fri 20. Feb 2004, 17:04

Post by ionrock »

It seems this has been a problem lots of people have. I have to think it is a php issue. You should compare your phpinfo() from the LAMP server to your OSX machine and check the differences. I have a feeling that it could be the magic quotes... Of course if you have read any of my posts on this I always say this so maybe I am just full of crap because there are always questions like this :)
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

convert all files (MAC,DOS) of phpwcms via UltraEdit or another Editor to unix format. perhaps the code contains wrong chars after every line...
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
antipodean
Posts: 10
Joined: Thu 25. Mar 2004, 16:39

Post by antipodean »

I think if rogue characters in the php were the problem, I would be having problems with more things than just the article editing. I'll look into that though. Thanks Jan212

I've checked magic quotes are off (they are). My config file on my local machine is identical to that on the remote machine (I've installed in the same name directory 'wcms' and that directory is installed at root level on both)

I'm not on my powerbook now but next time I am I'll post the config file. Thanks psouper (didn't you have this exact same problem?)

I'll check my phpinfo too, thanks ionrock.

One thing, when I tried yet another installation on another server (this one didn't have fantastico so I uploaded by ftp) my ftp client, Transmit wouldn't allow me to upload folders with just a forward slash for a name. There are loads of these in the untarred package. Don'y know if this is an actual issue.

I'll post that config file when I can.

Note though that EVERYTHING is working perfectly, except edit articles.

I love this CMS.
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

did you take a look into your db?
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
antipodean
Posts: 10
Joined: Thu 25. Mar 2004, 16:39

Post by antipodean »

I wouldn't call myself proficient at handling databases at that level. I use a GUI client to do anything I need, and expect the CMS to do everything else. What do I need to look for?

here are the bits from my config file.

Code: Select all

$phpwcms["db_host"]           = "127.0.0.1";
$phpwcms["db_user"]           = "username";
$phpwcms["db_pass"]           = "password";
$phpwcms["db_table"]          = "wcms";
$phpwcms["db_prepend"]        = "";
$phpwcms["db_pers"]           = 1;

// site values
$phpwcms["site"]              = "http://tim-griffithss-computer.local/~tim/";
$phpwcms["admin_email"]       = "tim@antipodean.org";

// paths
$phpwcms["root"]         		= "wcms";         //default: ""
$phpwcms["file_path"]         = "phpwcms_filestorage";    //default: "phpwcms_filestorage"
$phpwcms["file_tmp"]          = "phpwcms_tmp";     //default: "phpwcms_tmp"
$phpwcms["templates"]         = "phpwcms_template";    //default: "phpwcms_template"
$phpwcms["dir_thlist"]        = "thumb_list";   //default: "thumb_list"
$phpwcms["dir_preview"]       = "thumb_preview";  //default: "thumb_preview"
$phpwcms["content_path"]      = "content"; //default: "content"
$phpwcms["cimage_path"]       = "images";  //default: "images"
$phpwcms["ftp_path"]          = "phpwcms_ftp";     //default: "phpwcms_ftp"
I've checked my phpinfo on both servers and one thing that sticks out to me is that magic quotes seem to be ON on the version that is working (the remote server).

Also, the Zend Optimiser is running on that server as well. There seems to also be some extra stuff enabled on my local machine (I used the entropy installer for OS X)

Here is the stuff fromphpinfo on my local machine

Code: Select all

	 './configure' '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/lib' '--with-apxs' '--with-iconv=/usr/local/php' '--with-openssl=/usr' '--with-zlib=/usr' '--with-mysql' '--with-pgsql=/Users/marc/cvs/entropy/php-module/build/postgresql-build' '--enable-cgi' '--with-gd' '--with-png-dir=/usr/local/php' '--with-freetype-dir=/usr/local/php' '--with-t1lib=/usr/local/php' '--with-jpeg-dir=/usr/local/php' '--with-tiff-dir=/usr/local/php' '--with-curl=/usr/local/php' '--with-mcal=/usr/local/php' '--with-mcrypt=/usr/local/php' '--with-mhash=/usr/local/php' '--with-pdflib=/usr/local/php' '--with-imap=../imap-2002d' '--with-imap-ssl=/usr' '--with-expat-dir=/usr/local/php' '--with-gettext=/usr/local/php' '--with-dom=/usr/local/php' '--with-dom-xslt=/usr/local/php' '--with-dom-exslt=/usr/local/php' '--with-xslt-sablot=/usr/local/php' '--with-mssql=/usr/local/php' '--with-fbsql=/Users/marc/cvs/entropy/php-module/build/frontbase-build/Library/FrontBase' '--enable-xslt' '--with-ldap' '--with-xmlrpc' '--with-xml' '--with-iodbc' '--enable-sockets' '--enable-dbx' '--enable-dbase' '--enable-trans-sid' '--enable-exif' '--enable-wddx' '--enable-ftp' '--enable-mbstring
and from my remote server

Code: Select all

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-mcrypt' '--enable-magic-quotes' '--with-mysql=/usr' '--with-openssl' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--enable-wddx' '--with-zlib' 
Everything else seems about the same.

Hope someone can help. Sorry about this very long post.
antipodean
Posts: 10
Joined: Thu 25. Mar 2004, 16:39

Post by antipodean »

OK. I have just noticed something else that is strange. In the Site Structure section where you add sections and articles, there is no delete icon for the section levels, only for the articles. Would this have anything to do with my other problem.

Any ideas?
antipodean
Posts: 10
Joined: Thu 25. Mar 2004, 16:39

Post by antipodean »

Ignore my last post please.. I am looking in the wrong section..
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

Code: Select all

http://tim-griffithss-computer.local/~tim/"; 
can you post the virtual host entry? perhaps it's a problem with the beginning ~ before tim/";

have you compared the two phpinfos? or can you post a link to them?
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
antipodean
Posts: 10
Joined: Thu 25. Mar 2004, 16:39

Post by antipodean »

The tilde is how Mac OS creates users. ie the home directory is ~user
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Hi antipodean,

I also have installed phpwcms on my PowerBook (with exactly the same configuration, as I suppose, because I have used the entropy package, too) and as I don't have any problems, I would assume that it has nothing to do with the file format of the files or with the ~.

Concening the many "/"-Folders: I also had them, but I did not find any reason why they should be there, so I deleted them all and everything still worked fine.

But now (finally) to some ideas that could hopefully help:

1. Change your configuration from

Code: Select all

// site values
$phpwcms["site"]              = "http://tim-griffithss-computer.local/~tim/";
$phpwcms["admin_email"]       = "tim@antipodean.org";

// paths
$phpwcms["root"]               = "wcms";         //default: "" 
to

Code: Select all

// site values
$phpwcms["site"]              = "http://tim-griffithss-computer.local/~tim/wcms/";
$phpwcms["admin_email"]       = "tim@antipodean.org";

// paths
$phpwcms["root"]               = "";         //default: "" 
2. Try to change

Code: Select all

$phpwcms["db_host"]           = "127.0.0.1";
to

Code: Select all

$phpwcms["db_host"]           = "localhost"; 

These are the options that are different to my actual configuration. I can't make out what these should have to do with your problem that just one single feature doesn't work, but never say never ;).
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Hahaha, you will not guess what happened to me :). It doesn't work on my powerbook, too :).

Here is the error message I get:
Warning: main(/Library/WebServer/Documents/include/inc_tmpl/articlecontent.list.tmpl.php): failed to open stream: No such file or directory in /Users/jerome/Sites/phpwcms-bit/include/inc_lib/article.editcontent.inc.php on line 150
The reason is visible in the phpinfo-file:
DOCUMENT_ROOT ---- /Library/WebServer/Documents
I think I have "only" have to find out where and how to change the document root for the different users on Mac Os X.

I am not a UNIX guru... is some one of you? ;)
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Okay... Oliver uses the document root and defines it as constant in default.inc.php:

Code: Select all

define ("PHPWCMS_ROOT", preg_replace('/\/$/', '', $_SERVER['DOCUMENT_ROOT']).(($phpwcms["root"]) ? "/".$phpwcms["root"] : "") );   // DOCUMENT_ROOT + phpwcms directory
I don't know if this could be handled differently, but I think it would certainly be a better idea somehow to change the php-configuration...
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Forget everything I told you before :).

When you read what I tell you now, replace "username" with your unix-username.

1. Open terminal
2. Enter

Code: Select all

sudo pico /private/etc/httpd/users/username.conf
3. Change what you see to:

Code: Select all

<Directory "/Users/username/Sites/">
    Options Indexes MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

DocumentRoot /Users/username/Sites
Especially pay attention that AllowOverride is All - it hasn't been so with my configuration.
4. Restart Apache.
5. Edit your conf.inc.php:

Code: Select all

$phpwcms["root"]         	= "phpwcms";         //default: ""
"phpwcms" stands for the folder your phpwcms is installed to. So, if you have installed it in "~/tim/phpwcms", the correct value is "phpwcms". (Sorry, Tim, that I first said you should try to change this as I said some posts ago).

After these changes, everything worked with me.

I have to admit that a friend of mine, that know UNIX a bit better than me, told me that he would do this in the .htaccess file, but I did not get to work it. The apache-docs told me that "DocumentRoot" is not applicable in .htaccess.

If someone of you has a better solution, I would really appreciate to read it here. But until then I think i will be happy with this solution :). I hope: you too!
Post Reply