Newbie Digibeet: Installing phpMyFaq on Suse 11.2

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
Remo
Posts: 27
Joined: Thu Feb 17, 2011 9:57 pm

Newbie Digibeet: Installing phpMyFaq on Suse 11.2

Post by Remo » Fri Feb 18, 2011 8:12 pm

Hello,

I read about phpMyFaq in linux magazine, and found it interesting, maybe to start as tool for my own notes.
I am using Suse 11.2 and 11.3.
This installation was not an easy task. It certainly does not run "out of the box". Altough I notice, the author has really tried to
make it as simple as possible.
It took me some hours to get it working. I had to add some code in the lighttpd config file, which I found somewhere on the internet.
Configuration of php.ini and cgi-php etc. I have no clue about what it all does. Finding the directory where to put the stuff was
already a big quest.
Then it took me a couple of hours to find out, I had to add a filename on the database file field in the main setup screen.
The error, about no connection to database, but not an error from database did not really help :)
Now it is very hard, to figure out what actually is going wrong, especially when I have no clue about how to find the error logs.

It is installed now, and I get some webpage, without any faq. Well, this is normal I guess, since I don't have added one.
I don't know if it is bad luck, but when I tryed a few times to send mail, I was unable to recieve any e-mail for over a day, in my normal
e-mail account. When it worked again, there are a couple of e-mails send to <webmaster@example.org> ??? I don't know how this all works, but the header got back looks very strange :)

This is NOT a complain, but more about providing some information about my struggle to install a sofware package, without knowledge
how things work ! I guess, this software is more for webpage administrators, who know exactly what all the stuff means.

The status now is, I can login, and go to administration mode.
However I always get back to the admin login, and then to the dashboard again.
This error I read in this forum already, and some answers about something in a php.ini file, and strange session.
But in the replay, there is NO real information for others, who get the same problem.
So I would like to have a php.ini file, which is know to work.
Then I can compare it with my ini file, and see if I can find what is going wrong.

php --version
PHP 5.3.3 (cli)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


Kind regards,

Rene

Thorsten
Posts: 14710
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Newbie Digibeet: Installing phpMyFaq on Suse 11.2

Post by Thorsten » Sat Feb 19, 2011 4:07 pm

Hi Rene,

I tested phpMyFAQ several times on OpenSuse and it always worked.
It took me some hours to get it working. I had to add some code in the lighttpd config file, which I found somewhere on the internet.
Configuration of php.ini and cgi-php etc. I have no clue about what it all does. Finding the directory where to put the stuff was
already a big quest.
Why did you change something in the lighttpd file? If you don't use lighttpd and if you don't use rewrite rules, you don't need to change anything in it. Finding out the webroot directory is one of most "normal" things an admin should know.
Then it took me a couple of hours to find out, I had to add a filename on the database file field in the main setup screen.
Looks like you used SQLite. Then you need a file because it's a file based database.
I don't know if it is bad luck, but when I tryed a few times to send mail, I was unable to recieve any e-mail for over a day, in my normal
e-mail account. When it worked again, there are a couple of e-mails send to <webmaster@example.org> ??? I don't know how this all works, but the header got back looks very strange :)
You have to change the sender address in the main phpMyFAQ configuration in the admin backend. The default entry is webmaster@example.org.
The status now is, I can login, and go to administration mode. However I always get back to the admin login, and then to the dashboard again.
This behaviour has different reasons, one could be a wrong session configuration in PHP.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Remo
Posts: 27
Joined: Thu Feb 17, 2011 9:57 pm

Re: Newbie Digibeet: Installing phpMyFaq on Suse 11.2

Post by Remo » Sat Feb 19, 2011 7:33 pm

This I had to add to the lichttpd.conf.

fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
)))

I think it should go somewhere in the /etc/lighttpd/conf.d, but I don't know in what file.
Whithout it, the page give "Error 403 Forbidden"

You see, This is very difficult to diagnose, without real admin skills.

If it works on a suse system, is there not a way to find the differences with mine ?.
I have installed it on two systems, and both give exactly the same behavior.

I use SQLite. On one system I also installed mysql, but I could not choose it afterwards.
SQLite is filebased, but since there was no default file, and a possibility to give a prefix to the file, I tought the
program will use some default filename.

The mail I got finally was that sending to webmaster@example.org.
The mail system will try for the next five day's. :)
Basicly, I did not know it was possible to send email without somewhere some difficult configuration for a mail server.
It seems my home pc can also act as a mail server, and the ISP is accepting this ????

This is the mail system at host linux-csvj.site.

####################################################################
# THIS IS A WARNING ONLY. YOU DO NOT NEED TO RESEND YOUR MESSAGE. #
####################################################################

Your message could not be delivered for more than 1 hour(s).
It will be retried until it is 5 day(s) old.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<webmaster@example.org>: connect to example.org[192.0.32.10]:25: Connection
timed out


As some kind of digibeet, I don't understand "one could be a wrong session configuration in PHP."
There are two php.ini files, one for cli and one for cgi
and what is in there, I cannot understand.

