Jump to content

Some pages work, others don't


renegades

Recommended Posts

What is behind the idea that some pages work while others don't (in admin)?

That is on a clean install without any, Zero, alterations done yet.

E.g.: Design>Theme & Logo, or:

         Catalog>Categories, Catalog>Attributes & Features, etc.

While other pages under the same item work, like e.g.: Catalog>Products, etc.

Albeit, and given the above said, it doesn't make sense anyway that this should have to do with file permissions, I went ahead and checked file permissions manually but gave up after 10 minutes, realising I could be on there for the next two days, considering the number of folders/files. I still used the terminal command to set files to 644 and folders to 755 (one never knows what craziness is hidden in the code) but it's still the same. I either get a internal server error or a 500 error page. Something with a missing token. Right?!

Edited by renegades (see edit history)
Link to comment
Share on other sites

Clean install of which Prestashop version ? Which php-version are you using ?

Activate debug mode, and read possible errors. Read also server error logs.

Seems that your server/server settings are not compatible with Prestashop.

https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/

https://www.prestashop.com/forums/topic/884856-best-server-settings-for-prestashop-17-tested-in-production/

https://www.prestashop.com/forums/topic/884855-best-server-settings-for-prestashop-16-tested-in-production/

The error missing token is due to missing/not configured tokenizer on server, or your site (database) is an upgrade of older Prestashop version ?

You are running on nginx ?

 

Link to comment
Share on other sites

8 minutes ago, selectshop.at said:

Clean install of which Prestashop version ? Which php-version are you using ?

Activate debug mode, and read possible errors. Read also server error logs.

Seems that your server/server settings are not compatible with Prestashop.

https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/

https://www.prestashop.com/forums/topic/884856-best-server-settings-for-prestashop-17-tested-in-production/

https://www.prestashop.com/forums/topic/884855-best-server-settings-for-prestashop-16-tested-in-production/

 

Not Compatible?
Why then could I achieve a clean install and WHY then - under settings - does it say all requirements are met?

Funny

Link to comment
Share on other sites

19 minutes ago, joseantgv said:

Turn on errors

 

That's what I get when with a page which doesn't open but throws an error.

----

(1/1) ContextErrorException

Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/cpanel/php/sessions/ea-php72) failed: Permission denied (13)

in StrictSessionHandler.php line 101

at StrictSessionHandler->gc(1440)

in SessionHandlerProxy.php line 83

at SessionHandlerProxy->gc(1440)

at session_start()

in NativeSessionStorage.php line 145

at NativeSessionStorage->start()

in NativeSessionStorage.php line 295

at NativeSessionStorage->getBag('attributes')

in Session.php line 258

at Session->getBag('attributes')

in Session.php line 280

at Session->getAttributeBag()

in Session.php line 73

at Session->get('_security_main')

in ContextListener.php line 89

at ContextListener->handle(object(GetResponseEvent))

in WrappedListener.php line 46

at WrappedListener->handle(object(GetResponseEvent))

in TraceableFirewallListener.php line 35

at TraceableFirewallListener->handleRequest(object(GetResponseEvent), object(Generator))

in Firewall.php line 84

at Firewall->onKernelRequest(object(GetResponseEvent))

in FirewallListener.php line 48

at FirewallListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))

in WrappedListener.php line 115

at WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))

in EventDispatcher.php line 212

at EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(GetResponseEvent))

in EventDispatcher.php line 44

at EventDispatcher->dispatch('kernel.request', object(GetResponseEvent))

in TraceableEventDispatcher.php line 143

at TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent))

in HttpKernel.php line 127

at HttpKernel->handleRaw(object(Request), 1)

in HttpKernel.php line 68

at HttpKernel->handle(object(Request), 1, false)

in Kernel.php line 200

at Kernel->handle(object(Request), 1, false)

in index.php line 86

 

 

 

 

Notice on line 101 in file /home/jujueau/shop.jujue.com.au/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php

[8] SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/cpanel/php/sessions/ea-php72) failed: Permission denied (13)

Link to comment
Share on other sites

6 minutes ago, renegades said:

Not Compatible?
Why then could I achieve a clean install and WHY then - under settings - does it say all requirements are met?

When you install Prestashop only checks some needed things for the install, but others you need to correct on server settings, if not working. The error you are having is exact this. Your server is not managing automatically permissions. You should correct this, or set permissions manually.

