sheds Posted April 12, 2007 Share Posted April 12, 2007 Hello there guys, noob here at phpfreaks. I have read about mysql support from php. I read that it comes disabled or not included in versions 5.0 and above. The thing is that i am trying to run cacti and this program requires that i have php working with mysql. I also have php already installed on the server, so i just need to add the mysql support required to make cacti work. I know i have to include --with-mysql and --with-gd according to the manual and the errors. My question here is: where do i perform this ./configure --with-mysql --with-gd? I tried looking for the directory path of php, but i don't know where to perform this command, and the make later on, i guess. I also want to know if by performing this, php configures only those options or keeps the other options that have been configured when it was initially compiled, adding just these two. Here's what i get when readind the phpinfo() output. The lines that i think are missing so that php works with mysql are bold and red, for informational purposes. './configure' '--build=i386-redhat-linux' '--host=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' Quote Link to comment https://forums.phpfreaks.com/topic/46769-add-mysql-support/ Share on other sites More sharing options...
trq Posted April 13, 2007 Share Posted April 13, 2007 You need to download the php source, untar it, move into the build directory and type your complete ./configure line along with any changes. Then run make && make install. You'll also need to make sure all dependencies are met. What distro are you using? Quote Link to comment https://forums.phpfreaks.com/topic/46769-add-mysql-support/#findComment-228237 Share on other sites More sharing options...
sheds Posted April 13, 2007 Author Share Posted April 13, 2007 It's fedora core 4. I installed it using yum, but obviously i cannot tell yum to install modules as if i was compiling it from source. Now, i managed to remove php and downloaded version 5.2. I want to install it so that cacti works and php works with mysql. I tried to install but i am getting the following error message after performing ./configure: Quote Link to comment https://forums.phpfreaks.com/topic/46769-add-mysql-support/#findComment-228508 Share on other sites More sharing options...
sheds Posted April 13, 2007 Author Share Posted April 13, 2007 Here's the command: ./configure --with-apxs2=/www/bin/apxs --enable-sockets --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/include --with-gd And here's the error message: configure: warning: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking for bison... no checking for byacc... no checking for bison version... invalid configure: warning: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 (found: none). checking for flex... lex checking for yywrap in -ll... no checking lex output file root... ./configure: line 3375: lex: command not found configure: error: cannot find output from lex; giving up Quote Link to comment https://forums.phpfreaks.com/topic/46769-add-mysql-support/#findComment-228741 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.