[PHP] PHP 5.0.5 and PHP-XML problem

2006-11-10 Thread Edd Dawson

Hi

I have a problem getting PHP-XML working with PHP 5.0.5

I am trying to create an DOMDocument object with the following:

$doc = new DOMDocument();

when run i get the error:


*Fatal error*: Class 'DOMDocument' not found in *
/var/www/cinematimes.mobi/feed.php* on line *5

*I looked up that I need php-xml , so i try and install it on my Fedora 4
system by using yum or downloading rpm's and i always get the following
error:

Error: Missing Dependency: php = 5.0.4-10.5 is needed by package php-xml

So as it goes i can't find a version of php-xml i can install! Can anyone
help?

cheers
Edd


Re: [PHP] PHP 5.0.5 and PHP-XML problem

2006-11-10 Thread Jochem Maas
Edd Dawson wrote:
 Hi
 
 I have a problem getting PHP-XML working with PHP 5.0.5

I had trouble getting anything to work with that version ;-)
I suggest trying the version before or after it - seriously 5.0.5 has some
issues (although whether your problem is anything to do with them
is not known to me).

 
 I am trying to create an DOMDocument object with the following:
 
 $doc = new DOMDocument();
 
 when run i get the error:
 
 
 *Fatal error*: Class 'DOMDocument' not found in *
 /var/www/cinematimes.mobi/feed.php* on line *5
 
 *I looked up that I need php-xml , so i try and install it on my Fedora 4
 system by using yum or downloading rpm's and i always get the following
 error:
 
 Error: Missing Dependency: php = 5.0.4-10.5 is needed by package php-xml
 
 So as it goes i can't find a version of php-xml i can install! Can anyone
 help?
 
 cheers
 Edd
 

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



Re: [PHP] PHP 5.0.5

2005-11-22 Thread Ashley M. Kirchner

Curt Zirzow wrote:


On Mon, Nov 21, 2005 at 09:41:40PM -0700, Ashley M. Kirchner wrote:
 


ext/ftp/ftp.lo(.text+0x76): In function `data_close':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1566: undefined reference 
to `SSL_shutdown'
   



This means basically that the header files (*.h) where found but
none of the libraries were found.

   Yeah, I wondered why.  Found out that -lssl doesn't get passed down 
to EXTRA_LIBS when it get to compiling the CLI.  Once I added it to my 
configure line, everything compiled fine.


   ( EXTRA_LIBS=-lssl ./configure ... )

--
W | It's not a bug - it's an undocumented feature.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

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



[PHP] PHP 5.0.5

2005-11-21 Thread Ashley M. Kirchner


   Trying to compile APXS version of PHP5.05 and towards the end, when 
it tries to compile the CLI version, it bombs with the following:


ext/ftp/ftp.lo(.text+0x76): In function `data_close':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1566: undefined reference 
to `SSL_shutdown'
ext/ftp/ftp.lo(.text+0x96):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1557: 
undefined reference to `SSL_shutdown'

ext/ftp/ftp.lo(.text+0x15e): In function `ftp_close':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:184: undefined reference 
to `SSL_shutdown'

ext/ftp/ftp.lo(.text+0x22b): In function `my_send':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1246: undefined reference 
to `SSL_write'
ext/ftp/ftp.lo(.text+0x250):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1244: 
undefined reference to `SSL_write'

ext/ftp/ftp.lo(.text+0x415): In function `data_accept':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1511: undefined reference 
to `SSLv23_client_method'
ext/ftp/ftp.lo(.text+0x41e):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1511: 
undefined reference to `SSL_CTX_new'
ext/ftp/ftp.lo(.text+0x434):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1517: 
undefined reference to `SSL_new'
ext/ftp/ftp.lo(.text+0x451):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1525: 
undefined reference to `SSL_set_fd'
ext/ftp/ftp.lo(.text+0x470):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1531: 
undefined reference to `SSL_connect'
ext/ftp/ftp.lo(.text+0x534):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1528: 
undefined reference to `SSL_copy_session_id'
ext/ftp/ftp.lo(.text+0x589):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1520: 
undefined reference to `SSL_CTX_free'
ext/ftp/ftp.lo(.text+0x5ae):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1533: 
undefined reference to `SSL_shutdown'

ext/ftp/ftp.lo(.text+0x652): In function `my_recv':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1286: undefined reference 
to `SSL_read'
ext/ftp/ftp.lo(.text+0x686):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1284: 
undefined reference to `SSL_read'

ext/ftp/ftp.lo(.text+0x1bb1): In function `ftp_login':
/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:278: undefined reference 
to `SSLv23_client_method'
ext/ftp/ftp.lo(.text+0x1bba):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:278: 
undefined reference to `SSL_CTX_new'
ext/ftp/ftp.lo(.text+0x1bd0):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:284: 
undefined reference to `SSL_new'
ext/ftp/ftp.lo(.text+0x1bec):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:291: 
undefined reference to `SSL_set_fd'
ext/ftp/ftp.lo(.text+0x1bf8):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:293: 
undefined reference to `SSL_connect'
ext/ftp/ftp.lo(.text+0x1cdc):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:287: 
undefined reference to `SSL_CTX_free'
ext/ftp/ftp.lo(.text+0x1d01):/usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:295: 
undefined reference to `SSL_shutdown'

collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


   libphp5.so compiles just fine just before this bomb.  Any sugestions 
anyone?


--
R | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

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



Re: [PHP] PHP 5.0.5

2005-11-21 Thread Curt Zirzow
On Mon, Nov 21, 2005 at 09:41:40PM -0700, Ashley M. Kirchner wrote:
 
Trying to compile APXS version of PHP5.05 and towards the end, when 
 it tries to compile the CLI version, it bombs with the following:
 
 ext/ftp/ftp.lo(.text+0x76): In function `data_close':
 /usr/local/src/apache/php-5.0.5/ext/ftp/ftp.c:1566: undefined reference 
 to `SSL_shutdown'

This means basically that the header files (*.h) where found but
none of the libraries were found.

You're compile path looks awkward to me.

 
libphp5.so compiles just fine just before this bomb.  Any sugestions 
 anyone?

what does your ./configure line look like?


Curt.
-- 
cat .signature: No such file or directory

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



Re: [PHP] PHP 5.0.5

2005-11-21 Thread Ashley M. Kirchner

Curt Zirzow wrote:


You're compile path looks awkward to me.

   How so?  /usr/local/src/apache is simply a folder where I have all 
apache related sources dumped and compiled prior to installation.  So 
naturally PHP's source becomes /usr/local/src/apache/php-5.0.5



what does your ./configure line look like?
 


   This same configure line compiles PHP4.4.1 just fine.  It's long:

   ./configure --sysconfdir=/etc/httpd/conf --mandir=/usr/share/man 
--with-apxs --enable-force-cgi-redirect --enable-discard-path 
--enable-fastcgi --with-config-file-path=/etc/httpd/conf/ 
--enable-safe-mode --with-exec-dir=/etc/httpd/php --enable-magic-quotes 
--with-zlib=shared --enable-bcmath --with-bz2=shared --enable-calendar 
--with-bcmath=shared --with-calendar=shared --with-jpeg=shared 
--with-tiff=shared --enable-dba --with-dba=shared --with-gdbm=shared 
--with-db4=shared --with-dom=shared --with-dom-xslt=shared 
--with-dom-exslt=shared --enable-ftp --with-gd=shared --with-png=shared 
--with-freetype-dir --enable-gd-native-ttf --with-gettext=shared 
--with-gmp=shared --with-imap=shared --with-kerberos --with-imap-ssl 
--with-mcrypt=shared --with-mime-magic=/etc/httpd/conf/magic 
--with-mysql=/usr --with-ncurses=shared --with-zlib=shared 
--enable-sockets --with-tsrm-pthreads --with-ldap=shared 
--with-openssl=shared --with-mcal=shared


--
R | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

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



Re: [PHP] php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok

2005-10-25 Thread Petr Smith

I just found this is known bug and was already fixed in CVS.

http://bugs.php.net/bug.php?id=34450edit=2

thanks to all!

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



Re: [PHP] php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok

2005-10-21 Thread Jon Hill

I think this could be related to your _destruct method
Can't you just rely on the parent class destruct method?
Sorry to be a bit vague, I'll look into it a little further.

Jon

I've just installed php 5.0.5 to newest ubuntu breezy and apache2
started (sometimes) segfaulting (teste two computers with ubuntu hoary
and ubuntu breezy - same results).

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



Re: [PHP] php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok

2005-10-21 Thread Petr Smith

Hi,

thanks! that was it! when destruct method is removed, all problems are 
gone.


I really don't know why I added the __destruct method to this mysql 
wrapper. Maybe I saw it somewhere in discussion at php manual bottom


This code segfaults my apache:

?php

class test extends mysqli {
public function __construct() {
parent::__construct(localhost, root, , mysql);
}

public function __destruct() {
$this-close();
}
}

$obj = new test();

?

Accessing this page means immeadiate apacha segfault and actual 
connection close. Anybody please test this on 5.0.5 and verify if it's 
reproducible.


Petr


I think this could be related to your _destruct method
Can't you just rely on the parent class destruct method?
Sorry to be a bit vague, I'll look into it a little further.


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



Re: [PHP] php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok

2005-10-21 Thread Jon Hill


 Accessing this page means immeadiate apacha segfault and actual 
