Title: Installation problems &#8211; path problems with require_once
Last modified: December 28, 2017

---

# Installation problems – path problems with require_once

 *  [zaphodbb](https://wordpress.org/support/users/zaphodbb/)
 * (@zaphodbb)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/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 3
 * Fatal 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_once` statements 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.5
 * Thanks in anticipation of your help.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finstallation-problems-path-problems-with-require_once%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [mmrs151](https://wordpress.org/support/users/mmrs151/)
 * (@mmrs151)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/installation-problems-path-problems-with-require_once/#post-9817345)
 * Assalamualaikum dearest brother,
 * Really sorry to hear your journey with this plugin. May Allah swt make it easy
   for us. I really need the error.log to understand the issue.
 * Can you please update to the latest version, 4.2.7.1 and tell me the error log
   ouput the moment you see the {“readyState”:4,”responseText”:””,”status”:500,”
   statusText”:”Internal Server Error”}
 * Mustafiz.
 *  Thread Starter [zaphodbb](https://wordpress.org/support/users/zaphodbb/)
 * (@zaphodbb)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/installation-problems-path-problems-with-require_once/#post-9819122)
 * Wasalam Dear Brother,
 * Thank you for your kind words and getting back to us so quickly at a time when
   you maybe busy.
 * I wasn’t initially sure how to determine the version of PHP and posted the above
   info from Cpanel PHPAdmin section but suspected I might have misunderstood. So
   eventually worked out I had use phpinfo() function in a file to get details from
   the server. This showed PHP version as **5.2.17** older than I thought. I think
   5.3 is required for (__DIR__) in the require_once functions and maybe even newer
   for the lcfirst() function, hence the reason I was getting errors !!
 * No doubt there will be other newer things incompatible with the older PHP engine
   so I have spoken to the hosting site who will move us to a server with newer 
   user selectable versions of PHP, which will take a few days. So at the moment
   I will wait for this move and I’m fairly confident that your plugin will work
   as intended.
 * Is there a particular minimum version of PHP that is required for the Daily Prayer
   Times plugin ? In general am I best going to the latest version of PHP or could
   that introduce other problems ? Also would it be OK to go to latest version of
   WordPress **4.7 ** for this plugin ?
 * Incidentally I did turn on debugging and had a quick scan in the debug and error
   log files, several errors shown but probably following complaints relevant to
   the pop up text box on that page. Firstly `Underfined variable css` and `PHP 
   Fatal error: Class 'MonthlyTimeTable' not found`. I’m pretty sure these would
   get resolved once the paths issue gets resolved properly. I’m guessing in the
   latest version of the plugin new things were introduced for the Monthly Time 
   Tables functionality, or maybe just lucky it worked before !
 * (At least this is starting to be a good learning exercise in how things are put
   together !!)
 * I may be back if I have more problems but in the meantime thank you for all your
   help may Allah swt reward you for all your efforts, and keep yourself and the
   family in good health.
 * Thanks
    -  This reply was modified 8 years, 5 months ago by [zaphodbb](https://wordpress.org/support/users/zaphodbb/).
 *  Thread Starter [zaphodbb](https://wordpress.org/support/users/zaphodbb/)
 * (@zaphodbb)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/installation-problems-path-problems-with-require_once/#post-9821473)
 * OK updated PHP to 5.6 and and the plugin is working spot on from the start !!
   Might come back with questions about changing the visual look.
 * Thanks for now.
 *  Plugin Author [mmrs151](https://wordpress.org/support/users/mmrs151/)
 * (@mmrs151)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/installation-problems-path-problems-with-require_once/#post-9827981)
 * Alhamdulillah !
 * Allah makes things easy for us.
 * Silly me, I didn’t think any server still use legacy php version, i.e prior to
   5.3
 * wp version 4.7 should work fine too.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Installation problems – path problems with require_once’ is closed to
new replies.

 * ![](https://ps.w.org/daily-prayer-time-for-mosques/assets/icon-128x128.png?rev
   =1215663)
 * [Daily Prayer Time](https://wordpress.org/plugins/daily-prayer-time-for-mosques/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/daily-prayer-time-for-mosques/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/daily-prayer-time-for-mosques/)
 * [Active Topics](https://wordpress.org/support/plugin/daily-prayer-time-for-mosques/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/daily-prayer-time-for-mosques/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/daily-prayer-time-for-mosques/reviews/)

## Tags

 * [installation problem](https://wordpress.org/support/topic-tag/installation-problem/)
 * [require_once](https://wordpress.org/support/topic-tag/require_once/)

 * 4 replies
 * 2 participants
 * Last reply from: [mmrs151](https://wordpress.org/support/users/mmrs151/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/installation-problems-path-problems-with-require_once/#post-9827981)
 * Status: not resolved