harvest.php error
We are trying to implement SOPAC at the University of Dayton. we are currently using Millennium (WebpacPro).
We seem to have hit a few snags however in the php harvest.php script.
We're getting "errors" that basically say
PHP Notice: Use of undefined constant ils_harvest_port - assumed 'ils_harvest_port' in /usr/local/lib/locum/connectors/locum_iii_2006/locum_iii_2006.php on line 39
We tried hard coding the lines that it was complaining about to look like this ...
//$iii_webcat = $this->locum_config[ils_config][ils_server];
$iii_webcat = ' flyers.udayton.edu ';
//$iii_webcat_port = $this->locum_config[ils_config][ils_harvest_port];
$iii_webcat_port = 2082;
So, now when we run the harvest.php script ... we get the following ...
PHP Notice: Use of undefined constant skipped - assumed 'skipped' in /usr/local/lib/locum/locum-server.php on line 88
and the script continues to run this way.
I don't know if this is particular to the flavor of linux and php we're running or not, but we're trying to run this on a SUSE Enterprise Linux 10 (Service pack 2) with php 5.2.5 running with apache 2.2.3
Don't know if this is something you've encountered before, or have had another question about such a thing? It seems that the installation thus far had gone just fine. Everything installed as outlined in the directions.
Thanks for your help,
Shefali.



Just to verify, are you running Millennium 2006?
ils_harvest_port is typically defined in the locum config file. Have you verified that the script can read it (permissions, etc)?
Also, you might want to grab the latest locum code from subversion and see if it makes a difference.
Yes, we are running Millennium 2006. The script has read permissions to the locum config file.
We tried running the latest locum code from subversion and got a new set of errors:
PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /usr/local/lib/locum/locum-server.php on line 57
PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /usr/local/lib/locum/locum-server.php on line 171
PHP Warning: parse_ini_file(config/locum.ini): failed to open stream: No such file or directory in /usr/local/etc/locum.php on line 33
PHP Notice: Use of undefined constant locum_config - assumed 'locum_config' in /usr/local/etc/locum.php on line 37
PHP Notice: Use of undefined constant dsn_file - assumed 'dsn_file' in /usr/local/etc/locum.php on line 37
PHP Notice: Undefined index: locum_config in /usr/local/etc/locum.php on line 37
PHP Fatal error: locum::require(): Failed opening required '' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /usr/local/etc/locum.php on line 37
Sid is correct. You can ignore the warning--and I've got a fix pending that will eliminate it.
But in this case, locum is looking for the DSN file--that's the little file that should contain something like:
<?php
$dsn = 'mysql://scasuser:scaspassword@localhost/scas';
?>
Look in your configuration file and see where expects is to be. The line looks like:
dsn_file = "/usr/local/etc/locum.php"
So far as I can see, everything you are reporting in your initial message is a warning which should not be interfering with the actual running of SOPAC.
The "Use of undefined constant" warnings occur because there are numerous places where the keys to associative arrays are not in quotes. For example, if you write $arrayName[key] instead of $arrayName['key'], PHP will throw the warning. However, PHP is smart enough to figure out that an undefined constant used that way should be treated as though it were a string. Thus the two expressions above will have the same effect, except that the first one will result in a warning.
The "Call-time pass-by-reference has been deprecated" warning occurs because there are &'s in function calls whereas they should be in function declarations. Although this may prove a problem in future, it currently just results in warnings which should not interfere with the actual running of SOPAC.
The bigger issue I see is the warnings and errors related to not being able to find files. This sounds like something is not correct in your configuration. However, this is not an area about which I have enough expertise to be able to help. Hopefully, somebody else can chime in on this.