error

Support and queries relating to all previous versions of ZoneMinder
Locked
ilababy
Posts: 53
Joined: Mon Apr 17, 2006 10:07 pm

error

Post by ilababy »

Hello, i have installed zm 1.21.3-4 on my Debian Sarge, but when i call localhost i have this error:
Fatal error: Call to undefined function mysql_pconnect() in /var/www/zm/zm_db.php on line 21

This is my /var/www/zm_db.php file:
<?php
//
// ZoneMinder web database interface file, $Date: 2005/03/13 20:41:06 $, $Revision: 1.7 $
// Copyright (C) 2003, 2004, 2005 Philip Coombes
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//

$conn = mysql_pconnect( ZM_DB_SERVER, ZM_DB_USER, ZM_DB_PASS ) or die("Could not connect to database: ".mysql_error());
mysql_select_db( ZM_DB_NAME, $conn) or die("Could not select database: ".mysql_error());

function simpleQuery( $sql )
{
global $debug;

if ( $debug )
{
echo "SQL:$sql<br>\n";
}
$result = mysql_query( $sql );
if ( !$result )
die( mysql_error() );
return( $result );
}

function getEnumValues( $table, $column )
{
$enum_values = array();
$result = mysql_query( "DESCRIBE $table $column" );
if ( $result )
{
$row = mysql_fetch_assoc($result);
preg_match_all( "/'([^']+)'/", $row['Type'], $enum_matches );
$enum_values = $enum_matches[1];
}
else
{
echo mysql_error();
}
return $enum_values;
}

function getSetValues( $table, $column )
{
return( getEnumValues( $table, $column ) );
}

function getUniqueValues( $table, $column, $as_string=1 )
{
$values = array();
$result = mysql_query( "SELECT DISTINCT $column FROM $table WHERE (NOT ISNULL($column) AND $column != '') ORDER BY $column" );
if ( $result )
{
while ( $row = mysql_fetch_array($result) )
{
if ( $as_string )
$values[$row[0]] = $row[0];
else
$values = $row[0];
}
}
else
{
echo mysql_error();
}
return( $values );
}

function getTableColumns( $table, $as_string=1 )
{
$columns = array();
$result = mysql_query( "DESCRIBE $table" );
if ( $result )
{
while( $row = mysql_fetch_assoc($result) )
{
if ( $as_string )
$columns[$row[Field]] = $row[Type];
else
$columns[] = $row[Type];
}
}
else
{
echo mysql_error();
}
return( $columns );
}
?>
Where is the problem?
Thanks.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Do you have the php-mysql packages installed?
Phil
ilababy
Posts: 53
Joined: Mon Apr 17, 2006 10:07 pm

Post by ilababy »

Thanks, iresolved all but i not see the immages but have error video/mpeg plugin.
Can you help me?
Thanks.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Yes we can help but you'll need to elaborate on your error.
Don't forget to search the forum as there are allot of solutions here as well and might help you get it resolved a bit faster.

Regards,
Corey
ilababy
Posts: 53
Joined: Mon Apr 17, 2006 10:07 pm

Post by ilababy »

This is my logs:
ilario@debian:~$ tail -f /var/log/zm/zmdc.log
zmc -d 0' starting at 06/04/22 22:30:57, pid = 5453
'zmc -d 0' crashed at 06/04/22 22:30:57, exit status 255
Starting pending process, zmc -d 0
'zmc -d 0' started at 06/04/22 22:33:37
'zmc -d 0' starting at 06/04/22 22:33:37, pid = 5466
'zmc -d 0' crashed at 06/04/22 22:33:37, exit status 255
Starting pending process, zmc -d 0
'zmc -d 0' started at 06/04/22 22:38:57
'zmc -d 0' starting at 06/04/22 22:38:57, pid = 5490
'zmc -d 0' crashed at 06/04/22 22:38:57, exit status 255


ilario@debian:~$ tail -f /var/log/zm/zmwatch.log
Can't get shared memory id '2053971969': No such file or directory
Can't get shared memory id '2053971969': No such file or directory
Can't get shared memory id '2053971969': No such file or directory
Can't get shared memory id '2053971969': No such file or directory
Can't get shared memory id '2053971969': No such file or directory
Can't get shared memory id '2053971969': No such file or directory
Can't get shared memory id '2053971969': No such file or directory
Can't get shared memory id '2053971969': No such file or directory
Can't get shared memory id '2053971969': No such file or directory
Can't get shared memory id '2053971969': No such file or directory

ilario@debian:~$ tail -f /var/log/messages
Apr 22 22:28:21 debian zmc_d0[5406]: INF [Debug Level = 0, Debug Log = <none>]
Apr 22 22:28:22 debian zmc_d0[5417]: INF [Debug Level = 0, Debug Log = <none>]
Apr 22 22:28:22 debian zmc_d0[5419]: INF [Debug Level = 0, Debug Log = <none>]
Apr 22 22:28:27 debian zmc_d0[5441]: INF [Debug Level = 0, Debug Log = <none>]
Apr 22 22:28:37 debian zmc_d0[5447]: INF [Debug Level = 0, Debug Log = <none>]
Apr 22 22:28:57 debian zmc_d0[5449]: INF [Debug Level = 0, Debug Log = <none>]
Apr 22 22:29:37 debian zmc_d0[5451]: INF [Debug Level = 0, Debug Log = <none>]
Apr 22 22:30:57 debian zmc_d0[5453]: INF [Debug Level = 0, Debug Log = <none>]
Apr 22 22:33:37 debian zmc_d0[5466]: INF [Debug Level = 0, Debug Log = <none>]
Apr 22 22:38:57 debian zmc_d0[5490]: INF [Debug Level = 0, Debug Log = <none>]

Wiyh xawtv the images from my usb webcam is ok.

Thanks.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Okay, I need to know abit more...
What kinda setup do you have (web cam, card and cam, netcam, etc...) you mentioned a web cam but please be more spacific.

Try running zmu -m 0 -q and past the results here. Do the same with dmesg |grep bttv

Regards,
Corey
ilababy
Posts: 53
Joined: Mon Apr 17, 2006 10:07 pm

Post by ilababy »

I tryed with spycam trust usb camera.

ilario@debian:~$ zmu -U admin -P admin -q -d/dev/video0 -v
Video Capabilities
Name: STV0680
Type: 1
Can capture
Video Channels: 1
Audio Channels: 0
Maximum Width: 352
Maximum Height: 288
Minimum Width: 176
Minimum Height: 144
Window Attributes
X Offset: 0
Y Offset: 0
Width: 352
Height: 288
Picture Attributes
Palette: 4 - 24bit RGB
Colour Depth: 24
Brightness: 32767
Hue: 32767
Colour :32767
Contrast: 32767
Whiteness: 0
Channel 0 Attributes
Name: STV Camera
Channel: 0
Flags: 0
Type: 2 - Camera
Format: 0 - PAL
Locked