Using PDO with APC

Using PDO with APC

am 20.09.2007 11:45:54 von James Mclean

Howdy,

I'm attempting to implement APC into my framework, but running into
some issues. I'm using PostgreSQL 8.2 with PDO, on PHP 5.2.2 running
on Gentoo Linux.

When ever I attempt to save my result set obtained from the database
into the APC cache, it throws an exception with the following message:
'You cannot serialize or unserialize PDOStatement instances'.

Stack trace shows the __sleep() method on the PDOStatement throws the
exception when it is called inside apc_store().

I've attempted to use ObjectArray from SPL, however you seem to loose
the methods on the object, which is clearly no good for me either.

Has anyone got APC working with PDOStatement result sets?

Cheers,

James

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

Re: Using PDO with APC

am 21.09.2007 02:29:52 von James Mclean

On 9/20/07, James McLean wrote:
> Howdy,
>
> I'm attempting to implement APC into my framework, but running into
> some issues. I'm using PostgreSQL 8.2 with PDO, on PHP 5.2.2 running
> on Gentoo Linux.
>
> When ever I attempt to save my result set obtained from the database
> into the APC cache, it throws an exception with the following message:
> 'You cannot serialize or unserialize PDOStatement instances'.
>
> Stack trace shows the __sleep() method on the PDOStatement throws the
> exception when it is called inside apc_store().
>
> I've attempted to use ObjectArray from SPL, however you seem to loose
> the methods on the object, which is clearly no good for me either.
>
> Has anyone got APC working with PDOStatement result sets?

I have resolved this issue, it turned out I was attempting to cache
the incorrect variable. I have outlined the issue and steps to resolve
it on my website:
http://blog.phpguy.org/2007/09/21/apc-and-web-application-pe rformance-take-2/

Cheers

James

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

Pages not fully loading

am 22.09.2007 00:42:40 von John Dillon

I am stumped and so is my hosting help desk (shared server) on this
one. My site is on a php4 server, with database. Recently I have had
pages not fully load, and it seems to be a symptom that is spreading to
other pages in the site. I have considered the following causes and
dismissed them:

- .htaccess page - there is very little in it
- php.ini file - is old and the problem is new
- mail function causes delay which times out the php rendering ...
still wondering about that one, but the help desk reports that it works
quickly. I wonder because in some though not all the instances of the
problem, the page renders to the line just before the mail() function
- a recent change to the script caused the problem - no, because I have
loaded older versions and they also have the problem, these pages were
working for a few years, though I have updated regularly I am pretty
sure this is a recent issue.
- it is my computer or connection - no, the help desk and others have
noticed the problem
- it is the server - well the help desk don't think so.

I notice the pages can:
- partly load, often to the same point but sometimes to different points
in the script
- not load at all and be not found,
- load but incorrectly with the php arguments missing (to explain: an
enquiry page has a form that submits to the same page and it should come
back and say thanks etc, but it comes back with the form but without
some of the pre-set element like the product the form was enquiring on).
- re-load correctly on refresh, or partly load more, then fully load.
- problem occurs both with IE and Firefox.

I have tried putting print ("test line x") throughout the script, which
just showed me it was failing sometimes before the mail function, but
not always, sometimes in the middle of a loop to create a select box it
just stopped rendering.

Has anyone had this strange and frustrating experience?

john

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

Re: Pages not fully loading

am 22.09.2007 00:55:56 von andresmontanez

>
> Has anyone had this strange and frustrating experience?
>

Hopefuly no.
But, what session storage are you using? Maybe there is a problem
there (quota reached, etc), and the session fail is causing the page
fail.

Anyway, try to the help desk to review the Apache Logs, and see if
there is no inusual activity, like segmentations faults, etc.

Good luck.


--=20
Atte, Andr=E9s G. Monta=F1ez
T=E9cnico en Redes y Telecomunicaciones
Montevideo - Uruguay

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

RE: Pages not fully loading

am 22.09.2007 02:53:27 von Instruct ICC

This new hotmail has really screwed up the formatting, sorry.

I have seen where errors were not displayed on a PHP production server, so =
I would get a blank screen. Check the web server error logs as was suggest=
ed. Also try to display all errors just for testing:
http://php.net/error_reporting
// Report all PHP errors (bitwise 63 may be used in PHP 3)
error_reporting(E_ALL);

// Same as error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);

If you are using functions that buffer the output, maybe you need to proper=
ly flush it? I haven't run into this in PHP, but I have in C/C++, and PHP =
_does_ have output buffering.
____________________________________________________________ _____
Kick back and relax with hot games and cool activities at the Messenger Caf=
=E9.
http://www.cafemessenger.com?ocid=3DTXT_TAGLM_SeptWLtagline=

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

RE: Pages not fully loading

am 22.09.2007 05:04:53 von Bastien Koert

--_585cfc83-7138-486e-a7e5-63f343048332_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


are you sure that you have=20
=20
1. error handling turned on
=20
2. browser set to display all errors ( friendly error messages unchecked)
=20
bastien
=20
> Date: Fri, 21 Sep 2007 23:42:40 +0100> From: ioannes@btinternet.com> To: =
php-db@lists.php.net> Subject: [PHP-DB] Pages not fully loading> > I am stu=
mped and so is my hosting help desk (shared server) on this > one. My site =
is on a php4 server, with database. Recently I have had > pages not fully l=
oad, and it seems to be a symptom that is spreading to > other pages in the=
site. I have considered the following causes and > dismissed them:> > - .h=
taccess page - there is very little in it> - php.ini file - is old and the =
problem is new> - mail function causes delay which times out the php render=
ing ... > still wondering about that one, but the help desk reports that it=
works > quickly. I wonder because in some though not all the instances of =
the > problem, the page renders to the line just before the mail() function=
> - a recent change to the script caused the problem - no, because I have >=
loaded older versions and they also have the problem, these pages were > w=
orking for a few years, though I have updated regularly I am pretty > sure =
this is a recent issue.> - it is my computer or connection - no, the help d=
esk and others have > noticed the problem> - it is the server - well the he=
lp desk don't think so.> > I notice the pages can:> - partly load, often to=
the same point but sometimes to different points > in the script> - not lo=
ad at all and be not found,> - load but incorrectly with the php arguments =
missing (to explain: an > enquiry page has a form that submits to the same =
page and it should come > back and say thanks etc, but it comes back with t=
he form but without > some of the pre-set element like the product the form=
was enquiring on).> - re-load correctly on refresh, or partly load more, t=
hen fully load.> - problem occurs both with IE and Firefox.> > I have tried=
putting print ("test line x") throughout the script, which > just showed m=
e it was failing sometimes before the mail function, but > not always, some=
times in the middle of a loop to create a select box it > just stopped rend=
ering.> > Has anyone had this strange and frustrating experience?> > john> =
> -- > PHP Database Mailing List (http://www.php.net/)> To unsubscribe, vis=
it: http://www.php.net/unsub.php>=20
____________________________________________________________ _____
Invite your mail contacts to join your friends list with Windows Live Space=
s. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=3Dcreate&wx_ url=3D/friends.=
aspx&mkt=3Den-us=

--_585cfc83-7138-486e-a7e5-63f343048332_--

Re: Pages not fully loading

am 22.09.2007 12:12:44 von John Dillon

Thanks to all who replied. There is a lot of undefined index and
undefined variables when I turn on error reporting.

The error logs show 'file not found' errors in the last 24 hours for
files that I am sure were never called from any script on my site. I do
not understand 'mod_rewrite: maximum number of internal redirects
reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects'
to increase the limit if neccessary. '

*MAIN error_log:*
------------------------------------------------------------ ------------
[Sat Sep 22 03:21:35 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/images/header.gif
[Sat Sep 22 03:21:38 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/images/cat_bullet.gif
[Sat Sep 22 03:21:38 2007] [error] [client 203.220.217.63] mod_rewrite:
maximum number of internal redirects reached. Assuming configuration
error. Use 'RewriteOptions MaxRedirects' to increase the limit if
neccessary.
[Sat Sep 22 03:21:38 2007] [error] [client 203.220.217.63] mod_rewrite:
maximum number of internal redirects reached. Assuming configuration
error. Use 'RewriteOptions MaxRedirects' to increase the limit if
neccessary.
[Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/images/back_pdf.jpg
[Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/panorama-pdf.jpg
[Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/panorama-sport.jpg
[Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/panorama-plus.jpg
[Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/unegruaja.jpg
[Sat Sep 22 03:21:43 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/reklama/panoramasport.jpg
[Sat Sep 22 03:21:43 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/reklama/economist.jpg
[Sat Sep 22 03:21:44 2007] [error] [client 203.220.217.63] mod_rewrite:
maximum number of internal redirects reached. Assuming configuration
error. Use 'RewriteOptions MaxRedirects' to increase the limit if
neccessary.
[Sat Sep 22 03:21:44 2007] [error] [client 203.220.217.63] mod_rewrite:
maximum number of internal redirects reached. Assuming configuration
error. Use 'RewriteOptions MaxRedirects' to increase the limit if
neccessary.

Does the above mean a segmentation fault as mentioned by Andres?

John

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

Re: Pages not fully loading

am 22.09.2007 12:19:44 von John Dillon

The problem occurs without session data in the page also. Buffering is
off on my php.ini file.

Language Options
output_buffering = Off

I have been told that the MAIN error_log below also shows errors for
other users on the server, so that does not help particularly.

John

ioannes wrote:
> Thanks to all who replied. There is a lot of undefined index and
> undefined variables when I turn on error reporting.
>
> The error logs show 'file not found' errors in the last 24 hours for
> files that I am sure were never called from any script on my site. I
> do not understand 'mod_rewrite: maximum number of internal redirects
> reached. Assuming configuration error. Use 'RewriteOptions
> MaxRedirects' to increase the limit if neccessary. '
>
> *MAIN error_log:*
> ------------------------------------------------------------ ------------
> [Sat Sep 22 03:21:35 2007] [error] [client 80.78.74.168] File does not
> exist: /usr/local/apache/htdocs/images/header.gif
> [Sat Sep 22 03:21:38 2007] [error] [client 80.78.74.168] File does not
> exist: /usr/local/apache/htdocs/images/cat_bullet.gif
> [Sat Sep 22 03:21:38 2007] [error] [client 203.220.217.63]
> mod_rewrite: maximum number of internal redirects reached. Assuming
> configuration error. Use 'RewriteOptions MaxRedirects' to increase the
> limit if neccessary.
> [Sat Sep 22 03:21:38 2007] [error] [client 203.220.217.63]
> mod_rewrite: maximum number of internal redirects reached. Assuming
> configuration error. Use 'RewriteOptions MaxRedirects' to increase the
> limit if neccessary.
> [Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
> exist: /usr/local/apache/htdocs/images/back_pdf.jpg
> [Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
> exist: /usr/local/apache/htdocs/panorama-pdf.jpg
> [Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
> exist: /usr/local/apache/htdocs/panorama-sport.jpg
> [Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
> exist: /usr/local/apache/htdocs/panorama-plus.jpg
> [Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
> exist: /usr/local/apache/htdocs/unegruaja.jpg
> [Sat Sep 22 03:21:43 2007] [error] [client 80.78.74.168] File does not
> exist: /usr/local/apache/htdocs/reklama/panoramasport.jpg
> [Sat Sep 22 03:21:43 2007] [error] [client 80.78.74.168] File does not
> exist: /usr/local/apache/htdocs/reklama/economist.jpg
> [Sat Sep 22 03:21:44 2007] [error] [client 203.220.217.63]
> mod_rewrite: maximum number of internal redirects reached. Assuming
> configuration error. Use 'RewriteOptions MaxRedirects' to increase the
> limit if neccessary.
> [Sat Sep 22 03:21:44 2007] [error] [client 203.220.217.63]
> mod_rewrite: maximum number of internal redirects reached. Assuming
> configuration error. Use 'RewriteOptions MaxRedirects' to increase the
> limit if neccessary.
>
> Does the above mean a segmentation fault as mentioned by Andres?
>
> John
>

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

RE: Pages not fully loading

am 22.09.2007 17:14:49 von Naintara

Perhaps a faulty mod_rewrite rule or pages/folder setup.
You'll need someone to look at your setup and mod_rewrite rules or if you
want to read up on it
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html


-----Original Message-----
From: ioannes [mailto:ioannes@btinternet.com]
Sent: Saturday, September 22, 2007 3:43 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Pages not fully loading

Thanks to all who replied. There is a lot of undefined index and
undefined variables when I turn on error reporting.

The error logs show 'file not found' errors in the last 24 hours for
files that I am sure were never called from any script on my site. I do
not understand 'mod_rewrite: maximum number of internal redirects
reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects'
to increase the limit if neccessary. '

*MAIN error_log:*
------------------------------------------------------------ ------------
[Sat Sep 22 03:21:35 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/images/header.gif
[Sat Sep 22 03:21:38 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/images/cat_bullet.gif
[Sat Sep 22 03:21:38 2007] [error] [client 203.220.217.63] mod_rewrite:
maximum number of internal redirects reached. Assuming configuration
error. Use 'RewriteOptions MaxRedirects' to increase the limit if
neccessary.
[Sat Sep 22 03:21:38 2007] [error] [client 203.220.217.63] mod_rewrite:
maximum number of internal redirects reached. Assuming configuration
error. Use 'RewriteOptions MaxRedirects' to increase the limit if
neccessary.
[Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/images/back_pdf.jpg
[Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/panorama-pdf.jpg
[Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/panorama-sport.jpg
[Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/panorama-plus.jpg
[Sat Sep 22 03:21:42 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/unegruaja.jpg
[Sat Sep 22 03:21:43 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/reklama/panoramasport.jpg
[Sat Sep 22 03:21:43 2007] [error] [client 80.78.74.168] File does not
exist: /usr/local/apache/htdocs/reklama/economist.jpg
[Sat Sep 22 03:21:44 2007] [error] [client 203.220.217.63] mod_rewrite:
maximum number of internal redirects reached. Assuming configuration
error. Use 'RewriteOptions MaxRedirects' to increase the limit if
neccessary.
[Sat Sep 22 03:21:44 2007] [error] [client 203.220.217.63] mod_rewrite:
maximum number of internal redirects reached. Assuming configuration
error. Use 'RewriteOptions MaxRedirects' to increase the limit if
neccessary.

Does the above mean a segmentation fault as mentioned by Andres?

John

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

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

Re: Pages not fully loading

am 22.09.2007 18:46:23 von John Dillon

I also get this in my error log, I am not sure what to do with this
(what side effect?):

PHP Warning: Unknown(): Your script possibly relies on a session
side-effect which existed until PHP 4.2.3. Please be advised that the
session extension does not consider global variables as a source of
data, unless register_globals is enabled. You can disable this
functionality and this warning by setting session.bug_compat_42 or
session.bug_compat_warn to off, respectively.

At the moment, I am observing that if I submit the enquiry form (method
post), I can get an incomplete page or page not found. If I refresh, I
get a blank page like this, which does not derive from the script (eg
body tag in actual script is topmargin="0" marginwidth="0" marginheight="0" bgcolor="#ffffff">):






refresh again gives page source to the previous stop point,

refresh again gives full page correctly.

However, my host support thinks my script was conflicting with fastCGI
on my account and have "

changed it back to the normal parser by adding a line to your .htaccess file, and your site is running again.
The line I added is
AddHandler application/x-httpd-php .php

.."

Unfortunately this is not quite working, I am still getting more pages
across the site loading progressively on each refresh, or showing page
not found and then loading fully or taking a long time to struggle
through the progress bar at the end of the browser screen.

John

>

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

Re: Pages not fully loading

am 24.09.2007 13:08:40 von John Dillon

Further testing shows that the script fails just before the mail() line,
though after a variable number of refreshes it goes through and
downloads all OK. Can anyone think why there should be this occasional
interaction between the mail() command line and the php script.

John

ioannes wrote:
> I also get this in my error log, I am not sure what to do with this
> (what side effect?):
>
> PHP Warning: Unknown(): Your script possibly relies on a session
> side-effect which existed until PHP 4.2.3. Please be advised that the
> session extension does not consider global variables as a source of
> data, unless register_globals is enabled. You can disable this
> functionality and this warning by setting session.bug_compat_42 or
> session.bug_compat_warn to off, respectively.
>
> At the moment, I am observing that if I submit the enquiry form
> (method post), I can get an incomplete page or page not found. If I
> refresh, I get a blank page like this, which does not derive from the
> script (eg body tag in actual script is > leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
> bgcolor="#ffffff">):
>
>
>
>
>
>
> refresh again gives page source to the previous stop point,
>
> refresh again gives full page correctly.
>
> However, my host support thinks my script was conflicting with fastCGI
> on my account and have "
>
> changed it back to the normal parser by adding a line to your
> .htaccess file, and your site is running again.
> The line I added is AddHandler application/x-httpd-php .php
>
> ."
>
> Unfortunately this is not quite working, I am still getting more
> pages across the site loading progressively on each refresh, or
> showing page not found and then loading fully or taking a long time to
> struggle through the progress bar at the end of the browser screen.
>
> John
>
>>
>

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

Re: Pages not fully loading

am 24.09.2007 19:12:18 von Niel Archer

> Further testing shows that the script fails just before the mail() line,
> though after a variable number of refreshes it goes through and
> downloads all OK. Can anyone think why there should be this occasional
> interaction between the mail() command line and the php script.

Without seeing the code, No!

--
Niel Archer

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

RE: Pages not fully loading

am 24.09.2007 19:23:32 von Instruct ICC

--_1d159c19-180f-484f-aeb4-33075fb638d8_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


> Date: Fri, 21 Sep 2007 23:42:40 +0100
> From: ioannes@btinternet.com
> I have tried putting print ("test line x") throughout the script, which=20
> just showed me it was failing sometimes before the mail function, but=20
> not always, sometimes in the middle of a loop to create a select box it=20
> just stopped rendering.
>=20
> john

How did it fail before the mail function?

Can you verify that the loop to create the select box always creates valid =
html?

____________________________________________________________ _____
Can you find the hidden words?=A0 Take a break and play Seekadoo!
http://club.live.com/seekadoo.aspx?icid=3Dseek_wlmailtextlin k=

--_1d159c19-180f-484f-aeb4-33075fb638d8_--

2 problems with phpmyadmin since upgrade

am 24.09.2007 19:40:28 von joe

I am having a problem since I upgraded my sql php and phpmyadmin. I was
running ver 3.23 sql and 4.+ of php and a really old version of phpmyadmin.

I am now running the following:
phpmyadmin ver. 2.7.0-pl2
Mysql Ver: MySQL 5.2.3-falcon-alpha
PHP Version 5.2.1
Apache/2.0.51 (Fedora Core 2)

Problems:
1. When I log on to my phpmyadmin screen i get an error message as follows:
The mbstring PHP extension was not found and you seem to be using a
multibyte charset. Without the mbstring extension phpMyAdmin is unable
to split strings correctly and it may result in unexpected results

2. When I try and browse a database table it will not allow me to do it.
The same with inserting a record.

When I choose a database and then click operations I get this error:
Error
The additional features for working with linked tables have been
deactivated. To find out why click here.

When i click it is another error that says:
PMA Database ... not OK[ Documentation ]
General relation features Disabled

Then it takes me to a doc page thats way over my head.

What is strange is that the actual php and sql seem to be fine. All my
programs are running and talking to the database, I just can't browse,
add or edit records through phpmyadmin which is a real pain.

Any help would be greatly appreciated. If someone can just fix it for me
please let me know a cost.

Thanks
Joe
joed@joed.com


-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GB/CM/CC/E/H/IT/MC/MU/P/SS d-@? s>+:>++ a+ C>++ UL$>++++ P+@>+ L$>+++ !E !W$>+++ !N !o !K-- w() !O !M !V PS@>+++ PE@>++ !Y !PGP t+++>$ 5>+++$ !X R@* tv? b++@>++ DI D@ G+@>+ e@> h--@>-- r+>$ y++++**>++++
------END GEEK CODE BLOCK------

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

Re: Pages not fully loading

am 24.09.2007 20:30:46 von John Dillon

--------------030108000604040308070901
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I am now pretty sure that it fails after the mail() function sends email
(since I receive the email) but before it reaches the next line of the
script. I might try something like 'mail(...) or die(...)' and see if
it prints out the die('') bit. But I am looking to find out why it
dies, something like the mysql_error($connection) - is there an
equivalent? Though it is behaving as if it said 'or die()' already
since it just stops.

Yes, the select box was valid html, though I cannot see how this might
be related to failing at or just after the mail line. The fact that on
several refreshes the page does appear properly suggests that it is not
a html problem.

And I am sure it is not my code as it fails similarly on three separate
pages in sort of different sections of the site which have worked for
yonks, I have also tried older versions of same. And it is a recent
phenomenon

Here is an extract, which I think points to nothing:

if($acceptable=="true") {
if($posreplies[0]<>"y"||is_null($posreplies[0])) {
$emsg=stripslashes($emsg);
//this prints ***********************************************
print("
line 1068 before reply email sent: to: $to, subj:
$subj, emsg: $emsg, from: $from");
$maccept= mail($to, $subj, $emsg, $from);
//this does not, until a variable number of refreshes, by
then the same number of emails are sent ***********
print("
after reply email sent");
$maccept= mail("ioannes@btinternet.com", $subj." - sent to
$to pos or neg replies", $emsg, $from);
print("
after my cc email sent");
if(ISSET($confirm_email)&&$confirm_email<>"") {
$emsg_conf=stripslashes($emsg_conf);
mail($co_email, $subj_conf, $emsg_conf, $from);
print("
after your cc email sent");
} //copy provider
} else {

John


> How did it fail before the mail function?
>
> Can you verify that the loop to create the select box always creates valid html?
>
> ____________________________________________________________ _____
> Can you find the hidden words? Take a break and play Seekadoo!
> http://club.live.com/seekadoo.aspx?icid=seek_wlmailtextlink
>

--------------030108000604040308070901--

Re: Pages not fully loading

am 25.09.2007 02:39:06 von dmagick

ioannes wrote:
> Further testing shows that the script fails just before the mail() line,
> though after a variable number of refreshes it goes through and
> downloads all OK. Can anyone think why there should be this occasional
> interaction between the mail() command line and the php script.

Check your error logs. Ask your host if they restrict the number of
emails you can send.

--
Postgresql & php tutorials
http://www.designmagick.com/

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

Re: Pages not fully loading

am 25.09.2007 10:04:36 von Oskar

ioannes napsal(a):
> There is a lot of undefined index and undefined variables when I turn
> on error reporting.
>
>
lol?

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

Re: Pages not fully loading

am 27.09.2007 23:06:42 von John Dillon

I am trying to solve this. My server support made this test script:

if (mail("bluehost@shortstay-london.com","test php mail()","test php
mail()","From: Bluehost Test "))
{
print "Working.";
}
else
{
print "Failed.";
}
?>

I tried this many time and had the following experience (it will be the
same for Firefox):

various delays occurred not specifically noted
page not found
refreshed - page not found
refreshed - page not found - noted pause in page returning
re-submit - 'working'
re-submit - 18 times - on 18th time blank page then page not found
automatically
refresh- 'working' on try 19
refresh, try 20, blank page, refreshes to page not found on IE
refresh 3 times - page not found each time
refresh another time - 'working'
refresh - blank page refreshes to page not found in IE
refresh - 'working'
refresh- blank page refreshes to page not found in IE
refresh twice - same - works first time then blank and refreshes to page
not found with message bar fleeting message about dnserror
page not found
'working' x 6 refreshes
then error, page not found, message bar about ieframe..dnserror.htm
pattern continues on refreshes...

dnserror.htm - is that a clue ?

What could this be?

John

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

Re: Pages not fully loading

am 28.09.2007 14:46:39 von John Dillon

It appears the dns message (including page not found and blank page) was
a symptom of trying the email test page too often resulting in more than
the allowed number of simultaneous processes (20 are allowed on the
shared server).

However, then I got a further solution:

The apache timeout on the server was set to 3 seconds, rather than the default 300. This was likely to combat a ddos attack from earlier, but never changed back to its default.
Basically, what was happening was when the mail() function was called, sometimes it was taking longer than 3 seconds to process, and since no data is sent to apache during that, it reaches it's timeout and stops.
We've changed this back to the default of 300 seconds (5 minutes) and now it isn't stopping output when it needs to send an email.

Thank you to all who took an interest in this.

John

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