Update from 2.0.3 to 2.6.3

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
gdn
Posts: 3
Joined: Thu Mar 11, 2010 11:41 am

Update from 2.0.3 to 2.6.3

Post by gdn » Thu Mar 11, 2010 12:01 pm

Hello.

I wont update my site from older version phpmyfaq.
It installed on mysql with charset koi8-r.

When I update, all steps ending sucessfully, but after I open site and I see trash.
Information on russian language broken.
And I see errors on top:

Code: Select all

phpMyFAQ warning [2]: file_put_contents(./data/tracking11032010) [function.file-put-contents]: failed to open stream: No such file or directory in Session.php on line 132

phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /usr/local/www/phpmyfaq-2.6.3/inc/functions.php:173) in index.php on line 580

phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /usr/local/www/phpmyfaq-2.6.3/inc/functions.php:173) in index.php on line 581

phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /usr/local/www/phpmyfaq-2.6.3/inc/functions.php:173) in index.php on line 582

phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /usr/local/www/phpmyfaq-2.6.3/inc/functions.php:173) in index.php on line 583

phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /usr/local/www/phpmyfaq-2.6.3/inc/functions.php:173) in index.php on line 584

phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /usr/local/www/phpmyfaq-2.6.3/inc/functions.php:173) in index.php on line 585

phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /usr/local/www/phpmyfaq-2.6.3/inc/functions.php:173) in index.php on line 586
How I can correctly update phpmyfaq?

weltling
Posts: 13
Joined: Tue Jul 28, 2009 5:46 pm

Re: Update from 2.0.3 to 2.6.3

Post by weltling » Thu Mar 11, 2010 8:00 pm

what kind of output do you see? please give a screenshot
all the data is converted to utf8, so check first that you viewirg the site in the correct encoding in your browser

regarding this:
phpMyFAQ warning [2]: file_put_contents(./data/tracking11032010) [function.file-put-contents]: failed to open stream: No such file or directory in Session.php on line 132
check that the data dir exists and is writable

please give your server information

UTAKA
Posts: 37
Joined: Sun Jan 24, 2010 8:01 am
Location: phpmyfaq-jp.org
Contact:

Re: Update from 2.0.3 to 2.6.3

Post by UTAKA » Thu Mar 11, 2010 10:27 pm

phpMyFAQ warning [2]: file_put_contents(./data/tracking11032010) [function.file-put-contents]: failed to open stream: No such file or directory in Session.php on line 132
data/tracking*** is a file that the program makes automatically, and the owner is "apache"(if your server is Apache server).

