macsat.com OpenWrt and ASUS WL Forum
January 08, 2009, 14:12:18 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: OpenWRT phpxmail tutorial.... something seems to be missing  (Read 3243 times)
0 Members and 1 Guest are viewing this topic.
Chris
Newbie
*
Offline Offline

Posts: 12


View Profile
« on: January 31, 2007, 10:57:12 AM »

Hi,

the xmail/phpxmail tutorial is great and I'm keen to make it work but have hit a problem.
I get a 404 - not found error when when I try to view the phpxmail config page.
http://192.168.23.111/phpxmail (browser shows http://192.168.23.111/phpxmail/)
http://192.168.23.111/phpinfo.php displays okay so lighttpd / php5 is working.
www server root is /opt/www and contains:

-rw-r--r--    1 root     root           20 Jan  1 19:14 phpinfo.php
drwxr-xr-x    6 root     root         4096 Jan  3 00:29 phpxmail

the dir /opt/www/phpxmail/
contains many .php files and .inc files including servers.php after command <touch servers.php> but the file size is zero blocks / bytes.

Should all the .php & .inc also be in the server root directory (/opt/www)?
It seems to me that pointing the browser at http://<ip.address/phpxmail is asking it to look at nothing if my server_root doesn't have any files (other than the phpinfo.php file).... the browser address bar shows http://192.168.23.111/phpxmail/
like its looking at a directory as there is no phpxmail file?!

If anyone has any ideas please let me know.

Thanks for help so far.

Chris
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #1 on: January 31, 2007, 11:23:02 AM »


did you try to access :

http://192.168.23.111/phpxmail/index.php  ?

I'm thinking that your www server might not be setup to automaticly use index.php as index file, and only index.htm or index.html.

If you are using lighttpd, you need to change it in lighttpd.conf so that you get a section like:

Code:
server.indexfiles          = ( "index.html", "index.htm", "index.php" , "default.html",
                                "default.htm", "default.php" )

...if you want all of the above to act as index files. The order of the files is the server-resolve order.

If this is the issue, there is a small thing I need to change in the php part of the tutorial I guess :-)

Could you please try ?
Logged
Chris
Newbie
*
Offline Offline

Posts: 12


View Profile
« Reply #2 on: January 31, 2007, 12:45:58 PM »

ahah! Thanks for that M.  Smiley

I have added those index file types to the lighttpd.conf and its changed the result,
but still errors....

the browser page http://192.168.23.111/phpxmail/
comes back with two frames and an error in each:

Fatal error: Call to undefined function session_start() in /opt/www/phpxmail/main.php on line 5

Fatal error: Call to undefined function session_start() in /opt/www/phpxmail/menu.php on line 6

(I had session_start error when I tried using this with tthttpd and switched to lighttpd)

Any thoughts about how we can progress from here.

Thanks for you help so far.

CJ
Logged
zsjoska
Newbie
*
Offline Offline

Posts: 29



View Profile
« Reply #3 on: January 31, 2007, 14:18:21 PM »

Have you tried the solution at the thread?
http://www.macsat.com/forum/index.php?topic=468.0
Logged

------------------------------------------------------------
Using Asus WL-500g Deluxe with OpenWrt RC6 + WebIf2
Chris
Newbie
*
Offline Offline

Posts: 12


View Profile
« Reply #4 on: February 01, 2007, 09:11:20 AM »

Yay! Success!

I went and read up on the "session_start()" command which this error refers to & it seems apparent that phpxmail needs cookies and session info - my browser isn't getting any cookies from php which made me think there might be a package for it, so I found & installed php5-mod-session_5.0.5-1_mipsel.ipk from:
http://downloads.openwrt.org/backports/rc6/php5-mod-session_5.0.5-1_mipsel.ipk
I also remembered seeing session.so in /opt/etc/php.ini & not knowing if it was necessary I removed ";" from ";extension=session.so" .... and bingo! I had a phpxmail login page!

Its just a local network test mail server so far but I have created a user & sent & received emails from a MS Outlook client.

Macsat - thanks for your help at various points - perhaps the tutorial instructions need to have a line to install php5-mod-session package added to it.... also enabling "extension=session.so" in php.ini (if you think it is required.... is it?).

cheers,

Chris
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #5 on: February 01, 2007, 11:37:05 AM »


Yes - I will update the tutorial to mention the session() part of PHP :-)

Thanks.

Great that it is now working for you.

Please do keep us posted about performance in real use and so on. I have only made a small test here, havent really used it in a "production" environment :-)

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.084 seconds with 25 queries.