openshift - php error 404 when accessing image asset - php

Installed the PHP cartridge and processwire over that cartridge.
Made some changes to the stylesheet. This sheet needs files in the folder site/templates/imgs/. (backgrounds and others).
Unfortunately, I'm unable to see these images in my site because there's a 404 error whenever I try to load them.
I've tried several changes to the file app-root/runtime/repo/php/.htaccess, but without success.
Can anybody help me, please?

Solved: I had a mistake in my stylesheet, referencing the image as "/naeg/site/templates/imgs...", instead of "/site/templates/imgs...". In my development environment, I had the app in the context "/naeg". I'll leave this here, hoping will be useful for anyone.

Related

Wordpress - PHP Fatal error: Interface 'Requests_Hooker' not found?

i am not able to access my wordpress frontend. After uploading the 'understrap' theme my backend and frontend throw an http 500 exception.
In order to debug the issue, i've set 'WP_DEBUG' to 'true' and receive the following exception:
PHP Fatal error: Interface 'Requests_Hooker' not found in /var/www/html/wp-includes/Requests/Hooks.php on line 15
Next, i've overwrite the complete "wp-includes" folder with an initial "wp-includes" from a new wordpess and now am able to access my backend again. Unfortunately, my frontend is still empty and in wp-content/debug.log is still the same exception.
Plugins, Themes and Uploads are not affecting the issue - that is sure (the first thing i did is to remove the uploaded theme - understrap).
Wp-uploads folder has been completely initialized.
Does anyone had this issue before and might know how to fix it? Any advice is highly appreciated.
I know this is an old request, but in case others have this issue, I found a solution today. It looks like someone deleted or renamed "Hooker.php" in "webroot/wp-includes/Requests". If you are able, I would recommend restoring a previous version of that file using whatever kind of control panel you are using to administrate your site.

My PHP page refer to Error:Missing controller

I´m new in PHP and creating dynamic webpages and after I installed Apache and my PHP IDE(codelobster) I face a serious problem.I really don´t know what I´m doing wrong but when I create new PHP project and I try to open it via my browser through localhost/...it always return me back a error page with this description:
Error:Missing controller
Cake\Routing\Exception\MissingControllerException
My php file is called oneironaut.php so it gives me also:
Oneironaut.phpController could not be found.
In the case you tried to access a plugin controller make sure you added it to your composer file or you use the autoload option for the plugin.
Error: Create the class Oneironaut.phpController below in file:
src\Controller\Oneironaut.phpController.php
I tried to create different projects like with different names and there was always this bug diference only with name of my .php webpage.So I think this must be some system error and something in my xampp/php or Apache settings must change.Maybe there could be some connection with my unfunctional debugger , I tried to download Xdebug from https://xdebug.org/wizard.php and even though I follow instructions on this website and another websites too I can´t successfully get xdebug extensions into my computer.So in this some help will be highly appreciated too.
So give me someone please help what to do with these problems? Thank You so much.
This seems to be happening because the server is loading files in "case-sensitive" mode.
You call your PHP file "oneironaut.php", however, the page is looking for "Oneironaut.php"
A similar question has been answered here, please try:
Missing Controller Error on remote server using Beta 3

WordPress website hook error

I have a problem with my site. I migrate the website to another hosting provider and website not working now. I dont know why. I tried reinstalling the files, WordPress version, turn off the plugins and nothing happend.
Is there anybody with experience in this error?
Fatal error: Class 'Requests_Hooks' not found in
/data/www/22560/nejrychlejsiauta_cz/www/wp-includes/class-wp-http-requests-hooks.php
on line 17
This means that the folder "Requests" does not exist, try to get it from another WordPress installation of the same version, compress it and upload it to the site where the error is, then unzip it and it will work.
Regards..
this is what worked for me with this same exact error. I had the file Hooks.php that went missing. It is located here: wp-includes/Request/ With my install theres a file named Hooker.php and Hooks.php in that same directory. I had an identical install in another directory for a diff site and after cross checking the files, Hooks.php was missing on the broken website. After I installed it back on the site, the site works fine.
Hopefully this helps someone!
This happens in a case when you copy, e.g. in Total Commander, and have left the field "convert file names to lowercase" checked. As the path to the class file is not wp-includes/requests/hooks.php but wp-includes/Requests/Hooks.php
So uncheck this option.

