CakePHP

Using php mailer instead of mail() function

require ‘PHPMailer/PHPMailerAutoload.php’;
$mail = new PHPMailer();
$mail->setFrom(‘zendcalendar@gmail.com’, ‘Admin’);
$mail->addReplyTo(‘zendcalendar@gmail.com’, ‘Admin’);
$mail->addAddress($to);
$mail->Subject = ‘Password Updated on Babyboom!’;
$mail->Body = ‘Password for babyboom has been updated! ‘;
$mail->send();

Advertisements

CakePHP/PHP Session lost on another controller or on redirect

The problem may be one of these
1)First of all check if session.start is set to true in app/config/core.php

The problem arises when session has not been started in other controller or the view/method you are redirected to

2)Try adding seesion_start(); in the beforeFilter of controller you are redirected to.
Or may be one or all of below in core.php file
Configure::write(‘Security.cookie’, ‘cakephpfdebackend’);
Configure::write(‘Session.cookieTimeout’, 0);
Configure::write(‘Session.checkAgent’, false);
Configure::write(‘Session.cookie_secure’,false);
Configure::write(‘Session.referer_check’ ,false);
Configure::write(‘Session.defaults’, ‘php’);

I would say check if the session has started or not

In core php

1)Please check if seesion is started on top of page,check session id if it is changing on redirect.

2)Check header(location );
The url passed shouldn’t contain the protocol information i.e.http or https

Using Paypal Sdk error: PPAutoloader not found

