failed to load source for - php

I have a php project which used to work well, yesterday it suddenly failed, from the login page i cannot actually get into the system with the right username/password. i checked it in Firebug, it said: failed to load source for the php file that's supposed to load after login.what could be wrong? anyone have any idea? Thanks.

Have you checked all your dependencies?
Is the file loaded after login still there and still containing the correct code?
Is the code that points to that script still pointing to the correct file?

Related

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

Laravel Cache - file_put_contents file not found

I have this really strange error that I'm struggling to figure out.
I have a command that will cache the homepage. If I run cache:clear then command:updateCaches
And then try and load the site it tells me
file_put_contents(/home/sites/staff.habbocreate.com/storage/framework/cache/data/80/b6/80b69166730ee957730d0770e96781dbd90ae953): failed to open stream: No such file or directory (View: /home/sites/staff.habbocreate.com/resources/views/frontend/home.blade.php)
Its like being logged out causes the error. Except, I can cache the first time without being logged in via my browser and that works no problem.
Here is HomeController.php https://pastebin.com/P1uNNWEs
I don't expect anyone to figure it out, just an idea why it might be going wrong. Any help would appreciated though.
Ok turns out it was my own stupidity causing the error.
I was running the command via terminal so when the data files were created, they were created with the users and group root.
Then when I tried to view it in the browser, the user www-data was unable to access them.
try use public word
file_put_contents(/home/sites/staff.habbocreate.com/public/storage/framework/cache/data/80/b6/80b69166730ee957730d0770e96781dbd90ae953);

PHP: 500 internal server error page and "could not execute script" in log

I'm working on a website based on static and php pages.
With html pages everything works fine but every time I try to display a PHP page I receive a "500 server internal error" and this message in the log:
SoftException in Application.cpp:604: Could not execute script "/path/file.php", referer "/path/"
I'm not a php expert, I've tried to:
put and display a blank php file in different paths.
change permissions on php files (now they all have a 755 permission)
look for something wrong in the .htaccess file (but it was blank).
...the error is still there, do you have any suggestion?
Thanks a lot!
Finally the customer has decided to pay for extra support.
The provider told the files had wrong permissions.
I don't think it was so because, as I've told you, it was the first thing that I've try to change.
However everything is working fine now.
Thank you :)

Opening Yii Application causes download of index.php

I recently downloaded Yii in my linux-ubuntu system. After extracting the files to /var/www/vishnu/, I went for creating the first webapp.
What I have done is executing /var/www/vishnu/yii/framework/yiic webapp anyname in my command line. It succesfully created the application under /home/ti/anyname
But whenever I am trying to access it, It downloads the index.php file instead of opening the webapp home page! Why does this happen? I tried, the following Urls..
localhost/vishnu/anyname/ - Returns Not Found
home/ti/anyname/index.php- Downloads the file
home/ti/anyname/index-test.php- Downloads the file
I can see the files in file:///home/ti/anyname/ But can't open anything. When ever I click on it, it is being downloaded! Please share your solutions if you have any...
Thank you very much. I got it from this blog.
I changed the command such that, the webapp will point to my localhost itslef.
ie php /var/www/vishnu/yii/framework/yiic.php webapp /var/www/vishnu/yii/anyname/
Now its working... :)

Flex Builder 4, ZendAMF and Data Services - Error?

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

Categories