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

[BUG]: Route Handling Not Working on PHP 8.3 #16510

Open
kgrammer opened this issue Jan 12, 2024 · 6 comments
Open

[BUG]: Route Handling Not Working on PHP 8.3 #16510

kgrammer opened this issue Jan 12, 2024 · 6 comments
Labels
bug A bug report status: unverified Unverified

Comments

@kgrammer
Copy link

kgrammer commented Jan 12, 2024

Describe the bug
When updating to PHP 8.3, routes that worked fine on PHP 8.2 no longer work.

I have been able to verify the issue by running the "Hello/Sign Up" tutorial code. When run on PHP 8.2, the tutorial code works as expected. When the tutorial code is run on PHP 8.3, the hello page is replaced with a 503 error screen. This failure screen can be seen at pt.bucketlynx.com.

To Reproduce
Install and execute the hello/sign up tutorial code on a PHP 8.3 server.

Expected behavior
The expected behavior for the routes to function corrected as they functioned on PHP 8.3. For the tutorial, it should display the "Hello" page with the name and email input fields, then allow input. That input should be added to the tutorial's database and on the Hello screen.

Details

  • Phalcon version: Tested in both Phalcon 5.5.0 and 5.6.0 with same results
  • PHP Version: 8.3.1
  • Operating System: Ubuntu 22.04
  • Installation type: Compiled from source
  • Zephir version (if any): 0.17.0[PHP Modules]
  • Server: Apache 2.4.58
  • Other related info (Database, table schema): MySQL 8.0.35

[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
phalcon
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlwriter
xsl
yaml
Zend OPcache
zephir_parser
zip
zlib

[Zend Modules]
Zend OPcache

There Apache log file only shows:

The error log file shows:

[Fri Jan 12 11:44:37.439855 2024] AH01067: Failed to read FastCGI header
[Fri Jan 12 11:44:37.439903 2024] AH01075: Error dispatching request to :
[Fri Jan 12 11:44:37.482477 2024] AH01067: Failed to read FastCGI header, referer https://pt.bucketlynx.com/
[Fri Jan 12 11:44:37.482510 2024] AH01075: Error dispatching request to : , referer https://pt.bucketlynx.com/

@kgrammer kgrammer added bug A bug report status: unverified Unverified labels Jan 12, 2024
@kgrammer
Copy link
Author

Noted the following errors in the /var/log/php8.3-fpm.log file:

[12-Jan-2024 11:52:51] WARNING: [pool pt] child 66026 exited with code 127 after 0.007247 seconds from start
[12-Jan-2024 11:52:51] NOTICE: [pool pt] child 66027 started
[12-Jan-2024 11:52:51] WARNING: [pool pt] child 66027 exited with code 127 after 0.048859 seconds from start
[12-Jan-2024 11:52:51] NOTICE: [pool pt] child 66028 started

@kgrammer
Copy link
Author

I edited the Tutorial file IndexController.php and commented out " $this->view->users = Users::find();" line and the page loads.

Of course this means that the database records are not loaded, but the route isn't broken now so the "Hello" page is loading. I'm not getting the 127 errors above in php8.3-fpm.log either.

I then edited Users.php and added:

public function initialize(){
    error_log('***** initialize called *****' . PHP_EOL);
}

That code is not firing. This implies that the Users.php model is not being properly loaded which is, of coutrse, supported by the fact that when I comment out the find() call, the page loads.

@kgrammer
Copy link
Author

It's worth noting that when I commented out the find(), and the register page is displayed, when I enter the name and email address, they ARE being added to the database table. So the save() is working as expected.

@niden
Copy link
Sponsor Member

niden commented Jan 13, 2024

@kgrammer If you do not use the model and find() and say you use the builder, do you see the same results? I am trying to reproduce this here on my local but am not having much success. There are warnings in the logs from the dynamic properties but that is it.

@kgrammer
Copy link
Author

kgrammer commented Jan 13, 2024

@niden Are you referring to the query builder? If so, no... I haven't tried that because I have a LOT of code across a half dozen products and I can't change away from find() at this point.

My first assumption is that some exec command in the Phalcon code that was OK in PHP 8.2 is missing or was moved after the PHP 8.3 update. This assumption is based in the 127 errors being logged in the php8.3-fpm log file.

@kgrammer
Copy link
Author

kgrammer commented Jan 15, 2024

@niden and I worked on the issue this evening and determined that the PECL build method works, but there is an issue with the compile build method. When building using the compile method, I have the problem.

@niden is going to rebuild Phalcon on his test system using the compile build method to confirm my findings.

If confirmed, this would mean the compile build method now has a new problem that wasn't present when building for PHP 8.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: unverified Unverified
Projects
None yet
Development

No branches or pull requests

2 participants