We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

First conntact

In the installation procedure there is: curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | sudo bash

I've found in Internet that | sudo bash is potentially dangerous. Can anybody explain me how save/dangerous is above curl... | sudo bash instruction? Is there any other save way to install Falcon on my localhost for testing? Regards Greg



85.5k

the readme here https://github.com/phalcon/cphalcon does offers multiple ways of installing phalcon



537
edited Mar '17

Thank You IZO for the help, I'm after:

Build complete. Don't forget to run 'make test'.

Installing shared extensions: /usr/lib/php5/20121212/ Installing header files: /usr/include/php5/

Thanks for compiling Phalcon! Build succeed: Please restart your web server to complete the installation

[email protected] ~/cphalcon/build $ make test make: *** No rule to make target `test'. Stop.

[email protected] ~/cphalcon/build $

How to perform: make test?

Where can I find: php.ini to add extension=phalcon.so ?

Where is the RootDirecrory for Apache2 web server ?

Regards Greg



43.9k
edited Mar '17

Hi and welcome,

Ok, you can skip the test phase and go ahead to configure php correctly to load phalcon extension (in the terminal type php -m you will have a list of already loaded modules).

looks like you are running a linux box. Depending on the distribution you use and the php version that is installed, go to /etc/php/php7 or /etc/php5 or something like that (ok, it seems that you have php5)

you should find there a cli (for calling php from the command line. It will be usefull if you plan to use phalcon developer tools) and an apache2 directories.

Once again, depending of your distribution, in each directory,

  • you will find a php.ini file. Try to load phalcon from there: at the end of each php.ini put extension=phalcon.so and restart webserver Then see with php -m if phalcon is loaded
  • maybe there is also a conf.d directory if solution above didn't work, then create a 60-plphalcon.ini file where you will put extension=phalcon.so in it and restart webserver


537

Thank You LE51, if I read "Build complete. Don't forget to run 'make test'." then I try to test. Could You help me with testing instead skipping tests? I use Ubuntu/Mint17.3 PHP5. I look for the best PHP framework for me. Not too sophisticated not too simple. Is it possible with PHALCON that "if solution above didn't work"? I prefer the solid solution, not try this way, try another... What path should I set in apache2.conf? How to start with "hello world" skeleton application? Regards Greg



43.9k

Do you know exactly what these tests are used for and what testing software environment you have to use ? If no, then google (or any other) may be your friend.

But, if you have used the latest stable phalcon version, it should be ok, framework will work without any test if you configure php to load the phalcon extension ....

good luck



537

bad luck - until now. [email protected] ~/cphalcon/build $ php -m PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/phalcon.so' - /usr/lib/php5/20121212/phalcon.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0

So, extension is not loaded. Still don't know what directowy set in apache2.conf



43.9k

you have tried to load phalcon in php.ini, it doesn't work so try the second alternative ...



537

Tried both. extension=phalcon.so is in /etc/php5/apache2/confd.d/60-plphalcon.ini What and how shall I try? Woul'd You like to write me the path in apache2.conf <Directory /.... ???



43.9k

https://docs.phalcon.io/en/latest/reference/apache.html

and on common linux boxes you'll find that in /etc/apache2 in sites-available directory



43.9k
edited Mar '17

ok, if you still have the same error regarding "php_pdo_get_dbhce", maybe you haven't php pdo extension installed

php -m|grep pdo

this has nothing to do with apache conf



85.5k

phalcon extension should be loaded with higher priority than the pdo, pdo is 30 by default ( i think ) so load the phalcon with 50



537

Prioryty raised to 50

[email protected] ~/cphalcon/build $ php -m | grep pdo PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/phalcon.so' - /usr/lib/php5/20121212/phalcon.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0 PHP Warning: Module 'phalcon' already loaded in Unknown on line 0 pdo_mysql [email protected] ~/cphalcon/build $



85.5k

you are probably doing it wrong, the comment on the top was immportant as far as i remember. YOu should have just used the bash :D

can you join slack, to chat there might be easier



43.9k

do you have pdo extension installed (and also pdo_sqlite or pdo_mysql, or pdo_pstgres ...) ? The error message you get regarding phppdogetdbhce is related to that.



537
edited Mar '17
  • Thank You for the patience.
  • I hoped PHALCON help me resolve middle level task - www service page.
  • I've installed several frameworks - with troubles resolved in an hour.
  • Shure I'm doing it wrong - this is the reason I'm asking for some help.
  • My rather clear questions weare answered in strange manner.
  • I'm not going to overload Your patience.
  • Regards
  • Greg


85.5k

as i love to say, phalcon is harded to isntall but times easier to work with :D



43.9k

don't give up !

because phalcon acts as a php extension, you have to load it and on most distribution, you do that through a file in /etc/php5/apache2(or cli)/conf.d directory

phalcon must be loaded after all the other extensions it depends on (gd, json, mongo, pdo, mysql and so on) so you have to give to the file an higher index (eg : 50 or 60) than all the other extensions it depends on.

once again check if you have pdo installed ( php -m in the terminal)

if you plan to use mysql check if pdo_mysql in installed (or any pdo database driver that is supported by phalcon)