I have created a custom page for error messages in my web application.
I have created these two files in the views/errors/ directory named 'missing_action.ctp' and 'missing_controller.ctp'.
On server the error message is shown as follows:
and on localhost the error is shown properly like as follows:
I want to show the error messages exactly as that of on localhost but it is not appearing on server. What can be the problem.?
Glad this worked out for you. :)
Is it safe to assume those file were put in the app/ directory? Is the code EXACTLY the same on both installations?
Something to remember: CakePHP might have cached the previous page. Make sure your debug value is set to 1 or 2 in app/config/core.php to disable caching.
Related
I've got a MERN application that stores images to MongoDB. however, when trying to read the database and display the image back in the client application I keep getting the broken image icon.
I'm using Multer to successfully upload and store the images in the "/images" folder on the API side. I'm able to SEE the files being uploaded into that folder. I'm also using Path to declare the /images folder as a static folder.
on the client side I'm able to query the posts, get back the appropriate filename in the post.photo attribute and build up the source file location using a hard-coded PF constant (public folder). I'm logging out to the console that URL and when I copy and paste that built URL directly into a browser with the server running I'm able to see the picture successfully.
however, when using the URL for the image "src" I'm getting a broken image icon as shown.
I'll try to include a VERY watered down version of the code showing only relevant parts. any help would be greatly appreciated.
[Server Side][1]
[1]: https://i.stack.imgur.com/HkDbs.jpg
[Client Side][2]
[2]: https://i.stack.imgur.com/fJnXg.jpg
[Console App][3]
[3]: https://i.stack.imgur.com/KSunR.png
After weeks of wrestling with this I was finally able to get images to show in my client app! hopefully this helps someone else who might be having the same issue.
removed Helmet from the server side index.js file (it was part of a video instruction that I was following)
added a space-separated WHITELIST environment variable in the server-side .env file (ex: WHITELIST=http:http://localhost:3000)
then added the following code to my index.js code
code sample
Finally, somewhere along in the process I started getting "net::ERR_UNSAFE_PORT" errors showing up in my console. I wound up having to explicitly note my server ports like this "--explicitly-allowed-ports=5000,6000" in my browsers shortcut property by following the instructions noted here
https://superuser.com/questions/188006/how-to-fix-err-unsafe-port-error-on-chrome-when-browsing-to-unsafe-ports
that seemed to fix the issue for me!
Locally everything is working. But when I create a container and push it to cloud parts of website don't get localized. So far have no idea why as there are no errors thrown.
What is the best way to figure this out?
I checked the po files and they look OK.
I've installed MediaWiki, enabled short URLs there and added Interwiki and MobileFrontend extensions. But MobileFrontend extension doesn't show the Main Page - the output is just empty. The real page is not empty. At the same time MobileFrontend correctly displays other pages (see for example this page).
What could be wrong with my setup?
There is a HTTP code 500 on the main page (Internal Server Error). The server logs are often a good idea to start debugging.
I am integrating phpList into my website. I initialized database.
I was able to integrate my website with phpList.
In admin panel whenever i try to do anything like delete member from subscriber list or change any setting for subscriber page. I am getting this error "The requested URL /index.php was not found on this server."
I know that this is the problem of path.
When user receives email it says to confirm click on this.
http://admin.ridesharebuddy.com/lists/?p=preferences&uid=TOKEN
When user clicks on this, it displays error page not found.
Because path should be something like this.
http://admin.ridesharebuddy.com/rideshare/lists/?p=preferences&uid=TOKEN
How can i change this path ?
So from what I see, you have 2 issues:
Firstly:
index.php is not being found.
This is generally because of a) an upload error, or b) missing directory traversals within the script (../../ etc..)
What we need to know is why index.php is not found, and why it is being called when you try to make a change
Secondly:
The link generated when the email is sent, is incorrect. This will just be a case of finding where the link is generated, and modifying it to generate a correct code.
If you could update the post with source for the files, then I may be able to help you further.
If you feel you can't do the above, then I suggest using a different, more mature (and better coded), mailing script for your site.
I’ve created a small cakePHP application that uses the auth component to manage an admin section for changes.
The problem I’m having ‘only in the production environment’ is that after I login all I can see is a blank white screen. I should be redirected to a ‘dashboard’ view. This blank screen is also what I get with all other ‘admin’ prefixed views that require a logged in user, thus the auth component.
What is strange about this are two things, (1) this works fine in the local host and (2) this application is a copy of one that works fine in both the local host and production.
What I’ve done to try and resolve this is:
Checked the previous application copy; nothing different found
Checked that the passwords were hashed
Checked that the .htaccess file was uploaded in ASCII format (suggested by the host)
Any help with this is appreciated.
Ideally I’d like to understand how to trouble shoot this type of problem.
Thanks, Prasad
Possible things to do/check...
Turn on debug in your app/config/bootstrap.php file.
Clean out caches in each of the directories in app/tmp/cache.
Make sure you've properly created ACL stuff.
Check contents of app/tmp/logs/error.log and app/tmp/logs/debug.log.
Check /var/log/httpd/error_log (or wherever your web server makes its own logs for errors and php errors).