petjig
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Separate php page not working with php 8.1SOLVED! 🙂
Forum: Developing with WordPress
In reply to: Separate php page not working with php 8.1WOW! Thanks, threadi!
Simple as that!
I wish I knew this before ripping my hair out. I’ve googled hours after hours without finding such easy solution!
Again, thanks!
Forum: Developing with WordPress
In reply to: Separate php page not working with php 8.1Ah, of course. I understand that now when you mention it.
But how strange, that this worked before.Do you know if there is a way of integrate my separate php page so it “belongs” to wordpress environment? Some kind of header code on that page or like that?
I have the working “template page” but that is not really the way I want it, it feels like a provisional solution.Again, thank you for the answers!
Forum: Developing with WordPress
In reply to: Separate php page not working with php 8.1Thank you for the answer!
The error log of my hosting only show errors on “wordpress” pages, not on separate php pages (even if they are inside wp-content structure, uploaded with FTP). I don’t know why the hosting is not logging those. The hosting don’t have a cpanel, they have their own (bad) solution on site management.
The constant CBXPHPSPREADSHEET_ROOT_PATH exist, it’s part of a plugin. As I mentioned, it works in functions.php but not on separate php pages.
I managed to get it working by creating a template page on wordpress admin panel, but I still wonder why separate php page is only working with simple php codes like echo functions but NOT with file structure functions now… not even dirname(__FILE__) or other standard file structure functions are working, instead they breaks the execution, when it worked without a problem before I upgraded to php 8.1.