Installation problems – path problems with require_once
-
Salaam,
I was initially having problems using this plugin a few months back I eventually partially got it working, the monthly timetable was working but not the daily versions but didn’t get chance to explore further at the time, but what was working looked good so I left it.
Recently I noticed the plugin had been updated so I though I would try again by trying to Update the plugin from within the admin section to 4.2.7, and the whole website stopped loading including WordPress admin pages. I was getting the following error :
—
Plugin could not be activated because it triggered a fatal error.
Warning: require_once(__DIR__/../Views/DailyTimetablePrinter.php) [function.require-once]: failed to open stream: No such file or directory in /home/rajfoodc/public_html/swafia.org.uk/wp/wp-content/plugins/daily-prayer-time-for-mosques/Models/DailyTimeTable.php on line 3Fatal error: require_once() [function.require]: Failed opening required ‘__DIR__/../Views/DailyTimetablePrinter.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/rajfoodc/public_html/swafia.org.uk/wp/wp-content/plugins/daily-prayer-time-for-mosques/Models/DailyTimeTable.php on line 3
—-
To get the website working I used a cpanel login to delete the directory for this plugin. And installed the plugin from ZIP file.This was similar to the problem I had last time. At that time I had gone back to an earlier version of WordPress the problem remained. The error seemed to indicate some sort of PATHS problem so I downloaded the relevant file and changed the
require_oncestatements from using the relative paths [__DIR__.] to absolute paths on the server [eg (‘/home/rajfoodc/public_html/swafia.org.uk/wp/wp-content/plugins/daily-prayer-time-for-mosques/Views/DailyTimetablePrinter.php’)].Reuploading the changed file allowed the installation to proceed to the next stage with the next require_once error on the next file. I ended up changing about 5 files to use absolute path instead of relative one. Eventually the installation completed OK I could use the Daily Prayer Time plugin admin section to upload a CSV file. After a couple more changes the shortcodes for ‘Monthly’ views worked OK. But using the short codes for ‘Daily’ views threw up a new error something like :
—
Fatal error: Call to undefined function lcfirst() in /home/rajfoodc/public_html/swafia.org.uk/wp/wp-content/plugins/daily-prayer-time-for-mosques/Views/TimetablePrinter.php on line 241
—-As this seemed to require a lot better understanding than my guess work I left it.
After installing 4.2.7 of the plugin I went through similar steps. But this time after uploading the CSV file I am getting a new error when refreshing the previously working page showing the monthly timetable I get a pop up box with the following error
—
swafia.org.uk says{“readyState”:4,”responseText”:””,”status”:500,”statusText”:”Internal Server Error”}
—-
Checked in Opera and Edge on Windows and Chrome on Android.I have no idea what this might mean or what can be done to resolve it.
So ideally if you can help us to work out the initial path problems that would be great and I’m hoping everything else will work automatically after that. I would like to use a Daily view on the home page.
I had initially thought maybe the PHP version is too old but I think it should be OK with those commands. Perhaps I need to configure some thing on the server to make the paths work ? I’m guessing its probably something straight forward, hoping you will be able help us out so I can get a great looking and useful plugin working on our local mosque website.
web server info
cpsrvd 11.68.0.21
Database client version: libmysql – 5.1.73
PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation
PHP version: 5.6.30
Wordpress 4.7.5Thanks in anticipation of your help.
The page I need help with: [log in to see the link]
The topic ‘Installation problems – path problems with require_once’ is closed to new replies.