I'm new to the yii framework and I am trying to execute a php application in my local zwamp environment. The application works correctly in a production environnent.
The Error I receive is after filling the form and trying to submit it. The captcha doesn't validate and I get the following error in the logs:
2014/11/10 10:23:17 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'The system cannot find the action « undefined » that is requested.' in D:\Users\....\web\CController.php:483
Stack trace:
#0 D:\Users\...\web\CController.php(270): CController->missingAction('undefined')
#1 D:\Users\...\web\CWebApplication.php(282): CController->run('undefined')
#2 D:\Users\...\web\CWebApplication.php(141): CWebApplication->runController('site/undefined')
#3 D:\Users\...\base\CApplication.php(180): CWebApplication->processRequest()
#4 D:\Users\....\index.php(23): CApplication->run()
#5 {main}
REQUEST_URI=/appname/site/undefined
HTTP_REFERER=http://localhost:92/appname/site/form
How can I fix this or identify which action is causing the problem?
**EDIT: problem seems to come from here : the verification code does not match the image displayed.. **
/**
* Gets the verification code.
* #param boolean $regenerate whether the verification code should be regenerated.
* #return string the verification code.
*/
public function getVerifyCode($regenerate=false)
{
if($this->fixedVerifyCode !== null)
return $this->fixedVerifyCode;
$session = Yii::app()->session;
$session->open();
$name = $this->getSessionKey();
if($session[$name] === null || $regenerate)
{
$session[$name] = $this->generateVerifyCode();
$session[$name . 'count'] = 1;
}
$message = $session[$name];
echo "<script type='text/javascript'>alert('$message');</script>";
return $session[$name];
}
what could be the issue?
Ayrad, the error message is quite ambiguous saying like, "...action « undefined ».....", in general Yii 404 errors specifies name of it (for example, "...Unable to resolve the request "ABC XYZ ...." ).
These kind of errors depend on many things, like, was engine rewrite was enabled, how is your .htacess. At least, how is your "URLManager" looks in your Config.
So, my answer is from my experience from the problem which I faced earlier. Their are some broken links in my CSS file, so I got error likes this,
[error] [exception.CHttpException.404] exception 'CHttpException' with message 'The system is unable to find the requested action "undefined".' in C:\wamp\yii\framework\web\CController.php:484
Stack trace:
#0 C:\wamp\yii\framework\web\CController.php(271): CController->missingAction('undefined')
#1 C:\wamp\yii\framework\web\CWebApplication.php(283): CController->run('undefined')
#2 C:\wamp\yii\framework\web\CWebApplication.php(142): CWebApplication->runController('site/undefined')
#3 C:\wamp\yii\framework\base\CApplication.php(162): CWebApplication->processRequest()
#4 C:\wamp\www\index.php(27): CApplication->run()
#5 {main}
REQUEST_URI=/site/undefined
HTTP_REFERER=http://localhost/site/index
I checked my main layout and find out this buggy javascript function causes that error:
$(".shortcuts").each(function(){
var cacheImage = document.createElement('img');
cacheImage.src = $(this).attr('rel');
cache.push(cacheImage);
});
It was suppose to preload shortcuts images on the bootstrap navbar. so that fixed the problem. Hope this helps. if not, please try to post extra details.
Error logs show clearly what this is about,
REQUEST_URI=/appname/site/undefined
this shows that somehow you generated a url like that and when it was trying to resolve using that, it faild (I think it's your forms url)
you have to share to view that made this form, otherwise we can't help you
If this code working correctly in production environment. Then the issue may be due to mismatch of database or main.php. I think, this error is due to not getting the site action correctly. check that, the requesting URL is given correctly.
Related
I have website which has Gutenberg and it is very important part of it, problem is..
When i enter page and try to save it i get error 500, in console i have this error in console
POST https://myDomain/wp-json/wp/v2/pages/5950 500 ()
POST https://myDomain/wp-admin/post.php?post=5950&action=edit&classic-editor=1&meta_box=1 500 ()
and this error in my error log
[12-Sep-2018 09:46:18 UTC] PHP Fatal error: Uncaught Exception: Invalid page template. in /usr/www/users/foodno/v32/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-duplication.class.php:99
Stack trace:
#0 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(4219): WPML_Post_Duplication->make_duplicate(5950, 'he')
#1 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-synchronization.class.php(84): SitePress->make_duplicate(5950, 'he')
#2 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-translation.class.php(248): WPML_Post_Synchronization->sync_with_duplicates(5950)
#3 /usr/www/users/myDomain/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-admin-post-actions.class.php(113): WPML_Post_Translation->after_save_post('535', Array, 'en', NULL)
#4 /usr/www/users/myDomain/wp-includes/class-wp-hook.php(288): WPML_Admin_Post_Actions->save_post_actions('5950', Objec in /usr/www/users/foodno/v32/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-duplication.class.php on line 99
I am also using WPML plugin, and on save plugin gets stuck screenshot
Loader is in loop...
Thing is, it saves the edited content, but still it returns error 500, i tried debugging and got absolutely nothing
I have googled it of course before asking and i found these as known Gutenberg issues that occured before... None of these did not help.. Does anyone have any suggestion or solution?
https://github.com/WordPress/gutenberg/issues/5675
https://github.com/WordPress/gutenberg/issues/8410
Thanks in advance
I asked on their git also, and i've got an answer from mr with nickname "brucepearson" and WPML will apparently fix this in next update, here is link to git q/a
https://github.com/WordPress/gutenberg/issues/9816
I am trying to run a Responsive ad example using adwords api library (php) but it is giving me the following error
Fatal error: Uncaught exception 'Google\AdsApi\AdWords\v201702\cm\ApiException' with message '[OperationAccessDenied.OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE # operations[0].operand.ad; trigger:'SEARCH']' in C:\xampp\htdocs\adfollower\app\Utils\adfollower\src\Google\AdsApi\Common\Util\Reflection.php:39 Stack trace: #0 C:\xampp\htdocs\adfollower\app\Utils\adfollower\src\Google\AdsApi\Common\Util\Reflection.php(39): ReflectionClass->newInstanceArgs(Array)
#1 C:\xampp\htdocs\adfollower\app\Utils\adfollower\src\Google\AdsApi\Common\AdsSoapClient.php(162): Google\AdsApi\Common\Util\Reflection->createInstance('Google\\AdsApi\\A...', '[OperationAcces...')
#2 C:\xampp\htdocs\adfollower\app\Utils\adfollower\src\Google\AdsApi\Common\AdsSoapClient.php(126): Google\AdsApi\Common\AdsSoapClient->parseApiExceptionFromSoapFault(Object(SoapFault))
#3 C:\xampp\htdocs\adfollower\app\Utils\adfollower\src\Google\AdsApi\AdWords\v201702\cm\AdGroupAdService.php(189): Google\AdsApi\Common\AdsSoapClient->__soapCall('mutate', Array)
#4 C:\xampp\ht in C:\xampp\htdocs\adfollower\app\Utils\adfollower\src\Google\AdsApi\Common\Util\Reflection.php on line 39
The error indicates that you are trying to add a creative to a campaign that is not compatible with its type.
In your specific scenario, you are adding a Responsive Ad to a Search Network Campaign, but this type of creative can only be used in a Display Network Campaign.
The solution is to create a new Display campaign with the proper targetting settings and update the affected campaign ID in your code.
From the error above, it looks like your access details you are providing is incorrect as its giving a permissions error.
You can find an example here:
https://github.com/googleads/googleads-php-lib/tree/master/examples/AdWords
Otherwise can you please paste your code (without your access details) so we can see how you are implementing it.
My script runs into an error - can someone help me on this? For me it looks like, that something is not okay with the username?
PHP Fatal error: Uncaught exception 'SpotifyWebAPI\\SpotifyWebAPIException' with message 'An unknown error occurred.' in /mnt/webp/b3/44/5462244/htdocs/SpotifyTest/src/Request.php:38
Stack trace:
#0 /mnt/webp/b3/44/5462244/htdocs/SpotifyTest/src/Request.php(188): SpotifyWebAPI\\Request->parseBody('<html><body><h1...', 400)
#3 /mnt/webp/b3/44/5462244/htdocs/SpotifyTest/testfile.php(68): SpotifyWebAPI\\SpotifyWebAPI->getUserPlaylist('lillabj\\xC3\\xB6rn', '0WXsElmPC8aEGzr...')
#4 {main}
thrown in /mnt/webp/b3/44/5462244/htdocs/SpotifyTest/src/Request.php on line 38
I think it is this line ->
SpotifyWebAPI->getUserPlaylist('**llabj\\xC3\\xB6rn**',.....
I get the username from a mysql table like this
$USERPL = $pl['user_name'];
Would be great if some can give me some help.
I think the problem is related to special characters in the username, the \\xC3\\xB6 part should be an "ö" so the full username is "lillabjörn".
When you run another user request with the same username in the Spotify Web API Console you can see that it's URL encoded in the actual request sent, https://developer.spotify.com/web-api/console/get-users-profile/?user_id=lillabj%C3%B6rn (click the link to see it).
Try URL encoding the username in all user related calls, for example:
$api->getUserPlaylist(urlencode('lillabjörn'), 'playlist_id');
I am completely inexperience with this whole SOAP concept so I have no idea what to look for when I see an error.
So basically I am trying to pull some data from another company. That company gave me a digital certificate and and some xsd & wsdl files and asked me for my server's IP so they could whitelist it. As I mentioned, I have no idea what to do with the files they gave me, so I uploaded them to my server and then I started googling, and I have pasted together the following code (although I don't even know if it makes sense):
$protected_url = "http://www.myurl.com/WSDLFILE.wsdl";
$my_cert_file = "http://www.myurl.com/CERTFILE.pem";
$client = new SoapClient($protected_url, array('local_cert'=> $my_cert_file,'trace'=>1));
$params->Affiliate->AffiliateID = 555;
$params->Address->AddressLine = "123 Main Street";
$params->Contact = 'No';
$result = $client->QueryAddress($params);
And I get the following error
[10-Apr-2013 18:59:46 America/New_York] PHP Fatal error: Uncaught SoapFault exception: [HTTP] Forbidden in /home/mysite/index.php:15
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://secure....', 'http://www....', 1, 0)
#1 /home/mysite/index.php(15): SoapClient->__call('QueryAddress', Array)
#2 /home/mysite/index.php(15): SoapClient->QueryAddress(Object(stdClass))
#3 {main}
thrown in /home/mysite/index.php on line 15
It's kind of hard to search for help because I dont even know what I'm searching for, so any guidance is appreciated
EDIT: I should also add that I have actually been able to get a successful response by using cURL and setting the "CURLOPT_SSLCERT" option, but I need to use SOAP
(Answered in the comments. Converted to a community wiki answer. See Question with no answers, but issue solved in the comments (or extended in chat) )
The OP wrote:
SOLVED: My problem was the way I was using the .wsdl file. I thought I had to upload the one they provided and then use it when creating the SoapClient, but that was not the case. What I needed to was reference their wsdl url, which ended in something like https:......asmx?WSDL
All of a sudden i'm getting this error message using Light Open ID.
Fatal error: Uncaught exception 'ErrorException' with message 'No servers found!' in /home/a3422801/public_html/LoginAssignment/php/openid.php:463 Stack trace: #0 /home/a3422801/public_html/LoginAssignment/php/openid.php(595): LightOpenID->discover() #1 /home/a3422801/public_html/LoginAssignment/index.php(9): LightOpenID->authUrl() #2 {main} thrown in /home/a3422801/public_html/LoginAssignment/php/openid.php on line 463
...and the small snippet of relevant code in openid.php:
if ($server) {
# We found an OpenID2 OP Endpoint
if ($delegate) {
# We have also found an OP-Local ID.
$this->identity = $delegate;
}
$this->server = $server;
return $server;
}
throw new ErrorException('No servers found!');
I have no idea what the problem is - this is a recent issue. Does anyone know has something changed recently with OpenID. I'll gladly provide any more code that is required. I'm new with logins and PHP in general so i apologize if this is very vague.
This google login is coupled with a FB login if this has any bearing - but like i said, this was functioning correctly.
I had the same problem, and solved it by comparing the OpenID URL I was using, with the one here on StackOverflow. Turns out I wasn't using https. Until recently, this was not a problem, but now it seems to be required.
So make sure you're using the following URL:
https://www.google.com/accounts/o8/id
After changing this, it works again at my websites.