There is two method.
- All files of data/tracking**** are deleted.
rm -f data/*
- The owner and the ownership group of all files of data/tracking**** are changed to "apache"
chown apache data/*
chgrp apache data/*
---------------------------------------
Sorry...I am not good at English.
http://www.phpmyfaq-jp.org
---------------------------------------

gdn
Posts: 3
Joined: Thu Mar 11, 2010 11:41 am

Re: Update from 2.0.3 to 2.6.3

Post by gdn » Fri Mar 12, 2010 11:18 am

Sorry for my bad english.

My server is apache.

# apachectl -V
Server version: Apache/2.2.14 (FreeBSD)
Server built: Mar 3 2010 17:02:31
Server's Module Magic Number: 20051115:23
Server loaded: APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)


I check datadir:

# ll /usr/local/www/phpmyfaq-2.0.3/phpmyfaq | grep data
drwxr-xr-x 2 www www 512 Mar 12 09:28 data

# ll /usr/local/www/phpmyfaq-2.0.3/phpmyfaq/data/
total 0
#

After copy new files I make
# chown -R www:www phpmyfaq-2.0.3

My httpd.conf

Code: Select all

ServerRoot "/usr/local"
Listen 80
...
LoadModule
...
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User www
Group www
</IfModule>
</IfModule>
ServerAdmin you@example.com
ServerName 172.16.1.232:80
DocumentRoot "/usr/local/www"
<Directory />
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>
<Directory "/usr/local/www">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>
ErrorLog "/var/log/httpd-error.log"
LogLevel warn
<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "/var/log/httpd-access.log" combined
</IfModule>
<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/usr/local/www/apache22/cgi-bin/"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "/usr/local/www/apache22/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
DefaultType text/plain
<IfModule mime_module>
    TypesConfig etc/apache22/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
Include etc/apache22/Includes/*.conf
For me very important save data in UTF-8 encoding.
I change any encoding in my browser, but I don't see correct text
You do not have the required permissions to view the files attached to this post.

weltling
Posts: 13
Joined: Tue Jul 28, 2009 5:46 pm

Re: Update from 2.0.3 to 2.6.3

Post by weltling » Sat Mar 13, 2010 9:46 am

did you mean the error with the ./data dir remains even after changing rights?

could you go directly to mysql shell and run the following:

> charset utf8;
> SELECT content FROM faqdata ORDER BY RAND() LIMIT 3;

and then post the otput ... its just to ensure the data in the database is broken

you did'n mention your php and mysql versions )

gdn
Posts: 3
Joined: Thu Mar 11, 2010 11:41 am

Re: Update from 2.0.3 to 2.6.3

Post by gdn » Sun Mar 14, 2010 6:05 pm

I set charset in mysql to utf8

this output:

Code: Select all

mysql> SELECT content FROM faqdata ORDER BY RAND() LIMIT 3;       
                                                                                                     
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+                
| content                                                                                                                                                                                                                                        |                
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| <p>
Д╦╨Д╨├Е┼═Х╫╫Ф√╟Ф▄┤Ф═┤О╪▄Ф┌╗И°─Х╕│И╪═Ф═┤Е▐ЁИ■╝И─┴Ф▀╘Ф√╟Ф≤╬Г╓╨Е▄╨Е÷÷О╪▄Е╧╤Е╟├Ф▄┤Ф═┤Ф▀√Х┤ЁФ√╟Е▄╨Е÷÷Д╦╜Ц─┌
</p>
<p>
<img src="images/Image/9999999.JPG" alt=" " width="398" height="232" />б═
</p>
<p>
Д╧÷Е▐╞Д╩╔Г⌡╢Ф▌╔Е╟├Ф▄┤Ф═┤Ф▀√Х┤ЁФ═┤И╒≤Е╓└О╪┬Е├≥Ф°┴Х╢╖Е╦│Е╞╧Е░█Г╖╟О╪▄Е▒╗Ф°÷Г╜┴О╪┴Ц─┌
</p>
<p>
═
</p>
| <span class="bodycopynew"><span style="font-size: 12pt; line-height: 115%; font-family: 'Times New Roman','serif'">exception</span></span>
| <p>
Д╦▀Х╫╫http-tunnelД╧▀Е░▌О╪▄Х©⌡Diagnostic ToolsО╪▄Ф▄┴Б─°Ф╣▀Х╞∙Б─²Ф▄┴И▓╝О╪▄Ф÷╔Х╞╒Д╧▀Е░▌Ф┌╗Е╨■Х╞╔Г°▀Х╖│http-tunnelГ └И─÷Е╨╕Ц─┌Г└╤Е░▌О╪▄Е╝┐Е╨■Х╞╔И─┴Ф▀╘Ф┌╗Е°╟Е²─Г └proxyФ°█Е┼║Е≥╗О╪▄Ф┌╗И°─Х╕│Е├≥Specify proxy settingsЦ─┌Г└╤Е░▌Ф▄┴- Advanced Б─⌠Д╧▀Е░▌Г°▀Х╖│Х▐°Е█∙О╪▄Х▐°Е█∙И┤▄Ф°┴Е╔╫Е┤═Д╦╙Г╕▐Г▒·Ф√╞Г └Ф°█Е┼║Е≥╗Е▓▄Г╚╞Е▐ёО╪┬adress or IPХ║▄О╪▄Ф┬√Х─┘Application Port Protocol Б─⌠ TCPХ║▄О╪┴Ц─┌
</p>
<p>
═
</p>
|
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.02 sec)

mysql>

Data in database not correct.

# mysql -V
mysql Ver 14.14 Distrib 5.1.44, for portbld-freebsd8.0 (i386) using 5.2

# php -v
PHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Mar 3 2010 17:30:39)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

weltling
Posts: 13
Joined: Tue Jul 28, 2009 5:46 pm

Re: Update from 2.0.3 to 2.6.3

Post by weltling » Sun Mar 14, 2010 7:14 pm

your php and mysql versions are actually ok

one thing i didn't say about - the data might *look* broken if your terminal charset is wrong... so please set your terminal encoding to utf8 and run the previous queries on the migrated database again

anyway we've got here a nonstandard case )

and i have another scenario which could help to figure something out

set your terminal encoding to koi8r, then run the following

Code: Select all

SET NAMES koi8r;
CREATE TABLE test(foo VARCHAR(10)) CHARACTER SET koi8r;
INSERT INTO test VALUES('вася'), ('пупкин');
SELECT * FROM test;
you should see correct values

then change your terminal encoding to utf8 and run

Code: Select all

SET NAMES utf8;
ALTER TABLE test MODIFY COLUMN foo VARCHAR(20) CHARACTER SET utf8;
SELECT * FROM test;
if that works, the database migration should also be ok

but don't forget the terminal charset!

Post Reply