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
Related
I have a new install. Ubuntu 22.04, Apache2, PHP 8.1 and I'm trying to use PHPMailer. My test page with phpinfo all looks good and shows the includes directory /usr/share/php. My form and script are in a subfolder of my document root and it loads fine. But when I fill out the form and the script starts it errors out unable to find PHPMailer. It's only looking in the subfolder the script is in, not the global includes directory. I don't want to put the mod in every form folder and I know it's supposed to work from the includes folder. Is this an Apache or php config issue? Or something I have to specify in the vhost?
Just verifying and closing out with the answer
I found the issue early today. Thanks to bad/tired eyes, I wasn't seeing the leading dot so it was looking for ./usr... Once i fixed that i was able to sort out the Ubuntu method of calling it from the libphp-phpmailer pkg autoload.php. I was able to get the script working with a few code corrections. The only thing I didn't sort out was PHPMailer:ParseAdresses but i only had a few recipients for this form so it wasn't that big an issue. My form is back online and my managers are happy 😊
I´m moving an application from a PHP 5.5 server to a PHP 5.6 server. The application is based on Codeigniter 2.2.
On the old server I had something like this in my views to include other template parts:
include('header.php');
This simple and direct include works like a charm on the old server.
On the new server I get the exception, that the file for inclusion could not be found.
I found out, that the PHP preprocessor tries to grab the file from the linux include paths and also from the "system/core" directory. But not from the directory where the view itself is located.
I´ve not idea what makes the difference between these two systems... Has anybody an idea where I can search for the issue?
Check the file path. Whether its inside some other folder or not.
Also can try with
$this->load->view('header.php');
or can load header in Controller as well
As well there are some useful keyword.
APPPATH - Outputs application path. Ex application/
Thanks guys for all your input - I´ve already tried most of these debugging attempts.
Now I digged a little deeper and found the reason for my problems. The short_open_tag directive in PHP caused the issue. Cause this new server had some slight differences in php.ini.
In core/loader.php Codeigniter tries to replace short open tags with normal tags, if the .ini setting for short_open_tags is disabled. For any reason this replacement isn´t working as expected and that caused my issues.
So if anyone has the same issue after moving a Codeigniter installation from one machine to another, that might be a point where you can start.
Thanks to all of you,
Michael
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.
I got this issue with my website using wordpress
I don't know what's the issue, could someone help us out please.
Fatal error: Cannot redeclare frm_dl() (
You seem to have duplicate function definitions of the function rm_dl() in wp-settings.php. Please review that file so there is only one definition.
It is also not a good idea to post links to your website and ask "please have a look". Much better and easier for us to help if you post the specific error together with the affected files (without passwords of course!).
If there is nothing wrong with your file the error is most likely caused by some newly installed or updated theme or plugin. In worst case it's some automated hack. In both cases you should reverse to a working backup and make sure you update carefully any plugins and base installations with security updates.
This issue is by cause of virus. It is one type of script when this run this create code in each php file like followuing.
.
the solution is that download your live project file and remove this code and upload again all file on live.
you can replace all that code one time replace all with blank cursor only.
Shiv
I'm trying to set up my Flex Builder 4 dev environment, up to and including PHP and the ZendFramework on a WAMP stack on my hard drive.
Everything goes swimmingly until I try to set up a data service. I point it to the php class file, it populates the various fields in the form so I know it understood it, and I press next. After a little bit of tweaking I have the ZendFramework installed and everything seems to be pointing the right way, so I'm not sure why I'm getting this error:
"Make sure that Zend Framework is installed correctly and the parameter "amf.production" is not set to true in the amf_config.ini file located in the project output folder.
Warning: include_once(C:\wamp\www\TestDrive-debug\EmployeeService.php) [function.include-once]: failed to open stream: Permission denied in C:\wamp\ZendFramework\library\Zend\Loader.php on line 146"
What could be causing a permissions error like that? It's not on the system level because I went into properties and fully opened that file up so even a basic user has full permissions - still no dice.
I'm not reeeally a PHP guy so this is a bit beyond my skillset. Has anyone encountered this problem before? I'm just following the tutorial I have here and it SHOULD work. I'm just not clear on what would be causing a permissions issue like this.
Thanks!
I resolved this problem by changing the encoding of the php file. There must be some invisible characters in the file that were screwing up the parsing. Try saving the php service file with different encoding and see if it works for you. The one that worked for me was created by eclipse. I copy pasted the code in it, saved, and boom it worked!
just had same issue and resolved same as OP, just resave file with notepad, funny deal, but it happens
inside the folder of amf_Config.ini , create a new file amf_config2.ini , copy the contents of amf_config.ini as it is into amf_config2.ini , now inside amf_config2 double quote the value of parameter webroot (webroot="xxxxx") save ur amf_config2 , open gateway.php which would be also inside the same dir , change $configfile = "$dir/amf_config.ini" to
$configfile = "$dir/amf_config2.ini" , save it and try