PhpWebAdmin IIS 6

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
zubize
New user
New user
Posts: 16
Joined: 2007-10-11 09:23
Location: Milan
Contact:

PhpWebAdmin IIS 6

Post by zubize » 2008-01-11 19:00

I installed the phpadmin on iis 6 and i installed php 5.2.4 also.

The php works good ( roundcube is ok ) but the phpadmin doesn't work.
I installed the component hmailserver.

The page ( index.asp ) doesn't give any error message. It's is blank.

Can somebody can you help me?
Good Surf ...

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2008-01-11 20:39


zubize
New user
New user
Posts: 16
Joined: 2007-10-11 09:23
Location: Milan
Contact:

config php.ini ok

Post by zubize » 2008-01-14 10:29

now, the system give me other error:
Fatal error: Call to undefined method com::Connect() in D:\Siti Web\webmail\accounts\initialize.php on line 44

I have installad the hmailserver object and if i execute the application I connect it.

the hmail server is installed in a other server.
Good Surf ...

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2008-01-14 18:56

Have you set com.allow_dcom = true to true in your php.ini? The line containing com.allow_dcom should not be prefixed with a semi-colon.

zubize
New user
New user
Posts: 16
Joined: 2007-10-11 09:23
Location: Milan
Contact:

Yes I set com.allow_dcom = true

Post by zubize » 2008-01-25 12:27

I have try to install the php on same hmailserver PC but the result is same, same error, I re-installed the versione hmailserver 4.3.1 and the error is same. On IIS 5 windows 2000 server with this configuration the phpwebadmin worked without any problems.

:-(
Good Surf ...

User avatar
SorenR
Senior user
Senior user
Posts: 3413
Joined: 2006-08-21 15:38
Location: Denmark

Post by SorenR » 2008-01-25 13:46

"Fatal error: Call to undefined method com::Connect() in D:\Siti Web\webmail\accounts\initialize.php on line 44"

Your PHP code is not PHP 5 compatible. Object handling in PHP 5 have been completely rewritten.
http://dk2.php.net/zend-engine-2.php

Wrong: com::Connect()
Correct: $obBaseApp->Connect();

zubize
New user
New user
Posts: 16
Joined: 2007-10-11 09:23
Location: Milan
Contact:

Post by zubize » 2008-02-12 17:12

the source code is correct, the php is the same, it'is changed only the server from 2000 to 2003.

User avatar
SorenR
Senior user
Senior user
Posts: 3413
Joined: 2006-08-21 15:38
Location: Denmark

Post by SorenR » 2008-02-13 00:45

W2K3 SP2 have a more tight security setting by default than the old W2K server. There are some threads in the forum about that...

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-03 11:33

Hello
I have not been able to install the PHPWebadmin neither on Win 2000 + IIS5 or Win 2003 + IIS6.

Today I tried again with no results:

Win 2003 SP2 + IIS6
PHP 5.x (latest)

1)
First of all, noone in the install guide of PHPWebadmin, told us what kind of configuration we have to do in the installer (there are at least three setups for IIS), we just cannot do next next next... in the installer.

2)
I browsed the internet, and some one here added some extra tips for IIS
http://www.supinfo-projects.com/fr/2006 ... windows/2/



It is possibile to have a real step by step guide for IIS6, since I has not been able to find one, and I am not the baddest home user around.

Thank you

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-03 11:33

following the instructions, now I just get always 404 errors...

User avatar
danny6167
Senior user
Senior user
Posts: 472
Joined: 2007-02-07 15:24
Location: Western Australia
Contact:

Post by danny6167 » 2008-03-03 11:41

IIS, gah, are you able to switch to apache? IIS sucks.

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-03 14:56

danny6167 wrote:IIS, gah, are you able to switch to apache? IIS sucks.
That is not the answer I expected... I want to use IIS because it is integrated in the system.

User avatar
danny6167
Senior user
Senior user
Posts: 472
Joined: 2007-02-07 15:24
Location: Western Australia
Contact:

Post by danny6167 » 2008-03-03 15:01

Internet explorer is integrated into the system, Doesn't mean it should be used.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Post by ^DooM^ » 2008-03-03 17:49

I use IIS on all my sites and it works perfectly well if setup correctly.

Have you setup DCOM permissions?

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 15:22

Hello ^DooM^
I have setup the DCOM permissions as the guide said, but just 404 errors. I tried on three differnt machines with no hope.
PHP should be installed in wich way? IIS ISAPI Filter?

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 16:30

No, I AM NOT ABLE.
Installed IIS6
installed PHP 5.xx IIS ISAPI FILTER
renamed config-dist to config.php
edited as the following:


// Global configuration. See examples below:
$hmail_config['rootpath'] = "D:/Inetpub/wwwroot/PHPWebAdmin";
$hmail_config['rooturl'] = "http://localhost/PHPWebAdmin";
$hmail_config['includepath'] = $hmail_config['rootpath'] . "include/";
$hmail_config['temppath'] = $hmail_config['rootpath'] . "temp/";
$hmail_config['defaultlanguage'] = "english";

/*
Example:
$hmail_config['rootpath'] = "C:/Program Files/Apache Group/Apache2/htdocs/PHPWebAdmin/";
$hmail_config['rooturl'] = "http://www.mydomain.com/PHPWebAdmin/";
$hmail_config['includepath'] = $hmail_config['rootpath'] . "include/";
$hmail_config['temppath'] = $hmail_config['rootpath'] . "temp/";
$hmail_config['pluginpath'] = $hmail_config['rootpath'] . "plugins/";
$hmail_config['defaultlanguage'] = "english";
$hmail_config['defaulttheme'] = "default";


*/

?>



Edited as the guide the values in php.ini
Edited the DCOM Permissions

I GET Error 404 even if I point to any PHP file

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 16:42

As i see in the docs, there are A LOT of inconsistences.
On 4 different server I am not been able to load it.

Here:
http://www.hmailserver.com/documentatio ... hpwebadmin

If you are using IIS, you may need to give IUSR_[yourcomputername] modify and write access to the folders PHPWebAdmintemplate_c and PHPWebAdmintemp


Where are that folders?

I have noticed a lot of lack of docs when I faced the problem to backup and restore an install of HMAIL.

Can PLEASE someone help me sorting all this problems out?

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 16:49

$hmail_config['rootpath'] = "H:\Inetpub\wwwroot\PHPWebAdmin/";
$hmail_config['rooturl'] = "http://localhost/PHPWebAdmin/";
$hmail_config['includepath'] = $hmail_config['rootpath'] . "include/";
$hmail_config['temppath'] = $hmail_config['rootpath'] . "temp/";
$hmail_config['pluginpath'] = $hmail_config['rootpath'] . "plugins/";
$hmail_config['defaultlanguage'] = "italian";
$hmail_config['defaulttheme'] = "default";

this is my config.php - no hopes :(

User avatar
SorenR
Senior user
Senior user
Posts: 3413
Joined: 2006-08-21 15:38
Location: Denmark

Post by SorenR » 2008-03-05 18:32

Did you enable DCOM in PHP.INI ??

[COM]
com.allow_dcom = true

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 18:40

OF course yes!!!!

User avatar
SorenR
Senior user
Senior user
Posts: 3413
Joined: 2006-08-21 15:38
Location: Denmark

Post by SorenR » 2008-03-05 18:45

Anything in your PHP errorlog?
Any COM or DCOM errors in your windows eventlog?

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 18:58

absolutely no erros

User avatar
SorenR
Senior user
Senior user
Posts: 3413
Joined: 2006-08-21 15:38
Location: Denmark

Post by SorenR » 2008-03-05 19:28

maggiore81 wrote:absolutely no erros
Well, that's good... or bad..

Probably nothing but I have forward slashes in rootpath..

"H:\Inetpub\wwwroot\PHPWebAdmin/" --> "H:/Inetpub/wwwroot/PHPWebAdmin/"

Have you allowed the PHP extension in IIS Manager?

When I installed PHP the installer was broken. Everything looked OK but .php files were associated with the wrong DOT8 name in <website> properties --> HomeDirectory (configuration) --> Application Extensions.

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 19:53

The slashes are ok.
The PHP extension.. I have to check.
I will check immediately

redrummy
Senior user
Senior user
Posts: 370
Joined: 2007-06-21 06:52
Location: Alaska

Post by redrummy » 2008-03-05 20:00

Have you allowed the PHP extension in IIS Manager?
I was going to suggest this earlier based on the 404 errors, but the 1st post indicated that PHP worked elsewhere... Oh wait, that was before maggiore81 hiijacked the thread. ;)

(zubize, I hope you got your problem solved.)

As Soren alludes, even when an extention is installed, is specifically has to be allowed in IIS6. If the logs in %systemRoot%\system32\LogFiles\W3SVCx show "404 2" codes then this is most likely the problem:
- IIS Manager > Computer > Web Service Extensions > PHP > Allow
- Make sure the correct ISAPI file and path is listed in the PHP extension Required Files tab

If the W3SVC logs show "404 3" then you need to add the PHP MIME type:
- IIS Manager > Computer > Properties > MIME Types
- Add .php = text/html

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 20:20

I have manually added this:

If the W3SVC logs show "404 3" then you need to add the PHP MIME type:
- IIS Manager > Computer > Properties > MIME Types
- Add .php = text/html


I get Error 404

Why all of these things are not written in the guide?

redrummy
Senior user
Senior user
Posts: 370
Joined: 2007-06-21 06:52
Location: Alaska

Post by redrummy » 2008-03-05 20:27

Did you restart IIS (just for good measure)?
What is in your W3SVC log now?
Why all of these things are not written in the guide?
Which guide? This is an hMailServer forum, but you're asking about a PHP problem.

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 20:35

I made some success browsing the net:


now I have:
Warning: require_once(C:/C:/Inetpub/wwwroot/PHPWebAdmin/include/functions.php) [function.require-once]: failed to open stream: Invalid argument in C:\Inetpub\wwwroot\PHPWebAdmin\initialize.php on line 37

Fatal error: require_once() [function.require]: Failed opening required 'C:/C:/Inetpub/wwwroot/PHPWebAdmin/include/functions.php' (include_path='.;C:\php5\pear') in C:\Inetpub\wwwroot\PHPWebAdmin\initialize.php on line 37

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 20:37

YOOOOOOOO
wrote a bad path... now appears the login page.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Post by ^DooM^ » 2008-03-05 20:48

maggiore81 wrote:Why all of these things are not written in the guide?
People don;t usually have this many problems setting up PHPWebAdmin.

create a file called test.php and stick the following code in there

Code: Select all

<?PHP
phpinfo();
?>
Save it and run it. Make sure DCOM is enabled in the list that it will produce.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 21:04

Exalted by my success (thanks the hints I received here), tried to install on a Win 2000 box on wich runs actually my main mailserver.
Installed IIS5 + PHP 5, modified the config.php and php.ini, tried to modify (as I could) the DCOM permissions but I get this:

Warning: session_start() [function.session-start]: open(C:\WINNT\TEMP\\sess_0cd650807608375a7db450955bee93a6, O_RDWR) failed: Permission denied (13) in C:\Inetpub\PHPWebAdmin\initialize.php on line 39

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Inetpub\PHPWebAdmin\initialize.php:39) in C:\Inetpub\PHPWebAdmin\initialize.php on line 39

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Inetpub\PHPWebAdmin\initialize.php:39) in C:\Inetpub\PHPWebAdmin\initialize.php on line 39


An error has occured. Please make sure that you have logged on with the appropriate permissions to perform this task.

Log in again.


Problem information Number 2
File Unknown
Line 0
Description Unknown: open(C:\WINNT\TEMP\\sess_0cd650807608375a7db450955bee93a6, O_RDWR) failed: Permission denied (13)

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 21:12

I have solved giving to c:\winnt\temp\* persmission to write to the IUSR...

User avatar
SorenR
Senior user
Senior user
Posts: 3413
Joined: 2006-08-21 15:38
Location: Denmark

Post by SorenR » 2008-03-05 22:30

maggiore81 wrote:I have solved giving to c:\winnt\temp\* persmission to write to the IUSR...
It is, as always, good procedure to verify that the environment is in working order before installing new features!

upload_tmp_dir =
session.save_path =

are usually forgotten, permission wise...

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 22:35

that strange behaviour just happened on the windows 2000 box. On win 2003 works correctly. But you agree with me that there is a lot of lack of documentation on phpwebadmin. I have been anging for days..

I have also noticed that phpwebadmin doesnt work with http compression enabled (the native of IIS5, tuned to compress .php files)

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 22:58

I rebooted the server and now I face the same problem
I changed these lines to:

upload_tmp_dir="C:\Inetpub\wwwroot\PHPWebAdmin\tmp"
session.save_path="C:\Inetpub\wwwroot\PHPWebAdmin\tmp"

how can I resolve?

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2008-03-05 23:40

It doesn't sound like a good idea to store the tmp folders under the www directory. The temporary directory you set in php.ini is for PHP in general, not only for PHPWebAdmin. It could very well be that sensitive information is stored in the temp directory and making that available to everyone is not a good idea.

Also, I'm not sure which "strange behaviour" you're referring to now. If you change the tmp_dirs and save_path in the PHP configuration you need to make sure that these directories are writable by your web server.

(By the way, this is basic PHP set up. PHPWebAdmin requires a working PHP installation to run. This is why this isn't documented in the PHPWebAdmin installation guide. On the other hand, a lot of the mistakes you've made are already documented in the hMailServer documentation so I'm not sure more documentation would have helped you. And if you need help on setting up PHP, you can find documentation on php.net. There will be more tutorials soon, but this is a hMailServer site covering hMailServer documentation. If you're having trouble with PHP, the right place to look is php.net..)

User avatar
maggiore81
Normal user
Normal user
Posts: 171
Joined: 2008-01-11 16:02
Location: near Ravenna (Italy)
Contact:

Post by maggiore81 » 2008-03-05 23:55

Hello
fortunately the servers that give me this weird errors is just a Windows 2000 machine with IIS5, it is not the final machine.
My final server will be an almost ready win 2003 STD SP2, I already tested it this evening and gave me no problems.

Post Reply