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

how to set php-config #1752

Closed
endytc opened this Issue Jan 2, 2014 · 9 comments

Comments

Projects
None yet
7 participants
@endytc
Copy link

endytc commented Jan 2, 2014

i want to install phalcon in my computer, but it's get error "Cannot find php-config" when i run command "sudo ./install"
I use lampp for php server, how to fix it?

fendi@fendi-K40IJ:/media/sda7/xampp/htdocs/_coba/phalcon/cphalcon/build$ sudo ./install
32bits
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking for suncc... no
checking whether gcc and cc understand -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
configure: error: Cannot find php-config. Please use --with-php-config=PATH

@ghost

This comment has been minimized.

Copy link
Collaborator

ghost commented Jan 2, 2014

Check where your php-config is installed on your system:

find -name "php-config*" /
@endytc

This comment has been minimized.

Copy link
Author

endytc commented Jan 2, 2014

I found "php-config" in "/opt/lampp/bin/php-config", and i have tried with the command "sudo ./install --with-php-config=/opt/lampp/bin/" but i have next errors:

./install: line 55: cd: --: invalid option
cd: usage: cd [-L|[-P [-e]]] [dir]
Cannot find config.m4.
Make sure that you run '/opt/lampp/bin/phpize' in the top level source directory of the module

@ghost

This comment has been minimized.

Copy link
Collaborator

ghost commented Jan 2, 2014

Try this:

cd cphalcon/build/32bits
/opt/lampp/bin/phpize --enable-phalcon --with-php-config=/opt/lampp/bin/
make
sudo make install
@endytc

This comment has been minimized.

Copy link
Author

endytc commented Jan 3, 2014

if I run with the command "sudo ./install", the error result is "configure: error: Cannot find php-config. Please use --with-php-config=PATH"

but if without sudo, error result is "cp: cannot create regular file `/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/#INST@13125#': Permission denied"

@endytc

This comment has been minimized.

Copy link
Author

endytc commented Jan 3, 2014

ok... resolved, but if I must to repeat it again, I think will be to confuse.. hehehehe..
thank you, for your help

@phalcon phalcon closed this Jan 3, 2014

@temuri416

This comment has been minimized.

Copy link
Contributor

temuri416 commented Jan 5, 2014

Just an FYI.

I was having a similar issue: #1739. Maybe build script should accept location of php-config from argument line?

Thanks.

@niden niden added Unassigned and removed Unassigned labels Apr 1, 2014

@loader77

This comment has been minimized.

Copy link

loader77 commented Nov 21, 2016

I have a similar problem: there is no php-config file at my debian.
"sudo apt-get install php5-dev" did'nt help me.
How can I solve this problem ?
i try to install php-cpp. Error:
/bin/sh: 1: php-config: not found

@david-duncan

This comment has been minimized.

Copy link

david-duncan commented Nov 21, 2016

@loader77 this is really a stackoverflow question. the easiest way to fix it is probably to use this PPA though

https://github.com/oerdnj/deb.sury.org/wiki/PPA-migration-to-ppa:ondrej-php#compatibility-php5--packages

@bluebinary

This comment has been minimized.

Copy link

bluebinary commented Jun 2, 2017

As long as your system has phpize and php-config installed (you can find them with find / -name "php-config"), you can then set the PATH to include the path to these binaries, before your call to ./install; for example, running the following from the cphalcon/build path:

PATH="/opt/rh/rh-php70/root/usr/bin:$PATH" ./install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.