Here is PPAutoloader.php all you need to do is put the sdk on your server and run the file install.php to get the file below:
‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘adaptivepaymentsservice’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePaymentsService.php’,
‘address’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘addresslist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘attributecontainertestclass’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMessageTest.php’,
‘attributetestclass’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMessageTest.php’,
‘authsignature’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘baseaddress’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘cancelpreapprovalrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘cancelpreapprovalresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘clientdetailstype’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘configuration’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/samples/Configuration.php’,
‘confirmpreapprovalrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘confirmpreapprovalresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘conversionrate’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘convertcurrencyrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘convertcurrencyresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencycodelist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencyconversion’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencyconversionlist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencyconversiontable’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencylist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘currencytype’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘displayoptions’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘errordata’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘errorlist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘errorparameter’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘executepaymentrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘executepaymentresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘faultmessage’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘feedisclosure’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘formatterfactory’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/formatters/FormatterFactory.php’,
‘fundingconstraint’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘fundingplan’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘fundingplancharge’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘fundingsource’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘fundingtypeinfo’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘fundingtypelist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getallowedfundingsourcesrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getallowedfundingsourcesresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getavailableshippingaddressesrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getavailableshippingaddressesresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getfundingplansrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getfundingplansresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getpaymentoptionsrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getpaymentoptionsresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getprepaymentdisclosurerequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getprepaymentdisclosureresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getshippingaddressesrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getshippingaddressesresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getuserlimitsrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘getuserlimitsresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘initiatingentity’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘institutioncustomer’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘invoicedata’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘invoiceitem’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘ippcredential’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/IPPCredential.php’,
‘ippformatter’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/formatters/IPPFormatter.php’,
‘ipphandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/IPPHandler.php’,
‘ippthirdpartyauthorization’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/IPPThirdPartyAuthorization.php’,
‘mockoauthdatastore’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/AuthUtil.php’,
‘oauthconsumer’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthdatastore’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthrequest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthserver’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthsignaturemethod’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthsignaturemethod_hmac_sha1’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthsignaturemethod_plaintext’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthsignaturemethod_rsa_sha1’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthtoken’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘oauthutil’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPAuth.php’,
‘payerror’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘payerrorlist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘paymentdetailsrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘paymentdetailsresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘paymentinfo’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘paymentinfolist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘payrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘payresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘phonenumber’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘phonenumbertype’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘postpaymentdisclosure’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘postpaymentdisclosurelist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘ppapicontext’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/common/PPApiContext.php’,
‘ppapiservice’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPAPIService.php’,
‘ppapiservicetest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPAPIServiceTest.php’,
‘pparrayutil’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/common/PPArrayUtil.php’,
‘ppauthenticationhandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPAuthenticationHandler.php’,
‘ppbaseservice’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPBaseService.php’,
‘ppbaseservicetest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPBaseServiceTest.php’,
‘ppcertificateauthhandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPCertificateAuthHandler.php’,
‘ppcertificatecredential’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPCertificateCredential.php’,
‘ppcertificatecredentialtest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPCertificateCredentialTest.php’,
‘ppconfigmanager’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPConfigManager.php’,
‘ppconfigmanagertest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPConfigManagerTest.php’,
‘ppconfigurationexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/exceptions/PPConfigurationException.php’,
‘ppconfigurationexceptiontest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPConfigurationExceptionTest.php’,
‘ppconnectionexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/exceptions/PPConnectionException.php’,
‘ppconnectionexceptiontest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPConnectionExceptionTest.php’,
‘ppconnectionmanager’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPConnectionManager.php’,
‘ppconnectionmanagertest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPConnectionManagerTest.php’,
‘ppconstants’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPConstants.php’,
‘ppcredentialmanager’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPCredentialManager.php’,
‘ppcredentialmanagertest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPCredentialManagerTest.php’,
‘ppgenericservicehandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPGenericServiceHandler.php’,
‘pphttpconfig’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPHttpConfig.php’,
‘pphttpconnection’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPHttpConnection.php’,
‘ppinvalidcredentialexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/exceptions/PPInvalidCredentialException.php’,
‘ppinvalidcredentialexceptiontest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPInvalidCredentialExceptionTest.php’,
‘ppipnmessage’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/ipn/PPIPNMessage.php’,
‘ppipnmessagetest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPIPNMessageTest.php’,
‘pplogginglevel’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPLoggingManager.php’,
‘pploggingmanager’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPLoggingManager.php’,
‘pploggingmanagertest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPLoggingManagerTest.php’,
‘ppmerchantservicehandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPMerchantServiceHandler.php’,
‘ppmessage’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPMessage.php’,
‘ppmessagetest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMessageTest.php’,
‘ppmissingcredentialexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/exceptions/PPMissingCredentialException.php’,
‘ppmissingcredentialexceptiontest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMissingCredentialExceptionTest.php’,
‘ppmodel’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/common/PPModel.php’,
‘ppnvpformatter’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/formatters/PPNVPFormatter.php’,
‘ppopenidaddress’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/openid/PPOpenIdAddress.php’,
‘ppopenidaddresstest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/openid/PPOpenIdAddressTest.php’,
‘ppopeniderror’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/openid/PPOpenIdError.php’,
‘ppopenidhandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPOpenIdHandler.php’,
‘ppopenidsession’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/openid/PPOpenIdSession.php’,
‘ppopenidsessiontest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/openid/PPOpenIdSessionTest.php’,
‘ppopenidtokeninfo’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/openid/PPOpenIdTokeninfo.php’,
‘ppopenidtokeninfotest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/openid/PPOpenIdTokeninfoTest.php’,
‘ppopeniduserinfo’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/openid/PPOpenIdUserinfo.php’,
‘ppopeniduserinfotest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/openid/PPOpenIdUserinfoTest.php’,
‘ppplatformservicehandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPPlatformServiceHandler.php’,
‘ppreflectionutil’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/common/PPReflectionUtil.php’,
‘pprequest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPRequest.php’,
‘pprestcall’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/transport/PPRestCall.php’,
‘ppsignatureauthhandler’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/handlers/PPSignatureAuthHandler.php’,
‘ppsignaturecredential’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPSignatureCredential.php’,
‘ppsignaturecredentialtest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPSignatureCredentialTest.php’,
‘ppsoapformatter’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/formatters/PPSOAPFormatter.php’,
‘ppsubjectauthorization’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPSubjectAuthorization.php’,
‘pptokenauthorization’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/auth/PPTokenAuthorization.php’,
‘pptransformerexception’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/exceptions/PPTransformerException.php’,
‘ppuseragent’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/common/PPUserAgent.php’,
‘pputils’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPUtils.php’,
‘pputilstest’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPUtilsTest.php’,
‘ppxmlmessage’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPXmlMessage.php’,
‘preapprovaldetailsrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘preapprovaldetailsresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘preapprovalrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘preapprovalresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiver’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiverdisclosure’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiverdisclosurelist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiveridentifier’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiverinfo’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiverinfolist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiverlist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘receiveroptions’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘refundinfo’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘refundinfolist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘refundrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘refundresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘requestenvelope’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘responseenvelope’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘senderdisclosure’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘senderidentifier’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘senderoptions’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘setpaymentoptionsrequest’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘setpaymentoptionsresponse’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘shippingaddressinfo’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘simplecontainertestclass’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMessageTest.php’,
‘simpletestclass’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/tests/PPMessageTest.php’,
‘taxiddetails’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘userlimit’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘warningdata’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘warningdatalist’ => ‘vendor/paypal/paypal-adaptivepayments-sdk-php-6a4c93f/lib/services/AdaptivePayments/AdaptivePayments.php’,
‘xmltoarray’ => ‘vendor/paypal/paypal-sdk-core-php-2ee73c7/lib/PPUtils.php’,
);

public static function loadClass($class) {
$class = strtolower(trim($class, ‘\\’));

if (isset(self::$map[$class])) {
require dirname(__FILE__) . ‘/’ . self::$map[$class];
}
}

public static function register() {
spl_autoload_register(array(__CLASS__, ‘loadClass’), true);
}
}

Css Bar chart changable according to database output

<?php include_once(‘checksession.php’); ?>
<span style=”color:white;float:right;”><a href=”logout.php”>Logout</a></span>
<?php
$userid = $_SESSION[‘id’];
$conn=mysql_connect(‘netinnovatus.com.mysql’,’netinnovatus_co’,’v4EYFZYC’);
mysql_select_db(‘netinnovatus_co’,$conn);
$result=mysql_query(“select * from ea_results where USER_ID='”.$userid.”‘”);
$res=mysql_fetch_assoc($result);

?>
<style>
.result
{
color:green;
}
.bargraph ul
{
list-style-type:none !important;
margin: 0px !important;
}
.label li {
height:25px !important;
font-size:9px !important;
}
.bargraph
{
width:55% !important;
}
</style>
<link href=’http://pics.cssbakery.com/pics/css/verticalbargraph.css&#8217; rel=’stylesheet’ type=’text/css’/>

<h1>
You scored:
</h1>
<div class=”bargraph” style= “width: 365px;”>
<ul class=”bars”>
<li class=”bar1″ style=”height: <?php echo $a=($res[‘magical’] *2) +1 ;?>%;”><?php echo $res[‘magical’] ;?></li>
<li class=”bar2″ style=”height: <?php echo $b=($res[‘logical’] *2 ) +1;?>%;”><?php echo $res[‘logical’] ;?></li>
<li class=”bar3″ style=”height: <?php echo $c=($res[‘critical’] *2)+1 ;?>%;”><?php echo $res[‘critical’] ;?></li>
<li class=”bar4″ style=”height: <?php echo $d=($res[‘agile’] *2) +1 ;?>%;”><?php echo $res[‘agile’] ;?></li>

</ul>
<ul class=”label”><li>Magical</li><li>Logical</li><li>Critical</li><li>agile</li></ul>
<ul class=”y-axis”><li>Max</li><li>30</li><li>20</li><li>10</li><li>0</li></ul>

</div>

parse json response from cakephp query and prepoulate the selectbox

$(document).ready(function(){
$(“#cat”).change(function(){
var subcatid = $(“#cat”).val();
$.ajax({
type: “POST”,
url: “webroot; ?>users/subcatfind”,
data: { id: subcatid},
success:function(data){
var sel = $(“#subc”);
sel.empty();
var jso=$.parseJSON(data);
for(i=0;i<= jso.length;i++){
sel.append('’+jso[i].Subcategorie.title+”);;
}
}

});

});
});