This same error was discussed several times here. It is a server setting one/i.e. cPanel problem. I will search for you for the debug solution.

Link to comment
Share on other sites

1 minute ago, selectshop.at said:

Your server is not managing automatically permissions.

What permissions are you referring to, CHMOD? Is all set correct. Apart from that, if Prestashop only checks for some needed things for the install, why doesn't it tell me what it really needs to RUN. I have no magic wand that could tell me what is needed? 😉

 

Link to comment
Share on other sites

1 minute ago, renegades said:

Apart from that, if Prestashop only checks for some needed things for the install, why doesn't it tell me what it really needs to RUN. I have no magic wand that could tell me what is needed?

As I said before: Prestashop checks min. requirements needed, not server settings done. You are using cPanel. It's a cPanel problem, not a Prestashop problem. Root servers (dedicated servers) with SSH administration for ex. will never have this problem, cause you need to set your server by yourself and don't let a software like cPanel or Plesk do it for you.

Link to comment
Share on other sites

25 minutes ago, renegades said:

I run on ea-php72. 56 didn't allow me to install (latest version)

 

The server you are running was initially installed with a php 5.6. package (coming with the OS you are using Debian/Ubuntu, etc.). Other php-versions you can install afterwards. So what happens: The server was configured initially with an older, now end of life php version. This means that you need to correct the initial old server settings for to run newer php-versions as well.

Link to comment
Share on other sites

26 minutes ago, selectshop.at said:

The server you are running was initially installed with a php 5.6. package (coming with the OS you are using Debian/Ubuntu, etc.). Other php-versions you can install afterwards. So what happens: The server was configured initially with an older, now end of life php version. This means that you need to correct the initial old server settings for to run newer php-versions as well.

Been all done ages ago already since I ran several sites on my server. Some need 56, other need 72 and in WHM I can choose which php version to use for what site. Since I initially started to load Prestashop under 56 and it wouldn't even go ahead with installation I changed to php version 72 and installation went OK.

Link to comment
Share on other sites

Again: Prestashop install does not check server settings, only needed OS modules. Take an upgraded hosting package for to run latest Prestashop versions. The mix of old technique, with newer technique you will not manage. Other possibility is to upgrade all other sites using 5.6. also for to run with php 7.2. php 5.x series are completely remodeled. You cannot compare with newer php 7.x series.

Link to comment
Share on other sites

4 minutes ago, renegades said:

That being said, it would still be nice from Prestashop to tell what PHP extensions it actually needs. That way I could easy setup a special Prestashop PHP profile to use on that site I have Prestashop installed.

You can check that on first link I added to one of my previous posts.

https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/

And of course php 5.6. is not 5.6. Latest 5.6. series versions are closer to php 7. series. If you run for ex. php 5.6.0 or 5.6.1 as default it's not the same as php 5.6.40.

Link to comment
Share on other sites

3 minutes ago, renegades said:

I have my own root access on my server. If I hear you right you suggest me to get a shared hosting account for running Prestashop?

No, never suggested this. Root is always better than shared hosting. If you are on root server, then you should be able to manage your problem with cPanel and the post I linked before.

Link to comment
Share on other sites

3 minutes ago, selectshop.at said:

No, never suggested this. Root is always better than shared hosting. If you are on root server, then you should be able to manage your problem with cPanel and the post I linked before.

Will go through it now. Did Prestashop packae include the phppsinfo.php? I don't see it in the package.

Link to comment
Share on other sites

OK,

so I fixed all PHP configuration and extension issues and the phppsinfo file gives me all green light but I still encounter the same problems.

Apart from that, in the backend I also get still an error popup saying:

Quote

Notice on line 101 in file /.../vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php

[8] SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/cpanel/php/sessions/ea-php72) failed: Permission denied (13)

Not sure where the permission denial comes from, neither. I need another towel to wipe my sweat off.

Link to comment
Share on other sites

Ask for support of cPanel. As I told before this is a cPanel issue and not a Prestashop one. cPanel is not correctly delivering the services on your server, which Prestashop are in need of. Perhaps other applications do not need correct service dispatching, but Prestashop does need it for to work properly. Prestashop's code is strict and does not allow wrong configuration.

Link to comment
Share on other sites

