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

"Could not create paste: server error or not responding" [solved] #43

Closed
k0nsl opened this issue Jul 18, 2016 · 12 comments
Closed

"Could not create paste: server error or not responding" [solved] #43

k0nsl opened this issue Jul 18, 2016 · 12 comments
Assignees
Labels

Comments

@k0nsl
Copy link
Contributor

k0nsl commented Jul 18, 2016

I am pulling the latest code from the repo and with only minor changes. But I tried to revert most of them and I cannot get this issue out of the way, even if I use jquery-1.11.3. It simply doesn't matter in this case, it appears. Yet it seems to be indicating some sort of issue with jQuery.

Error:
Could not create paste: server error or not responding

The only thing I see in the Chrome developer console is the following:
alt text

I switched from PHP7 to PHP5.6 in lieu of #42 .

@elrido
Copy link
Contributor

elrido commented Jul 18, 2016

Can you send us the error message found in your webserver / PHP log? Are you using privatebin_db or privatebin_data model? If the latter: Is your data directory writable?

@k0nsl
Copy link
Contributor Author

k0nsl commented Jul 18, 2016

It's the latter and yes the data directory is writable. I actually had the project running fine for a week or so until I pulled some of the new code from the repo today.
This is the most recent entries in the error log:

[18-Jul-2016 10:01:17 UTC] PHP Fatal error:  Uncaught Error: Class 'RainTPL' not found in /home2/zerobin01/public_html/lib/privatebin.php:425
Stack trace:
#0 /home2/zerobin01/public_html/lib/privatebin.php(154): privatebin->_view()
#1 /home2/zerobin01/public_html/index.php(16): privatebin->__construct()
#2 {main}
  thrown in /home2/zerobin01/public_html/lib/privatebin.php on line 425
[18-Jul-2016 10:06:22 UTC] PHP Fatal error:  Class 'RainTPL' not found in /home2/zerobin01/public_html/lib/privatebin.php on line 425
[18-Jul-2016 10:08:35 UTC] PHP Fatal error:  Class 'purgelimiter' not found in /home2/zerobin01/public_html/lib/model.php on line 65

@elrido
Copy link
Contributor

elrido commented Jul 18, 2016

Are the files RainTPL.php and purgelimiter.php readable in the lib folder? The error indicates, that these classes weren't loaded.

@k0nsl
Copy link
Contributor Author

k0nsl commented Jul 18, 2016

@elrido: yes, they are readable and owned by the correct user.

@k0nsl
Copy link
Contributor Author

k0nsl commented Jul 18, 2016

Now I am getting further:

[18-Jul-2016 13:58:10 UTC] PHP Warning:  forward_static_call() expects parameter 1 to be a valid callback, class 'privatebin_data' not found in /home2/zerobin01/public_html/lib/model.php on line 84
[18-Jul-2016 13:58:10 UTC] PHP Catchable fatal error:  Argument 2 passed to model_abstract::__construct() must be an instance of zerobin_abstract, null given, called in /home2/zerobin01/public_html/lib/model.php on line 84
[18-Jul-2016 14:00:07 UTC] PHP Warning:  forward_static_call() expects parameter 1 to be a valid callback, class 'privatebin_data' not found in /home2/zerobin01/public_html/lib/model.php on line 84
[18-Jul-2016 14:00:07 UTC] PHP Catchable fatal error:  Argument 2 passed to model_abstract::__construct() must be an instance of zerobin_abstract, null given, called in /home2/zerobin01/public_html/lib/model.php on line 53 and defined in in /home2/zerobin01/public_html/lib/model/abstract.php on line 60

@elrido
Copy link
Contributor

elrido commented Jul 18, 2016

Sorry, then I am at a loss. :-(

I can't reproduce your issue on my test instance with PHP 5.6 and all the unit tests on PHP 7 indicate it is working, too. You need to figure out why these two files aren't included.

[...] instance of zerobin_abstract [...]

This would indicate, that the wrong class is loaded. Is the folder lib/zerobin still around? If yes, please delete it.

@k0nsl
Copy link
Contributor Author

k0nsl commented Jul 18, 2016

Does the error log posted just before your response help?

@k0nsl
Copy link
Contributor Author

k0nsl commented Jul 18, 2016

I "solved" it by deleting all the RainTPL functions in my template, as I don't really need those anyway.

It's working fine now!

Test: https://p.k0nsl.org/

😁

@k0nsl
Copy link
Contributor Author

k0nsl commented Jul 18, 2016

The only thing which is seemingly not working is the syntax highlighting:

https://p.k0nsl.org/?a1c9b8da18108e52#P7xJafjtMZ73XAmmpteNEPLE8ZxPPiFiX1ryte3zgY0=

@k0nsl
Copy link
Contributor Author

k0nsl commented Jul 18, 2016

Sorry for the flood of comments. I just wanted to say that I had to disable syntax highlighting as it would actually parse both HTML and PHP which made it very dangerous. I don't understand how that could be possible.

[UPPDATE: I have managed to get syntax highlighting to nominally work; it only works if you omit any opening and closing tags, etc,.
For example, a paste cannot include <?php somecode ?>, it can only be somecode. The same is true for HTML.
Here is an example paste: https://p.k0nsl.org/?4f43ed2e255f6eeb#FJpr4lnSj6hZJm+e31Jg/fY0jkm9OkspjTRHH2SxM/8=
At any rate, it appears I'm "getting somewhere" at last ;)

@elrido elrido self-assigned this Jul 19, 2016
@elrido elrido added the bug label Jul 19, 2016
@elrido
Copy link
Contributor

elrido commented Jul 19, 2016

The HTML encoding issue was recently introduced with the preview feature (#4).

@elrido elrido closed this as completed in 97ed1a5 Jul 19, 2016
@k0nsl k0nsl changed the title "Could not create paste: server error or not responding" "Could not create paste: server error or not responding" [solved] Jul 19, 2016
@rugk
Copy link
Member

rugk commented Jul 19, 2016

@k0nsl Just FYI: It is not necessary to change the title when an issue is solved. We already close issues when they are resolved. 😃

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

No branches or pull requests

3 participants