Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Cannot Publish New Articles after upgrade to PHP 5.2.9  (Read 51746 times)

tinym

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
    • tinym.com
Cannot Publish New Articles after upgrade to PHP 5.2.9
« on: December 21, 2009, 11:52:53 PM »

Hi, I'm having some issues with an installation of Snews 1.4.  I thought the site was working fine a few months ago after the host upgrade php to version 5.2.9.  The site was viewable ok.  Now that I'm trying to add new articles I'm unable to do so.  What could be causing this?  I can edit existing articles just fine but new ones just can't be created.

.htaccess looks like this (should I change something?):

Code: [Select]
<IfModule mod_php4.c>
php_value session.use_trans_sid 0
</IfModule>
RewriteEngine On
RewriteRule ^categories/$ index.php?category=categories [L,QSA]
RewriteRule ^contact/$ index.php?category=contact [L,QSA]
RewriteRule ^images/$ index.php?category=images [L,QSA]
RewriteRule ^login/$ index.php?category=login [L,QSA]
RewriteRule ^logout/$ index.php?category=logout [L,QSA]
RewriteRule ^new/$ index.php?category=new [L,QSA]
RewriteRule ^rss/$ index.php?category=rss [L,QSA]
RewriteRule ^unpublished/$ index.php?category=unpublished [L,QSA]

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ index.php?category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+)/ index.php?category=$1&title=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+)/([^/]+)/ index.php?category=$1&title=$2&commentspage=$3 [L]
Logged
follow me on posterous or friendfeed

tinym

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
    • tinym.com
Re: Cannot Publish New Articles after upgrade to PHP 5.2.9
« Reply #1 on: December 22, 2009, 08:40:47 PM »

I've tested another snews 1.4 site on the same server as this one having troubles... I can publish new articles to it just fine. 

I don't know what the trouble could be with this other site.  Images attached to articles have dropped off too.  They still exist on the server but you cannot attach them to an existing article.
Logged
follow me on posterous or friendfeed

Keyrocks

  • Doug
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 451
  • Posts: 6228
  • Semantically Challenged
    • snews.ca
Re: Cannot Publish New Articles after upgrade to PHP 5.2.9
« Reply #2 on: December 22, 2009, 09:46:04 PM »

I've tested another snews 1.4 site on the same server as this one having troubles... I can publish new articles to it just fine. 
I don't know what the trouble could be with this other site.  Images attached to articles have dropped off too.  They still exist on the server but you cannot attach them to an existing article.

One way or another... doing a file comparison between the like-named files of the 'working' and 'non-working' file-sets to see where possible differences might be... would be a good start. WinMerge is a useful free tool for doing file comparisons on a Windows machine.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

tinym

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
    • tinym.com
Re: Cannot Publish New Articles after upgrade to PHP 5.2.9
« Reply #3 on: December 22, 2009, 10:49:25 PM »

WinMerge!  Aww, thank you so much.  I will have a look at the files.

update: I checked my files & found some differences in my databases.  Should I add missing stuff from working file to the non-working file?

Working DB beginning is different than the working DB beginning.  Being not at all a MySql Wizard I wonder if this difference is the one causing an issue...

Working DB
Code: [Select]
-- Table structure for table `articles`
--

CREATE TABLE IF NOT EXISTS `articles` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(100) default NULL,
  `seftitle` varchar(100) default NULL,
  `text` longtext,
  `textlimit` int(5) NOT NULL default '0',
  `date` datetime default NULL,
  `category` int(8) NOT NULL default '0',
  `position` char(3) default NULL,
  `displaytitle` char(3) NOT NULL default 'YES',
  `displayinfo` char(3) NOT NULL default 'YES',
  `commentable` varchar(5) NOT NULL default '',
  `image` varchar(30) default NULL,
  `published` int(3) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=29 ;

--
-- Dumping data for table `articles`
--

