Hello! I decided to move my Perl-based 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 vanishes.
So AFAIU the problem is that Perl script can’t ‘require’ file from indicated directory. How do I fix this? I’d like to find solution that don’t demand to edit scripts.
P.S. ‘Hello world’ perl script works perfectly.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Yes, I did is as I mentioned in first message. But I see other errors appearing, and these errors are also about paths. Perl don’t understand that it must get the file placed relatively the script, it searches only in @INC-defined directories.
No, I mean replace <pre>$sourcedir = “./Sources”;</pre> with <pre>$sourcedir = “/var/www/cgi-bin/Sources”;</pre>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.