Local xampp wordpress installation - cannot find wp-blog-header.php

I'm working locally with XAMPP and Wordpress and I'm struggling with what is probably a very basic config issue. I'm not a professional IT guy, just a hobbyist hacker so I apologise in advance if I'm being a bit dumb but hopefully somebody can kindly offer some assistance here.
I've installed xampp locally on my iMac. I've then installed wordpress using the xampp wordpress installation package. Both seem to be working fine. To test the web server I created a simple .php test file and this generated the expected output when I entered "localhost/hello.php" into my browser. As far as wordpress is concerned entering "localhost/wordpress" gives me access the local wp interface to create and edit posts, change display settings etc etc. So far so good...
Now I want to create a new .php file that includes the instruction:
require('XXX/wp-blog-header.php')
where the "XXX" is obviously the relevant directory path for the wp header file.
I cannot find this file, or indeed local wordpress files, anywhere (and I've searched extensively). In the "home" location for "localhost" (which I know from my "hello.php" test) there isn't even a wordpress directory so I'm totally puzzled as to how typing "localhost/wordpress" in my browser is accessing the local wp installation or how to go about determining the correct directory path for the wp header file I'm looking for?
I do understand that with this stack a great deal of info will either be generated on the fly, or stored in the local mysql database as opposed to the file structure, but I thought I would find some reference or alias somewhere to help me trace this through and determine what path to include in my .php file for wp-blog-header.php.
I've searched this forum and while there are several related questions I haven't found anything that helps me with this particular issue.
Thanks vm,
Ian
The location of your Wordpress files is:
/Applications/XAMPP/xamppfiles/apps/wordpress
Ok I found the path I needed and (partially) understand why I couldn't locate it. As Scriptonomy helped me identify the Wordpress files are held at:
/Applications/XAMPP/xamppfiles/apps/wordpress
While my test.php file is held at:
/Applications/XAMPP/xamppfiles/htdocs/test.php
The reason I couldn't locate either wp-blog-header.php or wp-load.php is because these there is an another "htdocs" sub-dir under the wordpress install location i.e.:
../apps/wordpress/htdocs
However I (as user "admin") don't have access to read this directory and so couldn't see the contents and therefore couldn't find the files. The permissions on the directory belong to "daemon" which I guess was the XAMPP installer package? Setting the directory path in my test.php file to:
../apps/wordpress/htdocs/wp-load.php
somehow the web server (?) can read the file (even though I can't see it myself via the Finder application) and so the code is now giving the expected result.
So problem solved even if I don't quite understand the solution!
Thanks for replies which helped me eventually get to a solution!
Cheers,
Ian

Error: Template Directory Not Found

I have cloned a git repo that someone made for a CodeIgniter website. I have a WAMP server set up fine in my computer and it works fine. In the Apache modules I enable the rewrite_module and in the PHP Settings I enable short open tag. I also put my database settings in the application\config\database.php file. After that, I put the CodeIgniter folder in the C:\wamp\www\CodeIgniter folder.
Now the problem is that when I go to localhost/CodeIgniter I get this:
Error: Template Directory Not Found!
I have looked for several hours online for this error but I could not find anything similar. If someone has seen this error before and knows how to solved it I will really appreciate any help or if you could point me in the right direction since I am new to CodeIgniter.
It sounds to me like your app is using a third-party Template library, and a config is incorrect
Search your application dir for "Template Directory Not Found" - that will take you to where the error message is in the code, and you can then figure out what library is calling it. Or, take a look in your application/config - most likely there's a file for it
"Template Directory Not Found" is not part of Codeigniter.

Categories