OK, after three days of increasingly frustrating tinkering with configs, logs,
permissions, compiling, recompiling of mysql, apache, php, and a lot
of permutations and combinations of flags, options, settings and what have
you, I finally found the cause of the problem as described in my posting.

To the possible benefit of others I will post that solution here now.

It appears that all the time, since php-4.3.7, I had it compiled with
a configure flag of '--enable-embedded-mysqli', and PHP5 was also compiled
with that flag.

So today I (again) recompiled PHP5 without that flag.

Before that I had also recompiled Apache and this time enabled the standard
'prefork' model instead of the 'worker' model that I had had before, because
I seemed to run across a report somewhere that mysqli had problems working
with a 'worker' Apache.

Well that didn't seem to solve my problems, much as I had hoped.  Instead,
now it all seemed to work even less.  Apache now seemed to pass through the
*.php files  just like that (Mozilla then didn't know what to do with them).
Still some very basic *.php scripts still worked (not those calling any
mysqli functions), but another very basic one, that just called phpinfo()
didn't.
This was astonishing, and seemed to lack every rationale.  It was just very
erratic behaviour from Apache / PHP now, some very basic php scripts worked
-- some just as basic didn't.  Anything with with mysqli calls didn't work.
I was about to give up.

Then I did that recompile of PHP without the '--enable-embedded-mysqli'.
That didn't seem to make much of a difference, although now I could run the
command-line php on the mysqli.php script while the mysqld server was running
and it worked.  Hmm, something started working.  But still anything from
Mozilla displayed the same erratic behaviour as before.  Killing, starting
restarting Apache, it remained erratic, and even erratic in its erreticism...

Then it occured to me, might it help flushing Mozilla's cache?  So I flushed
the cache, and ... well, it all started working.

To me the biggest morale to this story is, if you're testing PHP and/or php
scripts, ALWAYS FLUSH THAT BROWSER CACHE  (or setting it to 0 should work I
guess). (Pardon my shouting but I think it's in order here).

Right now I've reinstated the strict permissions on mysql's datadir and
databases, which I had opened up in the belief that that would work.

Alive and kicking -- End of story.

BJ

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

Reply via email to