Page Index Toggle Pages: 1
Topic Tools
Normal Topic Script can't 'require' file from directory (Read 2,495 times)
Elfen
Full Member
***
Offline



Posts: 450
Re: Script can't 'require' file from directory
Reply #1 - Jan 10th, 2014 at 10:34pm
Post Tools
Change back the changes you may have and look into the file Paths.pl

Check the file and make the changes there; replace './' with your directory information.

Also check your board URLs in the Paths.pl file.
  
Back to top
 
IP Logged
 
MaxPower3000
YaBB Newcomer
*
Offline



Posts: 43
Script can't 'require' file from directory
Jan 4th, 2014 at 8:50am
Post Tools
Hello! I decided to move my YaBB forum from my current $45 VPS to $5 Digital Ocean VPS. I managed to install PHP, MySQL and Perl on Ubuntu. I tried to copy the forum to the new location, but got '500 error'. Then I tried to make fresh install and get the following error:

Software error:
Can't locate ./Sources/Subs.pl in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl . /etc/apache2 ./Modules) at /var/www/cgi-bin/Setup.pl line 70.

and if I go to

require "$sourcedir/Subs.pl";

and change it to

require "/var/www/cgi-bin/Sources/Subs.pl";

error changes to

Can't locate ./Sources/System.pl in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl . /etc/apache2 ./Modules) at /var/www/cgi-bin/Setup.pl line 71.

So AFAIU the problem is that Perl script can't 'require' file from indicated directory. How do I fix this? I read about FindBin, but I'd like the script to work out of the box.

P.S. 'Hello world' perl script works perfectly.
  

Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top