Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple issue during install - is script still up to date ? #42

Open
hycday opened this issue Mar 27, 2017 · 4 comments
Open

Multiple issue during install - is script still up to date ? #42

hycday opened this issue Mar 27, 2017 · 4 comments

Comments

@hycday
Copy link

hycday commented Mar 27, 2017

While trying to install the script, I first unzipped the content, without making any changes.
Opened http://yoursite.com/ajax.php?test/test and got a first error :

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ajax has a deprecated constructor in www\cjax\cjax\ajax.php on line 40

So I changed the line to : function __construct($controller)

and also opened file cjax/config.default.php and renamed it to config.php and changing the line below:
$config->js_path = '/cjax/cjax/core/js/';

And now :
if I open the post.php example, I get the following errors:

cjax.js:4215 Refused to set unsafe header "Content-length"
cjax.js:4220 Refused to set unsafe header "Connection"

if I open the send_form.php example, I get the following error :
/cjax/cjax/core/js/cjax.js.php?preload=0.7793850871390129:1 Uncaught SyntaxError: Unexpected token <

etc.

so I am wondering :
1- is the script still up to date in terms of security and PHP guidelines ?
2- what changes are needed in order to make it work ?

thanks a lot for your time ! I really think it's a powerfull framework looking at the examples !

@ajaxboy
Copy link
Owner

ajaxboy commented Mar 28, 2017

What version of PHP are you using? seems the issue you are having are pretty cosmetic, a small change here or there should get you going.

@hycday
Copy link
Author

hycday commented Mar 28, 2017

thank you for your answer. I am using PHP/7.0.10, I made it work using CJAX 6 beta 3.
You work is trully amazing, love how simple, fluid and clean the resulting pages are.

Still getting these errors sometimes, do you have any idea on how to solve it :

cjax-6.0.min.js:3 Refused to set unsafe header "Content-length"
cjax-6.0.min.js:3 Refused to set unsafe header "Connection"

@ajaxboy
Copy link
Owner

ajaxboy commented Mar 28, 2017

CJAX 6 is actually based on an older version of Cjax.. which omits some of the latest updates and internal refactoring. Although it has better support for namespaces and newer syntax, I would recommend you start with RC9, which has the latest refactoring and updates, and is primed for changes even though it lacks namespaces (currently) but eventually it maybe refactored to latest syntax.

cjax-6.0.min.js:3 Refused to set unsafe header "Content-length"
cjax-6.0.min.js:3 Refused to set unsafe header "Connection"

This normally means you are using a full url to do the ajax requests, a relative url is generally used for ajax request to avoid these browser errors, though otherwise is not much of a concern

/cjax/cjax/core/js/cjax.js.php?preload=0.7793850871390129:1 Uncaught SyntaxError: Unexpected token <
This is a major error, and will probably produce major halts on Cjax , I would recommend you start with RC9. Since I don't currently offer support for 6.0. You have to see the console, and view the file output to see what the actual source of the this file is to investigate the error further

@HallofFamer
Copy link
Contributor

HallofFamer commented Mar 31, 2017

Are you sure you are using CJAX 6.0 Beta? I believe CJAX 6 does not have PHP 4 style constructor, this was one of the changes I made with the old CJAX 5.8 code a long time ago. If you got the constructor error, it is unlikely to be CJAX 6's fault.

Anyway, its not recommended to use CJAX 6 in production environment yet as it is still in beta. CJ(@ajaxboy) made some changes and released CJAX 5.9, I havent had time to keep CJAX 6.0 in sync with his CJAX 5.9. For this reason, bugs and issues fixed since CJAX 5.9 aint available in CJAX 6.0 yet.

Use CJAX 5.9 for now, check back a few months later for CJAX 6.0 when I am have more time to kill and develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants