php-windows Digest 8 Nov 2004 18:13:25 -0000 Issue 2460

Topics (messages 24931 through 24936):

Re: mail function not working
        24931 by: Manuel Lemos
        24935 by: Sean S. Karshis

Form data not being submitted
        24932 by: Justin.Baiocchi.csiro.au
        24933 by: Justin.Baiocchi.csiro.au

Re: Performance question?
        24934 by: Bowden, Zeb

Recommended PHP search engine?
        24936 by: Anne Shroeder

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hello,

On 11/07/2004 11:48 PM, William Lee wrote:
My system:
Windows XP
Apache
SMTP server: MailEnable
PHP 5.0.2

Whenever I try to use the mail function, it returns me a value of "false".

My php.ini settings are:
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

Here's the function I'm using:
<?php
    $r = mail("[EMAIL PROTECTED]", "my subject", "line1") ;
    var_dump($r);
?>

This always returns: bool(false)

What else do I need to setup in order for this to work???

I can send a regular email through using outlook express. any ideas?

Does Outlook express use a SMTP server on localhost? If not, you need to adjust php.ini to match the SMTP server address used by Outlook express.



--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--- End Message ---
--- Begin Message ---
Also make sure that relaying is open on localhost (127.1.1.1).

-----Original Message-----
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 07, 2004 10:30 PM
To: William Lee
Cc: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: mail function not working

Hello,

On 11/07/2004 11:48 PM, William Lee wrote:
> My system:
> Windows XP
> Apache
> SMTP server: MailEnable
> PHP 5.0.2
> 
> Whenever I try to use the mail function, it returns me a value of
"false".
> 
> My php.ini settings are:
> [mail function]
> ; For Win32 only.
> SMTP = localhost
> smtp_port = 25
> 
> Here's the function I'm using:
> <?php
>     $r = mail("[EMAIL PROTECTED]", "my subject", "line1")
;
>     var_dump($r);
> ?>
> 
> This always returns: bool(false)
> 
> What else do I need to setup in order for this to work???
> 
> I can send a regular email through using outlook express.  any ideas?

Does Outlook express use a SMTP server on localhost? If not, you need to

adjust php.ini to match the SMTP server address used by Outlook express.


-- 

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hi, I have a nasty little problem.

Some user which connect to my website are unable to use the forms to
submit any data - it works fine for some people, but nothing happens for
others. It just goes back to the form page but no data is submitted.

It's using PHP 4.3.4

Register Globals are on (it's just an intranet).

Below is an example of one of the forms that don't work for some people:



<FORM ACTION="<?php echo($PHP_SELF); ?>" METHOD=POST>

<table border="1" width="55%" bgcolor="#0D9BA4">
  <tr>
    <td width="43%"><b>First Name</td>
    <td width="57%" align="center"><input type="Text" name="fname"></td>
  </tr>
  <tr>
    <td width="43%"><b>Last Name</td>
    <td width="57%" align="center"><input type="Text" name="lname"></td>
  </tr>
  <tr><td width="43%"><b>Away From: (click calendar icon)</td>
  <td width="57%" align="center">
  <input name="start" type="date" size="10"><a
href="javascript:NewCal('start','yyyymmdd')"><img src="untitled.bmp"
width="16" height="16" border="0" alt="Pick a date"></a></td>
  </tr>
     <tr>
    <td width="43%"><b>Return Date: (click calendar icon)</td><td
width="67%" align="center">
    <input name="end" type="date" size="10"><a
href="javascript:NewCal('end','yyyymmdd')"><img src="untitled.bmp"
width="16" height="16" border="0" alt="Pick a date"></a></td>
    </tr>
  <tr>
    <td width="43%"><b>Details (location/contact number etc)</td>
    <td width="57%" align="center"><textarea name="comment" cols="25"
rows="3"></textarea></td>
  </tr>

</table>
<br>
<input type="Submit" name="submit" value="Enter your details"
style="background-color:#0D9BA4;color:#FFFFFF;font-weight: bold">
</FORM>
<?php
if ($submit)
 {
$dbcnx = @mysql_connect( "localhost", "root", "password");
mysql_select_db("movements"); 
$sql = "INSERT INTO details SET fname='$fname', lname='$lname',
start='$start', end='$end', comment='$comment'";
mysql_query($sql);
echo "<b>Thank you, your travel details have been recorded.</b>";
 }




Thanks
Justin

--- End Message ---
--- Begin Message ---
Actually , problem solved - turns out IIS was configured to use two
different php installations on the server(?), one of which had a
different php.ini file and so people who were handled by that
'installation' couldn't post data. Weird.

-----Original Message-----
From: Baiocchi, Justin (CSIRO IT, Armidale) 
Sent: Monday, 8 November 2004 3:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Form data not being submitted


Hi, I have a nasty little problem.

Some user which connect to my website are unable to use the forms to
submit any data - it works fine for some people, but nothing happens for
others. It just goes back to the form page but no data is submitted.

It's using PHP 4.3.4

Register Globals are on (it's just an intranet).

Below is an example of one of the forms that don't work for some people:



<FORM ACTION="<?php echo($PHP_SELF); ?>" METHOD=POST>

<table border="1" width="55%" bgcolor="#0D9BA4">
  <tr>
    <td width="43%"><b>First Name</td>
    <td width="57%" align="center"><input type="Text" name="fname"></td>
  </tr>
  <tr>
    <td width="43%"><b>Last Name</td>
    <td width="57%" align="center"><input type="Text" name="lname"></td>
  </tr>
  <tr><td width="43%"><b>Away From: (click calendar icon)</td>
  <td width="57%" align="center">
  <input name="start" type="date" size="10"><a
href="javascript:NewCal('start','yyyymmdd')"><img src="untitled.bmp"
width="16" height="16" border="0" alt="Pick a date"></a></td>
  </tr>
     <tr>
    <td width="43%"><b>Return Date: (click calendar icon)</td><td
width="67%" align="center">
    <input name="end" type="date" size="10"><a
href="javascript:NewCal('end','yyyymmdd')"><img src="untitled.bmp"
width="16" height="16" border="0" alt="Pick a date"></a></td>
    </tr>
  <tr>
    <td width="43%"><b>Details (location/contact number etc)</td>
    <td width="57%" align="center"><textarea name="comment" cols="25"
rows="3"></textarea></td>
  </tr>

</table>
<br>
<input type="Submit" name="submit" value="Enter your details"
style="background-color:#0D9BA4;color:#FFFFFF;font-weight: bold">
</FORM>
<?php
if ($submit)
 {
$dbcnx = @mysql_connect( "localhost", "root", "password");
mysql_select_db("movements"); 
$sql = "INSERT INTO details SET fname='$fname', lname='$lname',
start='$start', end='$end', comment='$comment'";
mysql_query($sql);
echo "<b>Thank you, your travel details have been recorded.</b>";
 }




Thanks
Justin

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
The first thing I'd do would be to try to identify the query(ies) that's
bottlenecking the process ... It's possible that there's just one that's
holding everything up, then you can work on optimizing just the slow one
(or ones). 

You may also want to try combining or reworking the 12 queries you have
to make the the one transaction table ... That seems like a lot to me
and I would think there's a better way to get the information you're
after involving less than 12; of course I could be dead wrong on that
assumption since I don't know anything about the data you're after (or
the transaction talbe you're getting it from either for that matter;)



-----Original Message-----
From: George Pitcher [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 07, 2004 5:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Performance question?

Hi,

I'm currently rebuilding a site previously constructed using
Lasso/Filemaker. I'm using PHP5/MySQL4/PEAR::DB and Smarty.

The site holds course content information for universities and colleges.

My first page after logging on displays courses for the user. This lists
relevant courses, their status and some stats for items that require
attention.

This involves one SQL query to a course table containing 3,100 records,
and
in my sample returned 4 records. The stats and status data require
another
12 SQL queries to a transaction table containing over 32,000 records. In
both these tables, I have indexed all the columns.

My testing this weekend is producing disappointing results with the page
taking between 20 and 50 seconds to appear.

I'm running this on a fairly fast laptop with XP, IIS5, using the ISAPI
method. The deployment is going to be on slower NT servers.

Does anyone have any tips to improve performance?

MTIA

George

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
I'm hoping I can get some recommendations for a search engine to implement
on my site - actually, I have two needs:

(1) Site 1:  Linux-based, 10,000+ page site, currently on shared server (no
root access) but moving to dedicated server within 2 months.  Very little-no
need for searching through database information (only .shtml and .php text
pages)
(2) Site 2:  Windows-based, 500-1000 page site, currently on shared server.
No database, just .htm and .php pages.

I've gone through about 100 listings in hotscripts.com and not yet found a
good solution, so hoping to get a recommendation through this list.

Anne

--- End Message ---

Reply via email to