[PHP] Schroedinger's Bug - may require exorcism...

2005-11-29 Thread Adam Atlas
So... I have this script (being called in a perfectly typical way by  
PHP 4.4.1 through mod_php in Apache 2.0.55) which sometimes runs  
perfectly, and sometimes chooses, totally haphazardly, to seemingly  
run itself twice, which of course causes it to die with a fatal error  
after it tries to redefine some functions.


As mysterious as that is, it turns out it must be something  
altogether more sinister. I tried putting die() at the end of the  
script, on the assumption that it was for some reason executing  
twice, yet behold: the problem is still present, and the PHP error  
log still complains about constants and functions being redefined!  
The problem, I therefore thought, cannot be that the script is being  
run twice. (In retrospect, this was the most likely possibility,  
because the page doesn't actually output anything if it dies with  
this error.) So for debugging, I added a bit that logs one message to  
a file immediately before the die() at the end of the file, and a  
different message after the die(). The die() seems to be working  
normally, in that it only logs the first message...


But wait a second! WTF? If the PHP error log is to be believed, then  
the script should be dying with a fatal error before it even *gets*  
to that point in the script, isn't it?


And the greater WTF is the fact that, as I mentioned above, every  
time the page is requested, it unpredictably either does this or  
works flawlessly. Oh my. How do I even *begin* to debug something  
like this?


Thanks for any help.
-- Adam Atlas

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



[PHP] ASTemplate

2002-11-03 Thread Adam Atlas
First post!!! Um, yeah... anyway...

Hi people, I just got a beta of my ASTemplate code out. It's a PHP 
template system that uses an XML-based format to specify template 
format and text files (that can be HTML or any other text format) that 
make up the body of its output. If you're looking for a good template 
system for a PHP project, why don't you give ASTemplate a try? It's 
beta right now, so if you find any bugs, tell me and I'll try to fix it.

So, if you want to help me beta test it, or you think it might be 
useful (I wrote it for my own purposes, but now I'm releasing it in 
case others might find it useful) download it:
http://www.atommic.com/software/php/ASTemplate.tgz (GZipped tarball, 
for *nix and Mac- 11k)
http://www.atommic.com/software/php/ASTemplate.zip (ZIP archive, for 
Windows- 12k)

Currently it's distributed under the GNU GPL, but I might change it to 
the LGPL later so it can be more widely used. Anyway, I hope people 
enjoy ASTemplate!

--Adam Atlas


--
Adam Atlas

Your mouse has moved. Windows has to reboot for changes to take effect. 
[ OK ]


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



[PHP] Re: 4.2.3 compile problem on OSX

2002-11-04 Thread Adam Atlas
PHPmac (http://www.phpmac.com/) has some excellent articles on the 
subject. If all else fails, you can also grab a pre-compiled binary at 
http://www.entropy.ch/software/macosx/php/.

On Mon Nov 4, 2002  5:12:38  PM, Kristopher Yates wrote:

Hello,

I'm trying to compile PHP4.2.3 for Mac OSX 10.2 (Jaguar).  Has anyone 
else had this problem (see below)?


./configure --with-apxs=/usr/sbin/apxs
make

ld: multiple definitions of symbol _virtual_stat
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_stat 
in sectio
n (__TEXT,__text)
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_stat 
in sectio
n (__TEXT,__text)
ld: multiple definitions of symbol _virtual_unlink
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of 
_virtual_unlink in sect
ion (__TEXT,__text)
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of 
_virtual_unlink in sect
ion (__TEXT,__text)
ld: multiple definitions of symbol _virtual_utime
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of 
_virtual_utime in secti
on (__TEXT,__text)
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of 
_virtual_utime in secti
on (__TEXT,__text)
/usr/bin/libtool: internal link edit command failed
make[1]: *** [libphp4.la] Error 1
make: *** [all-recursive] Error 1

Forgive my ignorance but HUH?  WTF?

I have done this countless times on i386 boxes under RedHat and 
FreeBSD.
Unfortunately, I have never encountered this problem before.

Just FYI, before attempting to compile/install PHP, I successfully 
compiled/installed Apache 1.3.27,
which seems to work as expected.  I also upgraded to the latest Apple 
Developers Kit, and related update
patches.

Any ideas?

Thanks,

Kris

--
Adam Atlas

640K of computer memory ought to be enough for anybody. - Bill Gates, 
1981

(2001: What? Did I say 640K? I meant 640MB.)


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



[PHP] YATS on OS X

2002-11-29 Thread Adam Atlas
I'm trying to compile the YATS template system for PHP on Mac OS X. It 
compiles without problems (one warning actually, but that's not the 
problem I'm having), but it gives me a static library as an archive 
file, instead of a shared library which I can install into my PHP 
installation. I'm not a porting expert at all. Does anyone know how I 
should do this?

My configuration:
PHP 4.3 RC2, compiled from source
Apache httpd 1.3.27, compiled from source
Mac OS X 10.2.2

Thanks,
Adam Atlas


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



[PHP] Call to undefined function: mysql_foo()...

2002-12-01 Thread Adam Atlas
I'm having a strange problem. If I run any MySQL function, I get the 
error message Call to undefined function: mysql_foo(). Why would I be 
getting this? I've checked php.ini to see if it has the 
extension=mysql.so line, and I've run a phpinfo() script which says PHP 
was compiled with MySQL and it does have a MySQL section. The strangest 
part is that I have a perfectly functional phpBB installation using a 
MySQL database. Am I missing something obvious?

--
Adam Atlas

During my service in the United States Congress, I took the initiative 
in creating the Internet. - Al Gore, March 9, 1999: On CNN's Late 
Edition


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