PHP Issue?

Support and queries relating to all previous versions of ZoneMinder
Locked
Lee
Posts: 2
Joined: Sun Jun 06, 2004 5:40 am
Location: New Zealand

PHP Issue?

Post by Lee »

Hi all,

This is my first post, and I'm very much a beginner with Linux, so please be gentle on me :)
I'm sure someone will probably identify what this issue is, though I've been trying for days to sort it now and I hope someone will be willing to help out.

Ok, here's the detail:

- RedHat Linux 9
- Apache 2 (works at local host and displays intro page at a networked machine when firewall is disabled)
- PHP 4.3.7 installed (though not sure how to confirm this is working correctly)
- MCPAN seems to be working I think. I was having problems saying it wasn't found (when trying to run 'perl zmconfig.pl', though after an up2date and an upgrade of Apache it appears not to be a problem now.
- MySQL 4.0.20 - seems to be working
- zm service starts {OK]
- Video Card - Some kind of BT878 4 Port Card (seems to be working albeit not in colour (not sure why yet) under xawtv - see config below).

[root@rh9 /usr/bin]$ zmu --device 0 -q -v
Video Capabilities
Name: BT878( *** UNKNOWN/GENERIC **)
Type: 235
Can capture
Can tune
Overlay onto frame buffer
Can clip
Uses the frame buffer memory
Scalable
Video Channels: 4
Audio Channels: 1
Maximum Width: 640
Maximum Height: 576
Minimum Width: 48
Minimum Height: 32
Window Attributes
X Offset: 14
Y Offset: 68
Width: 384
Height: 288
Picture Atributes
Palette: 5 - 32bit RGB
Colour Depth: 32
Brightness: 32505
Hue: 32768
Colour :40367
Contrast: 15722
Whiteness: 0
Channel 0 Attributes
Name: Television
Channel: 0
Flags: 3
Channel has a tuner
Channel has audio
Type: 1 - TV
Format: 3 - AUTO
Channel 1 Attributes
Name: Composite1
Channel: 1
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 3 - AUTO
Channel 2 Attributes
Name: S-Video
Channel: 2
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 3 - AUTO
Channel 3 Attributes
Name: Composite3
Channel: 3
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 3 - AUTO

And here's the symptoms for example when I load zm.php into Mozilla Browser, I get a blank page, and when I load any other page I get an apparently scrambled mess such as this when loading file:///var/www/zm_config.php

array( 'w'=>720, 'h'=>540 ), 'state' => array( 'w'=>300, 'h'=>120 ), 'version' => array( 'w'=>320, 'h'=>140 ), 'cycle' => array( 'w'=>16, 'h'=>32 ), 'montage' => array( 'w'=>20, 'h'=>20 ), 'monitor' => array( 'w'=>360, 'h'=>300 ), 'watch' => array( 'w'=>72, 'h'=>342 ), 'device' => array( 'w'=>196, 'h'=>164 ), 'function' => array( 'w'=>248, 'h'=>92 ), 'events' => array( 'w'=>720, 'h'=>480 ), 'event' => array( 'w'=>72, 'h'=>168 ), 'filter' => array( 'w'=>560, 'h'=>250 ), 'filtersave' => array( 'w'=>560, 'h'=>220 ), 'zones' => array( 'w'=>72, 'h'=>232 ), 'zone' => array( 'w'=>360, 'h'=>500 ), 'video' => array( 'w'=>100, 'h'=>80 ), 'image' => array( 'w'=>48, 'h'=>80 ), 'frames' => array( 'w'=>500, 'h'=>300 ), 'stats' => array( 'w'=>680, 'h'=>200 ), 'options' => array( 'w'=>760, 'h'=>480 ), 'optionhelp' => array( 'w'=>320, 'h'=>240 ), 'restarting' => array( 'w'=>250, 'h'=>150 ), 'user' => array( 'w'=>230, 'h'=>340 ), 'settings' => array( 'w'=>200, 'h'=>225 ), 'logout' => array( 'w'=>200, 'h'=>100 ), 'bandwidth' => array( 'w'=>200, 'h'=>90 ), ); ?>

I hope I've covered off enough detail, but if I've missed anything obvious that I need to tell you about please say. I'll try to provide it but you might need to tell me how. I did find a forum message saying that someone had a similar problem (in that they got a blank page when loading zm.php, but didn't mention anything about lots of text as above (see http://www.zoneminder.com/forums/viewtopic.php?t=3359) - the fix for them seemed to be "configuring httpd.conf to tell it where the zm files were" - but I have had no luck in searching the documentation as to what to enter into httpd.conf)

Thanks in advance...

Lee
User avatar
davide
Posts: 78
Joined: Mon Mar 22, 2004 1:04 am
Location: Italy

Post by davide »

it might be php not installed or properly configured on your system.

as root do this:

Code: Select all

cd /var/www/html/
vi test.php
it will open the vi editor
type "INS" then

Code: Select all

<?php phpinfo(); ?>
now press ESC, then :wq ENTER
now try to load the file you created from your local browser
"http://127.0.0.1/test.php"
you should get a full report on your php installation
if you do not i think that's the cause of your problem
Lee
Posts: 2
Joined: Sun Jun 06, 2004 5:40 am
Location: New Zealand

Result of test.php

Post by Lee »

Thanks David,

That test produced a blank page, so it would seem according to your conclusion that PHP would be the problem. I'll try a re-install and check the config tomorrow and post the results back here so anyone that experiences this problem can benefit.
aot2002
Posts: 73
Joined: Mon Apr 26, 2004 7:10 am

Post by aot2002 »

click view source in the browser and see what is written to the page ?
if you see php code in the webpage then go here

http://www.experts-exchange.com/Web/Web ... chType=all

or here

http://www.experts-exchange.com/Web/Web ... chType=all


sounds like php is not configured properly though
jay
marcoleo
Posts: 5
Joined: Fri Jun 11, 2004 5:39 pm
Location: Italy

Post by marcoleo »

dear lee,

I'd similar problem, installed proper modules but nothing work 'till I've add those two istance in httpd.conf, hoping it help you:

# PHP 3.x:
#
<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
AddType application/x-httpd-php3 .phtml
</IfModule>

#
# PHP 4.x:
#
<IfModule mod_php4.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php4
AddType application/x-httpd-php-source .phps
</IfModule>
Locked