And there is a lot of configuration in a /etc/php5/conf.d directory.
ctype.ini
dom.ini
gd.ini
hash.ini
iconv.ini
json.ini
pdo.ini
pdo_sqlite.ini
sqlite3.ini
sqlite.ini
tokenizer.ini
xmlreader.ini
xmlwriter.ini


All session field for php
# cat php.ini | grep "session" | grep -v ";" | grep -v ^$

session.save_handler = files
session.save_path = "/var/lib/php5"
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = Off
session.bug_compat_warn = Off
session.referer_check =
session.entropy_length = 32
session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 3
session.hash_bits_per_character = 5

I preciate if you or someone could help to fix this.
I spend quit some time in this, and it would be a bad investment, to quit this effort :)

kind regards,

Rene.

Remo
Posts: 27
Joined: Thu Feb 17, 2011 9:57 pm

Re: Newbie Digibeet: Installing phpMyFaq on Suse 11.2

Post by Remo » Sat Feb 19, 2011 11:36 pm

in stead of adding
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
in /etc/lighttpd/ligttpd.conf

It seems that uncomment these lines in /etc/lighttpd/conv.d/fastcgi.conf also works
This is what is standard in the file, but commented out ???

Code: Select all

fastcgi.server = ( ".php" =>
                   ( "php-local" =>
                     (             
                       "socket" => socket_dir + "/php-fastcgi-1.socket",
                       "bin-path" => server_root + "/cgi-bin/php5",     
                       "max-procs" => 1,                                
                       "broken-scriptfilename" => "enable",             
                     )                                                  
                   ),                                                   
                   ( "php-tcp" =>                                       
                     (                                                  
                       "host" => "127.0.0.1",                           
                       "port" => 9999,                                  
                       "check-local" => "disable",                      
                       "broken-scriptfilename" => "enable",             
                     )                                                  
                   ),                                                   

                   ( "php-num-procs" =>
                     (                 
                       "socket" => socket_dir + "/php-fastcgi-2.socket",
                       "bin-path" => server_root + "/cgi-bin/php5",     
                       "bin-environment" => (                           
                         "PHP_FCGI_CHILDREN" => "16",
                         "PHP_FCGI_MAX_REQUESTS" => "10000",
                       ),
                       "max-procs" => 5,
                       "broken-scriptfilename" => "enable",
                     )
                   ),
                )

I am still unable to use the admin mode.
Is there anybody who can tell me how to diagnos, or fix this ????

Remo
Posts: 27
Joined: Thu Feb 17, 2011 9:57 pm

Re: Newbie Digibeet: Installing phpMyFaq on Suse 11.2

Post by Remo » Thu Feb 24, 2011 11:40 am

phpMyFAQ Codename Portia
Logged in as (admin)
Time to your session expiration: Loading...



System Information

phpMyFAQ Version phpMyFAQ 2.6.14
Server Software lighttpd/1.4.26
PHP Version PHP 5.3.3
Register Globals off
Safe Mode off
Open Basedir off
Database Server Sqlite
Database Client Version SQLite 2.8.17
Database Server Version SQLite 2.8.17
Webserver Interface CGI-FCGI
PHP Extensions Core, date, ereg, libxml, pcre, filter, Reflection, hash, SPL, SimpleXML, session, xml, cgi-fcgi, ctype, dom, gd, standard, iconv, json, PDO, pdo_sqlite, SQLite, sqlite3, tokenizer, xmlreader, xmlwriter, mhash



What is going wrong ????
Still not able to use the admin mode.

Kind regards,

Remo
Posts: 27
Joined: Thu Feb 17, 2011 9:57 pm

Re: Newbie Digibeet: Installing phpMyFaq on Suse 11.2

Post by Remo » Thu Feb 24, 2011 12:06 pm

Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes,

I found it.

From php.ini: session.save_path = "/var/lib/php5"

Permission of directory /var/lib/php5:
drwxr-xr-x 2 wwwrun root 4096 2010-11-10 14:06 php5

I don't know what wwwrun means, but I changed it to

chown lighttpd:lighttpd php5

Thorsten
Posts: 14710
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Newbie Digibeet: Installing phpMyFaq on Suse 11.2

Post by Thorsten » Thu Feb 24, 2011 12:10 pm

Hi,

great news! :-)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

toddb570
Posts: 4
Joined: Mon Jan 30, 2012 1:19 am

Re: Newbie Digibeet: Installing phpMyFaq on Suse 11.2

Post by toddb570 » Mon Jan 30, 2012 9:45 am

Remo wrote:Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes,

I found it.

From php.ini: session.save_path = "/var/lib/php5"

Permission of directory /var/lib/php5:
drwxr-xr-x 2 wwwrun root 4096 2010-11-10 14:06 php5

I don't know what wwwrun means, but I changed it to

chown lighttpd:lighttpd php5

Hi Remo, could you please explain a bit more , I can't Install phpMYFAQ on Suse 12.1

Thorsten
Posts: 14710
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Newbie Digibeet: Installing phpMyFaq on Suse 11.2

Post by Thorsten » Mon Jan 30, 2012 11:53 am

Hi,

what error messages do you get?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply