Call to undefined function: import_request_variables

Support and queries relating to all previous versions of ZoneMinder
Locked
mundscha
Posts: 1
Joined: Mon Oct 13, 2003 5:55 pm

Call to undefined function: import_request_variables

Post by mundscha »

Just got done installing, but get this error when trying to get to zm.php. Done with a clean RH7.2 install. Any ideas?
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Call to undefined function: import_request_variables

Post by zoneminder »

Hi Joe,

The import_request_variables function is a PHP function added in PHP 4.1. It sounds like you have an earlier version so you can either install a later version or provided you have register_globals set to on in your php.ini file I think you can just delete (or comment out) this call.

Regards,

Phil,
wmoore
Posts: 43
Joined: Mon Mar 29, 2004 2:25 am

Re: Call to undefined function: import_request_variables

Post by wmoore »

I am having precisely the same issue as above, but when I comment the “import_request” line in zm.php, it only leads to a similar issue in zm_db.php.

Warning: Undefined variable: bandwidth in /home/.sites/28/site1/web/zone/zm_html.php on line 21
Fatal error: Call to undefined function: mysql_pconnect() in /home/.sites/28/site1/web/zone/zm_db.php on line 21

I have verified that php.ini has register_globals = yes. Are there other tweeks to this file I should look at?

Following the advice to upgrade PHP instead is scary to me as I am running a cobalt box, and I am afraid of causing an issue with the systems management interface that depends on the version of PHP this is installed.

I am brand new to this app, and just need a nudge in the right direction to get it going. Any thoughts?

-WAM
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Call to undefined function: import_request_variables

Post by zoneminder »

Hi William,

A couple of things spring to mind here. Firstly I notice you are getting udnefined variable warnings. These would not normally get output, as there are a few places where they are unavoidable. Did you explicitly switch them on, which is fine in the circumstances of trying to find problems, or does you site have them on all the time? If it's the latter you should edit the error_reporting line in zm.php to switch off 'notice' messages by including this line

<i>error_reporting (E_ALL ^ E_NOTICE);</i>

Secondly I notice that mysql_pconnect does not appear to be defined. This may be because some older installations did not have it, in which case you would have to edit zm_db.php to use mysql_connect instead, see <a href="http://uk.php.net/function.mysql-pconnect">here</a> for details of these functions. Alternatively, and perhaps more likely, it may be that your php is not built with mysql support. To test this create a simple script called maybe debug.php and include the following

<i><?php

phpinfo();

?></i>

Then access that and look for references to mysql. If it's built with mysql shared then you may be able to just install the module otherwise you will probably have to build a new php.

Phil,
Locked