connection close. Anybody please test this on 5.0.5 and verify if it's 
reproducible.


I am running PHP 5.0.5 on Apache 2 and get the following in my error log 
if I include the destruct method.


Jon

*** glibc detected *** /usr/local/apache/bin/httpd: free(): invalid 
pointer: 0x09bdca78 ***

=== Backtrace: =
/lib/libc.so.6[0x2a1424]
/lib/libc.so.6(__libc_free+0x77)[0x2a195f]
/usr/local/apache/modules/libphp5.so(my_no_flags_free+0x16)[0x1284da6]
/usr/local/apache/modules/libphp5.so(vio_delete+0x29)[0x12a20a9]
/usr/local/apache/modules/libphp5.so(end_server+0x3a)[0x129e74a]
/usr/local/apache/modules/libphp5.so(cli_advanced_command+0x129)[0x129e569]
/usr/local/apache/modules/libphp5.so(mysql_close+0x4d)[0x12a079d]
/usr/local/apache/modules/libphp5.so[0x11573b3]
/usr/local/apache/modules/libphp5.so(zend_objects_store_call_destructors+0x45)[0x125f091]
/usr/local/apache/modules/libphp5.so(shutdown_destructors+0x51)[0x1241f15]
/usr/local/apache/modules/libphp5.so(zend_call_destructors+0x49)[0x124c8d9]
/usr/local/apache/modules/libphp5.so(php_request_shutdown+0x3fa)[0x121acd6]
/usr/local/apache/modules/libphp5.so[0x127d87e]
/usr/local/apache/bin/httpd(ap_run_handler+0x3a)[0x80b6a1a]
/usr/local/apache/bin/httpd(ap_invoke_handler+0x56)[0x80b6d92]
/usr/local/apache/bin/httpd(ap_process_request+0x141)[0x809e929]
/usr/local/apache/bin/httpd[0x809a36d]
/usr/local/apache/bin/httpd(ap_run_process_connection+0x3a)[0x80c04c2]
/usr/local/apache/bin/httpd[0x80b51ba]
/usr/local/apache/bin/httpd[0x80b53a3]
/usr/local/apache/bin/httpd[0x80b5436]
/usr/local/apache/bin/httpd(ap_mpm_run+0x7b4)[0x80b5bf8]
/usr/local/apache/bin/httpd(main+0x57f)[0x80baec7]
/lib/libc.so.6(__libc_start_main+0xc6)[0x252de6]
/usr/local/apache/bin/httpd(apr_dbm_get_usednames_ex+0xbd)[0x807bad1]
=== Memory map: 
[Fri Oct 21 16:00:59 2005] [notice] child pid 3808 exit signal Aborted (6)

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



[PHP] php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok

2005-10-20 Thread Petr Smith

Hi,

I've just installed php 5.0.5 to newest ubuntu breezy and apache2
started (sometimes) segfaulting (teste two computers with ubuntu hoary
and ubuntu breezy - same results).

Is says something like this:

[Thu Oct 20 12:32:21 2005] [notice] child pid 13161 exit signal
Segmentation fault (11)
[Thu Oct 20 12:32:21 2005] [notice] child pid 13191 exit signal
Segmentation fault (11)

Apache2 is breezy version Server version: Apache/2.0.54
Server built:   Oct  4 2005 07:42:46

It does this only in some applications (for example phpMyAdmin works ok)
 but PHP 5.0.4 worked ok. I tried to isolate some code which do the
segfaults but withou big success.

This code could be involved.. I don't know. It works sometimes,
sometimes not.


this line maybe?: parent::__construct($config['host'],
$config['username'], $config['password'], $config['db']);


class MySQL extends mysqli {
static function getInstance($configuration) {
static $dbObj = null;

if (is_null($dbObj)) {
$dbObj = new Mysql($configuration);
}
return $dbObj;
}

function __construct($configuration) {
$config = $configuration-getDbConfig();

try {
parent::__construct($config['host'], 
$config['username'],
$config['password'], $config['db']);
} catch (WarningException $we) {
if (mysqli_connect_error()){
throw new DBConnectException(mysqli_connect_error(),
mysqli_connect_errno());
}
}   
parent::query(SET NAMES 'utf8');
}

   function __destruct() {
@$this-close(); 
   }

function query($query) {
if (($result = parent::query($query)) != false) {
if (eregi(^select, $query)) {
return new QueryResult($result);
} else {
return new QueryResult(false, 
$this-affected_rows);
}
} else {
throw new SQLException($this-error, $this-errno, 
$query);
}
}

function getInsertId() {
return $this-insert_id;
}
}



I think this is some new bug in 5.0.5 version and I want to help to fix
it. But I don't know how. What should I do?

Thanks,

Petr

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