1 hour ago, selectshop.at said:

Ask for support of cPanel. As I told before this is a cPanel issue and not a Prestashop one. cPanel is not correctly delivering the services on your server, which Prestashop are in need of. Perhaps other applications do not need correct service dispatching, but Prestashop does need it for to work properly. Prestashop's code is strict and does not allow wrong configuration.

I understand that and appreciate your input on that. Though, having had previous 'exciting' cPanel experiences I won't cry out the devil but I can already see both of them pointing at each other (host v.s. cpanel) and knowing cpanel team's arrogance I won't expect too much. Lol.

Link to comment
Share on other sites

Hello again.

OK, so here is the end result:

! 1 [one]

editing the php.ini didn't effect anything on the server. Hence, I went ahead and used WHM' php ini editor and these are the values I had to set it to, to get Prestashop working without throwing any errors. Well, so far, at least, after having checked some (not all) of the pages which threw me the errors. You may want to keep this as reference for anyone after me running into the same problems. BTW, changing the session.save_path to '/tmp' didn't do anything.

Though, take note of the "Note" below! Since I have Prestashop installed on a sub-domain, e.g.: www.presta.mydomain.com, I am not sure what Prestashop's doing now and if it's collecting the garbage at all. (Any ideas on that?)

Here my changes on the server side .ini file:

Quote

; Defines the probability that the 'garbage collection' process is started
; on every session initialization. The probability is calculated by using
; gc_probability/gc_divisor. Where session.gc_probability is the numerator
; and gc_divisor is the denominator in the equation. Setting this value to 1
; when the session.gc_divisor value is 100 will give you approximately a 1% chance
; the gc will run on any give request.
; Default Value: 1
; Development Value: 1
; Production Value: 1
; http://php.net/session.gc-probability
session.gc_probability = 1

; Defines the probability that the 'garbage collection' process is started on every
; session initialization. The probability is calculated by using the following equation:
; gc_probability/gc_divisor. Where session.gc_probability is the numerator and
; session.gc_divisor is the denominator in the equation. Setting this value to 1
; when the session.gc_divisor value is 100 will give you approximately a 1% chance
; the gc will run on any give request. Increasing this value to 1000 will give you
; a 0.1% chance the gc will run on any give request. For high volume production servers,
; this is a more efficient approach.
; Default Value: 100
; Development Value: 1000
; Production Value: 1000
; http://php.net/session.gc-divisor
session.gc_divisor = 1000

; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
; http://php.net/session.gc-maxlifetime
session.gc_maxlifetime = 1440

; NOTE: If you are using the subdirectory option for storing session files
;       (see session.save_path above), then garbage collection does *not*
;       happen automatically.  You will need to do your own garbage
;       collection through a shell script, cron entry, or some other method.
;       For example, the following script would is the equivalent of
;       setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
;          find /path/to/sessions -cmin +24 -type f | xargs rm

Interesting here is to know the most important of the three: 'session.gc_divisor'

Setting the value to just Anything lower than 1000, speak 100, 10, even 1, would still result in Prestashop throwing still errors (for as low as value 1-10. 10-100 will get rid of the error but the pages still won't show, instead throw a 500 error. Only when I went ahead and chose 1000, THAT did it!.

Hm, ...scratching my head.

'

Edited by renegades
added content (see edit history)
Link to comment
Share on other sites

Well well, what can I say.

Since all pages in admin display, I looked forward to working in it and setting up my shop but i run from one issue into another. If I address them all (would need to or else just drop Prestashop because it appears WAY TOO bugged), then I'd need to open dozens and dozens of posts here.

Oh Yes, Definitely and for Sure, I looked up other posts with similar issues I am facing now inside admin and during populating my shop (or at least try to), all to no avail.

What shall I do?

Cheers

Link to comment
Share on other sites

You took into consideration to downgrade the Prestashop version to 1.6. ? In this case you need to install all again, because Prestashop is not downgradable if you did not upgrade it via 1-click-module before. The 1-click-module makes rollback copies. PS 1.6., although not supported anymore, is nearly bug free and also not so tricky with server settings, or special server settings needed.

Link to comment
Share on other sites

31 minutes ago, selectshop.at said:

You took into consideration to downgrade the Prestashop version to 1.6. ? 

I hear you, and yes, I actually thought about it, although not all the way back to 1. 6 but 1 7.2 perhaps? 

If I also hear what I think I hear, ;-), you agree that this very latest version is still cooking for a couple hours and might not be ready for today's dinner?