INSERT INTO `articles` (`id`, `title`, `seftitle`, `text`, `textlimit`, `date`, `category`, `position`, `displaytitle`, `displayinfo`, `commentable`, `image`, `published`) VALUES

Non-Working DB (no new articles post on this site)
Code: [Select]
-- Table structure for table `articles`
--

CREATE TABLE IF NOT EXISTS `articles` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(100) default NULL,
  `seftitle` varchar(100) default NULL,
  `text` longtext,
  `date` datetime default NULL,
  `category` int(8) NOT NULL default '0',
  `position` int(6) default NULL,
  `displaytitle` char(3) NOT NULL default 'YES',
  `displayinfo` char(3) NOT NULL default 'YES',
  `commentable` varchar(5) NOT NULL default '',
  `published` int(3) NOT NULL default '1',
  `description_meta` varchar(255) default NULL,
  `keywords_meta` varchar(255) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=77 ;

--
-- Dumping data for table `articles`
--

INSERT INTO `articles` (`id`, `title`, `seftitle`, `text`, `date`, `category`, `position`, `displaytitle`, `displayinfo`, `commentable`, `published`, `description_meta`, `keywords_meta`) VALUES
« Last Edit: December 22, 2009, 11:40:21 PM by tinym »
Logged
follow me on posterous or friendfeed

tinym

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
    • tinym.com
Re: Cannot Publish New Articles after upgrade to PHP 5.2.9
« Reply #4 on: December 23, 2009, 04:57:44 PM »

Supercalifragilisticexpialidocious Batman!  I think I may have followed this thread many months ago without finishing... Wuuush!  I think I have messed up my site & made it quite not right.

http://snewscms.com/forum/index.php?topic=2303.15
Logged
follow me on posterous or friendfeed

Keyrocks

  • Doug
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 451
  • Posts: 6228
  • Semantically Challenged
    • snews.ca
Re: Cannot Publish New Articles after upgrade to PHP 5.2.9
« Reply #5 on: December 23, 2009, 05:12:21 PM »

Exactly what version of snews are you using... for the 'working' install and the 'not working' install?

EDIT 1:
Looking at the tables you have above...
- the 'Working' table is same as that used in a default 1.4 database
- the 'Not Working' table is same as that used in a default 1.5.31 database.
  If you use it with a 1.4 file-set, you will have problems.
« Last Edit: December 23, 2009, 05:33:44 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

tinym

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
    • tinym.com
Re: Cannot Publish New Articles after upgrade to PHP 5.2.9
« Reply #6 on: December 23, 2009, 07:57:53 PM »

~smack!

That is it...Thanks Keyrocks.
Logged
follow me on posterous or friendfeed

tinym

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
    • tinym.com
Re: Cannot Publish New Articles after upgrade to PHP 5.2.9
« Reply #7 on: March 30, 2010, 11:09:22 PM »

Update on this issue:

I've got a backup version of the database running on a local server & I'm getting ready to transplant it to the production site... 

My issues were database structure, as Keyrocks mentioned many months ago.  On my local machine, I created a fresh 1.5 site.  New database and all.  From my backup database, I removed all instances of CREATE TABLE and updated the newly created database.  It worked perfectly.  I have all the previous site content & can add new stuff too.

Next task - upgrade to 1.6 then 1.7?  ~sigh

EDIT: I repeated the tasks with the database and everything worked out nicely on the production site.
« Last Edit: March 31, 2010, 07:16:11 PM by tinym »
Logged
follow me on posterous or friendfeed

Keyrocks

  • Doug
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 451
  • Posts: 6228
  • Semantically Challenged
    • snews.ca
Re: Cannot Publish New Articles after upgrade to PHP 5.2.9
« Reply #8 on: March 31, 2010, 07:24:20 PM »

Update on this issue: Next task - upgrade to 1.6 then 1.7?  ~sigh

EDIT: I repeated the tasks with the database and everything worked out nicely on the production site.

That's Good News. It's a great feeling when you get it working, eh?  8)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU