php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15524 mail() fails if invoked from a root directory script
Submitted: 2002-02-12 10:37 UTC Modified: 2002-03-24 10:10 UTC
From: jcelle at cforj dot com Assigned:
Status: Closed Package: Mail related
PHP Version: 4.1.1 OS: windows nt 4.0 server sp6a
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jcelle at cforj dot com
New email:
PHP Version: OS:

 

 [2002-02-12 10:37 UTC] jcelle at cforj dot com
- web server is O'Reilly website 2.4.
- test.php contains following script :
mail( "jcelle@cforj.com", "TEST", "Hello World", "From: postmaster@cforj.com" );

- this file is duplicated so that it is in two directories :

1/ first directory = c:\www and corresponds to root directory of the web site www.cforj.com.
-> from there (http://www.cforj.com/test.php) the script fails (mail() returns FALSE. 

2/ second directory is a sub-directory c:\www\more and when acccessed through http://www.cforj.com/more/test.php the mail() function do work.

I don't know where to investigate from there. In case 1/ the SMTP logs show no attempt of connection at all while in case 2/ I can clearly see the complete SMTP conversation.

This is wether a Website (O'Reilly) problem or a PHP problem.

I tried to turn PHP error reporting to its max but got no information. 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-12 13:00 UTC] elixer@php.net
reclassify
 [2002-02-14 05:22 UTC] jcelle at cforj dot com
Trying to narrow a bit more this misbehaviour I used Website 3.1.11 (now from Deerfield) succesfully, meaning thus that it is certainly the previous 2.4 version of Website that causes the problem.

A workaround for those who cannot upgrade to version 3.x of Website is to place such scipts in a subdirectory of the site-root directory.
 [2002-03-05 09:10 UTC] ibasevitch at hotmail dot com
I also have a problem on win nt 4.0 terminal server edition.
mail function doesn't work becasue there is a problem finding the ini file..
thanks
 [2002-03-24 10:10 UTC] mfischer@php.net
The original poster (jcelle) said the problem did go away by upgrading the server software, so closing this one.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 12:01:33 2025 UTC