Hello
do you kindly have a kind suggestion for this issue?
I have an app that works fine locally
I own a NAS which has the web station
I moved the app there and there I have this weird message
Please Note: on the NAS, an updated Synology, either PHP and Mysql versions are matching my developing environment
what does it mean Invalid file? The pager works nicely on local host
Thank you
Make sure that the file app/Config/Pagers.php exists and is in that folder.
(02-22-2021, 09:42 AM)InsiteFX Wrote: [ -> ]Make sure that the file app/Config/Pagers.php exists and is in that folder.
Thank you for helping
Obviously the file app/Config/Pagers.php exists and is in that folder
and it opens fine with no errors into Visual Code (the htdocs on the NAS is a network share in my LAN)
I have copied the whole codeigniter tree from my PC to NAS and in there I have created the same apache virtual host
thoug I have edited .env file according to what eventually changed e.g. the db name and user password
The home view and others view are opening fine and also C.R.U.D. operations do work
only this view with the pager fails
P.S.
this is the phpinfo() on the NAS
https://ibb.co/XCKcNtj
this is the Pager.php
https://ibb.co/jvYJLbf
(02-22-2021, 09:42 AM)InsiteFX Wrote: [ -> ]Make sure that the file app/Config/Pagers.php exists and is in that folder.
also filenames case is correct , no uppercase lowercase errors are possible, since on the development computer it works
Hello, I really thank you so much for helping
Yes I confirm that both bs_full.php and bs_simple.php are in this path
/app/Views/Pagers
and they opens fine in the Visual Code Studio editor
I gently recall that from this development notebook
- I copied the whole app directory into the shared www folder in the NAS
- that here in the notebook, with XAMPP with same php version, everything works fine
here is a screenshot of the bs_full.php
https://ibb.co/JxNqQKm
(it is opened directly from the NAS, I kindly recall that on the NAS I have shared the www directory)
side note: to make the database connection to work, in the .env file on the NAS I had to use localhost:3306 (weird, default port, but it was not connecting. I had to add the colon and the port number. Could be an analogue issue but under some different aspect?)
Also the exception message is slightly cryptic since it says "invalid file" it is not saying "missing file" or "file not found"
The only other thing that I can think of is that your nas is not seeing the
directories correctly. Check your paths and make sure everything is pointing
to where it should.
[quote pid='384630' dateline='1614035335']
Try.
PHP Code:
public $templates = [
...
'bs_full' => 'App\Views\Pager\bs_full',
'bs_simple' => 'App\Views\Pager\bs_simple',
];
[/quote]
Thank you kenjis !
This solved the issue
I'll keep in mind this in future debugs
Maybe CodeIgniter exception feedback for these cases could be written somehow less cryptic or with a more explicit complain
(02-23-2021, 12:24 AM)Corsari Wrote: [ -> ]Maybe CodeIgniter exception feedback for these cases could be written somehow less cryptic or with a more explicit complain
It is true.
But how do we improve it?
CI shows:
Quote:Invalid file: Pagers\bs_full.php
This shows
bs_full.php in the namespace
Pagers is invalid.
Any idea?