Link to comment
Share on other sites

To be honest: no one of my customers is using PS 1.7. I'm only running it as for development purposes, but no one as a live shop. Not only the bugs of PS 1.7. are the reason for that, but PS 1.6. has several extras included for free, which were removed from PS 1.7. and are only available as a paid version, or removed at all. It's not what my customers want...

Link to comment
Share on other sites

You can download older versions on same link. https://www.prestashop.com/en/download

grafik.png.9e70e13b77f974a08844ab22f41c2fa3.png

or direct link: https://www.prestashop.com/en/previous-versions

Prestashop is hiding older versions on this site, simply hit the chevron down and you will come to the older versions.

grafik.thumb.png.43ab1a8031fdf91ef06402a4fc5250fe.png

Take latest 1.6.1.24

If you already populated your database with products, you can export them from PS1.7. and import them in PS 1.6. via csv as by the same way.

Link to comment
Share on other sites

11 minutes ago, selectshop.at said:

You can download older versions on same link. https://www.prestashop.com/en/download

grafik.png.9e70e13b77f974a08844ab22f41c2fa3.png

or direct link: https://www.prestashop.com/en/previous-versions

Prestashop is hiding older versions on this site, simply hit the chevron down and you will come to the older versions.

grafik.thumb.png.43ab1a8031fdf91ef06402a4fc5250fe.png

Take latest 1.6.1.24

If you already populated your database with products, you can export them from PS1.7. and import them in PS 1.6. via csv as by the same way.

Nope, still empty (complete new shop), that'll make it easier.

Thanks for the hint. I'll give that a go, let you know.

Hm, appears Prestashop has taken off all 1.6 versions now from this page https://www.prestashop.com/en/previous-versions

 

 

Link to comment
Share on other sites

It's my first time I deal with Prestashop and whole thing is really super super sensitive. Appears to me almost one would need a server specifically set up to run Prestashop. Installed opencart again and am already working in it (took me 2 minutes to setup). Really wondering whethere it's really worth spending all that time on getting Prestashop just going, let alone their 1.7 version (with ridiculously expensive modules to be added just to have a half way decent shop and then it is ploughed with bugs, still. For that I can get an entire shop written in Ruby using Spree and am in control. 🙄)

Link to comment
Share on other sites

LOL

Getting another error now:

Quote

SQL error on query Tablespace for table '`____`.`cart_rule_lang`' exists. Please DISCARD the tablespace before IMPORT.

This thing is ridiculous. Prestashop needs to have a 100% Fit SetUp of both server and mysql but it wouldn't tell you all the parameters so you could set them all beforehand and SAVE TIME. This is too much. Forget Prestashop. That's what I do now. I simply can't entertain this kind of developer arrogance (almost looks like they teamed up with some developers from the WP camp 😉 )

Nah, seriously, a platform that sensitive and yet with Zero information about what they require (as mentioned before), it's not worth the time and time I spent far toooooo much on that crap, already. Astalavista Presta.

Link to comment
Share on other sites

6 hours ago, renegades said:

Creation of DB fails, got the error:  SQL error on query Got error -1 from storage engine

Any quick idea on that?

Storage engine should be: InnoDB with PDO driver. Seems you are having orphaned table files in your database. You should discard this table.

Which collation are you using ? It should be utf8_general_ci

5 hours ago, renegades said:

Astalavista Presta.

Pity to hear this, but I understand.

Link to comment
Share on other sites

5 hours ago, selectshop.at said:

Storage engine should be: InnoDB with PDO driver. ...

Not sure why my reply to the above was deleted but perhaps it's to do with me questioning the abandoned tables on a clean install, downloaded from the Prestashop download page. 🙄

Quote

Pity to hear this, but I understand

Well, perhaps my reply gets deleted, again but I pity I want to agree with the pity. I pity Prestashop. If developers would just take it a little more serious, people wouldn't get frustrated over simple things not working and wasting time trying to find a solution. I spend almost a week now tried several installs and couldn't eve get started yet. I mean seriously? Can one make it a more complicated still? Yep, pity on Prestashop, indeed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...