Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'not an ARRAY reference' ERROR

Status
Not open for further replies.

miekgln

Programmer
May 27, 2005
7
GB
after making changes to a perl module file for a web application i have recently stated working with and restarting the web server i was receiving internal server errors on the site. after restoring the original file and making sure permissions were correct this did not stop.

i've checked the error log for the server and found an error message stating not an ARRAY reference at XML/DOM perl module line 918

i have no idea why this has occurred as i only made changes to 1 file and i have removed the altered file and replaced it with the original backup copy

any ideas as to where i can look / what i can do to try and solve this?

thanks
mike
 
there is also an error message in the log stating script not found or unable to stat cgi-bin/images. there is and has never been a file or directory of that name?!!
 
Maybe it is a path inside the script that you call that searches this dir, or a directive into httpd.conf.
Post your code. and any changes you did to the httpd.conf file.


``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
some modules change other modules, you may have to reinstall perl if you are unable to determine exactly where the error is coming from.
 
Whoa whoa... reinstall perl, change httpd.conf.... hold up. Let's start simple.

This is usually caused by something like $foo->[0] when it should be $foo[0]. Or even something like: for ( @$foo ) { ... } when $foo is not an array ref. Or, a bit more subtle, using @$foo when $foo is dead empty when you might be expecting it to be autovivified as an arrayref.

--
Andy
"Historically speaking, the presence of wheels in Unix has never precluded their reinvention." -- Larry Wall
 
naChoZ in his other post you asked if he restarted the server, (we all asumed he did).

miekgln post the code you add in the module, and the perl script that uses this module.

You said in your other post that you didn't make any changes in your httpd.conf file or other conf file. Are you sure ?
Even a small change can cause problems with mod_perl

By the way which version of apache and mod_perl and perl are you using ?

Why would you want to add something in the module, couldn't you make it work from inside your script, or write a small module just for this function of yours, using the XML-DOM module?

Understand how a module works is one think, but changing it is another...You should mess around with 'em.

So i suggest to unistall the module and reinstall it again, after you download the module again.
Restart your apache of better restart the pc.
If the problem still occurs then post the changes you made to the module, and the script that uses it.


``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
We have been trying find out whta the problem is and it looks like teh problem may not be due to the file i had changed as the orignals have all been restored and the problem is still occuring.
the xml/dom error is happening when xml content for pages is being read from the database. ive have even checked to see what has been changed on the server in the past 2 weeks.
i am begining to thing that the problem may lie in our database
thanks for the help
 
perhaps it is a data issue. Perhaps you are reading some data into an array that you are later doing operation on, but now, for one reason or another, the array is coming up empty (like, say, a SELECT is returning no rows), and you are trying to do an operation on the array that is actually NULL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top