-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
How to use it with the plain psr-15? #1179
Comments
There's not much we can help you with without the |
Static:
Docker image
phpinfo() for static versionPHP Version => 8.3.13System => Linux krakow-arch 6.11.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 04 Oct 2024 21:51:11 +0000 x86_64 PHP API => 20230831 Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip This program makes use of the Zend Scripting Language Engine: Configuration bcmath BCMath support => enabled Directive => Local Value => Master Value Core PHP Version => 8.3.13 Directive => Local Value => Master Value ctype ctype functions => enabled curl cURL support => enabled Directive => Local Value => Master Value date date/time support => enabled Directive => Local Value => Master Value dom DOM/XML => enabled exif EXIF Support => enabled Directive => Local Value => Master Value fileinfo fileinfo support => enabled filter Input Validation and Filtering => enabled Directive => Local Value => Master Value gd GD Support => enabled Directive => Local Value => Master Value hash hash support => enabled MHASH support => Enabled iconv iconv support => enabled Directive => Local Value => Master Value intl Internationalization support => enabled Directive => Local Value => Master Value json json support => enabled libxml libXML support => active mbstring Multibyte Support => enabled mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1. Multibyte (japanese) regex support => enabled Directive => Local Value => Master Value mysqlnd mysqlnd => enabled openssl OpenSSL support => enabled Directive => Local Value => Master Value pcntl pcntl support => enabled pcre PCRE (Perl Compatible Regular Expressions) Support => enabled Directive => Local Value => Master Value PDO PDO support => enabled pdo_mysql PDO Driver for MySQL => enabled Directive => Local Value => Master Value pdo_sqlite PDO Driver for SQLite 3.x => enabled Phar Phar: PHP Archive support => enabled Phar based on pear/PHP_Archive, original concept by Davey Shafik. posix POSIX support => enabled random Version => 8.3.13 readline Readline Support => enabled Directive => Local Value => Master Value Reflection Reflection => enabled session Session Support => enabled Directive => Local Value => Master Value SimpleXML SimpleXML support => enabled sodium sodium support => enabled SPL SPL support => enabled sqlite3 SQLite3 support => enabled Directive => Local Value => Master Value standard Dynamic Library Support => enabled Directive => Local Value => Master Value tokenizer Tokenizer Support => enabled xdebug �[1m__ __ _ _ �[0mVersion => 3.3.2
Feature => Enabled/Disabled
Compressed File Support => yes (gzip) Directive => Local Value => Master Value xml XML Support => active xmlreader XMLReader => enabled xmlwriter XMLWriter => enabled zip Zip => enabled zlib ZLib Support => enabled Directive => Local Value => Master Value Additional Modules Module Name Environment edited PHP Variables Variable => Value I'm trying to run it with the |
Does it still crash without strict types? FWIW, there's no reason for strict types here (you aren't calling any functions with scalars), but that's beside the point. I'm just curious if that is the issue. |
No, commenting out the line with strict types makes it crash on the next meaningful row ( |
Can you try to increase the stack size (see the tip at the end of this page): https://frankenphp.dev/docs/compile/#using-xcaddy If this doesn't fix the issue, you likely have an infinite loop somewhere in your code. |
Yeah, it's the most obvious thought. But I don't see any loops in my code or autoloading rules. I've pushed my code. If you have time and will, please take a look at it. |
Am I reading the dockerfile correctly that you are using a non-zts build of php? I can't find |
Sorry for the confusion. This is a WIP project state, so this Dockerfile isn't relevant to what I'm trying to accomplish. I'm trying to run the FrankenPHP on my computer in the most direct way possible: env APP_RUNTIME=Runtime\\PsrGuzzle\\Runtime frankenphp php-server --worker ./src/index.php -v -a And this is how I get those errors I reported initially.
I believe this file is generated by the |
I don't believe anyone has built a pure PSR-15 worker script for FrankenPHP (I haven't searched for it, though). To use worker mode, you need a worker script: something to boot up your project before any requests start (if needed), and then call see: custom apps |
Then consider it a feature request. Adapting PSR-15 will make integration very easy for everyone. The current symfony runner support for Symfony-only is too specific. Making universal support for all runner runtimes would greatly expand the applicability of FrankenPHP. |
FrankenPHP is designed to be flexible and support any runtime you can imagine and isn't tied to Symfony or Laravel. As these are the two most popular PHP frameworks in the world, we have a lot of documentation helping people out with them. If you haven't already, I highly recommend checking out the documentation I shared earlier. It outlines how FrankenPHP is not limited to Symfony or Laravel but can work seamlessly with a variety of setups, including PSR-15. Let us know if you have specific questions after reviewing it—we’re happy to help! |
I can't make it running. I'm getting the error
While the line 2 is
declare(strict_types=1);
🙃I'm trying to run both on Linux native and in Docker.
The text was updated successfully, but these errors were encountered: