phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.78k stars 1.96k forks source link

Unable to locate package php5-phalcon #16148

Closed steveobbayi closed 1 year ago

steveobbayi commented 1 year ago

I'm using Ubuntu 20.04 with PHP 7.4, 8.0, and 8.1. I already have Phalcon 4 installed without issues on PHP 7.4. I now want to install PHP 5 but after following these instructions:

https://docs.phalcon.io/5.0/en/installation

I get the error: unable to locate package php-phalcon5

How does one install Phalcon 5 successfully

niden commented 1 year ago

Does this command work? (installing from pecl)

pecl install phalcon-5.0.3

If you are not using pecl what are you using as repository?

steveobbayi commented 1 year ago

When using apt-get I used the ppa:ondrej/php repository

When using pecl I get the following error:

PHP Fatal error: Uncaught Error: Call to undefined function _parseFeaturesHeaderFile() in /usr/share/php/OS/Guess.php:248 Stack trace:

0 /usr/share/php/OS/Guess.php(214): OS_Guess->_readGlibCVersionFromFeaturesHeaderFile()

1 /usr/share/php/OS/Guess.php(148): OS_Guess->_detectGlibcVersion()

2 /usr/share/php/OS/Guess.php(107): OS_Guess->parseSignature()

3 /usr/share/php/PEAR/Dependency2.php(109): OS_Guess->__construct()

4 /usr/share/php/PEAR/Downloader.php(277): PEAR_Dependency2->__construct()

5 /usr/share/php/PEAR/Downloader.php(556): PEAR_Downloader->getDependency2Object()

6 /usr/share/php/PEAR/Downloader.php(458): PEAR_Downloader->analyzeDependencies()

7 /usr/share/php/PEAR/Command/Install.php(671): PEAR_Downloader->download()

8 /usr/share/php/PEAR/Command/Common.php(270): PEAR_Command_Install->doInstall()

9 /usr/share/php/pearcmd.php(310): PEAR_Command_Common->run()

10 /usr/share/php/peclcmd.php(32): require_once('...')

11 {main}

thrown in /usr/share/php/OS/Guess.php on line 248

niden commented 1 year ago

I do not see the phalcon5 package in ondrej's repository:

https://launchpad.net/~ondrej/+archive/ubuntu/php/+index?batch=75&memo=75&start=75

He probably has not updated it.

As for the pear package it should work just fine - I have used it extensively for a few months now (since the first alpha actually)

php -m should show you the list of modules after you install Phalcon. phalcon should be listed there. php -r "echo (new Phalcon\Support\Version())->get();" should output 5.0.3 (or whichever version you installed)

If the above are correct then the installation is OK.

For the stack trace you posted, I have no idea where the _parseFeaturesHeaderFile() comes from. It is certainly not in Phalcon most likely in PECL itself.

Make sure you have a proper installation of PEAR and then you can run the pecl command to install Phalcon.

steveobbayi commented 1 year ago

Ok I will share the Stack trace with the pear team.

As for Phalcon I guess I'm stuck with phalcon 4 for now as php7.4 -m has Phalcon 4 installed. On my server php -m defaults to php 8.1 so the above command will not help in this situation.

steveobbayi commented 1 year ago

I did a bit of digging and found in addition to the instructions in the docs related to Pecl install, one needs to install php-dev on the production server

Jeckerson commented 1 year ago

Closing, this is not related to Phalcon.

Suggestion: Use Docker or Ansible to improve deployment process.