Re: [PHP] Why Can't I get this to work
On Thursday 26 June 2003 11:20, Ron Clark wrote: I have a php script that reads a flat text file with fields seperated by a space. I explode them into an array just fine, but when I try then to load that array into a mysql database, it doesn't work. Here is my script: for ($i=0; $i$number_of_alerts; $i++) { // Split each line $line = explode( , $ipfwlog[$i]); $line[1] = intval($line[1]); $IPFWsql = INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel, fw_engine, rule_number, action, protocol, src $results = mysql_query($IPFWsql) or die (Could not execute query); } Any ideas why this does not work? I am completely stuck. What makes you think it doesn't work? IOW what happens? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why Can't I get this to work
Hello all, I have a php script that reads a flat text file with fields seperated by a space. I explode them into an array just fine, but when I try then to load that array into a mysql database, it doesn't work. Here is my script: for ($i=0; $i$number_of_alerts; $i++) { // Split each line $line = explode( , $ipfwlog[$i]); $line[1] = intval($line[1]); $IPFWsql = INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel, fw_engine, rule_number, action, protocol, src $results = mysql_query($IPFWsql) or die (Could not execute query); } Any ideas why this does not work? I am completely stuck. Thanks in advance, RonC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why can't I get imagepstext to work?
No matter what I try, it doesn't work I have GD installed and my phpinfo is on this link: adversus.no- ip.com/test/phpinfo.php Please, someone, help Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why Can't I Get PHP to Work with MySQL??
Hi; I get this error when I try to restart Apache: Syntax error on line 236 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/libexec/libphp4.so into server: /etc/httpd/libexec/libphp4.so The above file does, of course, exist. I'm running RH71 i386 with MySQL and PHP installed from source files. Here's my config script: ./configure --with-apxs=/etc/httpd/bin/apxs --with-mysql=/usr/local/mysql --with-kerberos=/usr/kerberos --with-ldap=/usr/local/openldap So, what gives? I've googled this one and it appears there's a lot of folks with this question unanswered! TIA, BenO -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Why Can't I Get PHP to Work with MySQL??
At 12:16 PM 12/23/2001 -0800, Ben Ocean wrote: Hi; I get this error when I try to restart Apache: Syntax error on line 236 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/libexec/libphp4.so into server: /etc/httpd/libexec/libphp4.so The above file does, of course, exist. I'm running RH71 i386 with MySQL and PHP installed from source files. Here's my config script: ./configure --with-apxs=/etc/httpd/bin/apxs --with-mysql=/usr/local/mysql --with-kerberos=/usr/kerberos --with-ldap=/usr/local/openldap So, what gives? I've googled this one and it appears there's a lot of folks with this question unanswered! From the PHP INSTALL file: quote Note 3! If you are on Linux and have installed shared libraries, make sure the location of these shared libraries are listed in your /etc/ld.so.conf file. For example, if you have: /usr/local/lib/mysql/libmysqlclient.so Make sure /etc/ld.so.conf contains: /usr/local/lib/mysql Then run ldconfig. /quote Do the above and this should take care of it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Why Can't I Get PHP to Work with MySQL??
At 02:32 PM 12/23/01 -0600, you wrote: At 12:16 PM 12/23/2001 -0800, Ben Ocean wrote: Hi; I get this error when I try to restart Apache: Syntax error on line 236 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/libexec/libphp4.so into server: /etc/httpd/libexec/libphp4.so The above file does, of course, exist. I'm running RH71 i386 with MySQL and PHP installed from source files. Here's my config script: ./configure --with-apxs=/etc/httpd/bin/apxs --with-mysql=/usr/local/mysql --with-kerberos=/usr/kerberos --with-ldap=/usr/local/openldap So, what gives? I've googled this one and it appears there's a lot of folks with this question unanswered! From the PHP INSTALL file: quote Note 3! If you are on Linux and have installed shared libraries, make sure the location of these shared libraries are listed in your /etc/ld.so.conf file. For example, if you have: /usr/local/lib/mysql/libmysqlclient.so Make sure /etc/ld.so.conf contains: /usr/local/lib/mysql Then run ldconfig. /quote Do the above and this should take care of it. Well, I'm afraid I've done all of that and the problem remains :( I recalled I also had to hard-code something in the configure script that wasn't working properly: # BENO'S CHANGE: LAST LINE BELOW COMMENT AS WELL... # for i in lib lib/mysql; do # str=$MYSQL_DIR/$i/libmysqlclient.* # for j in `echo $str`; do #if test -r $j; then # MYSQL_LIB_DIR=$MYSQL_DIR/$i # break 2 #fi # done # # done MYSQL_LIB_DIR=/usr/local/lib (starts at around line 3350). I was getting this error: configure: error: Cannot find mysqlclient library under /usr/local/mysql whereas the library is actually found under /usr/local/lib/mysql. At any rate, made the edit and the error message disappeared, so I assume I did something right, but the fact that I had to make an edit makes me suspicious. Any more ideas? TIA, BenO -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Why Can't I Get PHP to Work with MySQL??
* Ben Ocean ([EMAIL PROTECTED]) [Dec 23. 2001 16:45]: ./configure --with-apxs=/etc/httpd/bin/apxs --with-mysql=/usr/local/mysql --with-kerberos=/usr/kerberos --with-ldap=/usr/local/openldap So, what gives? I've googled this one and it appears there's a lot of folks with this question unanswered! [...] Well, I'm afraid I've done all of that and the problem remains :( I recalled I also had to hard-code something in the configure script that wasn't working properly: # BENO'S CHANGE: LAST LINE BELOW COMMENT AS WELL... # for i in lib lib/mysql; do # str=$MYSQL_DIR/$i/libmysqlclient.* # for j in `echo $str`; do #if test -r $j; then # MYSQL_LIB_DIR=$MYSQL_DIR/$i # break 2 #fi # done # # done MYSQL_LIB_DIR=/usr/local/lib (starts at around line 3350). I was getting this error: configure: error: Cannot find mysqlclient library under /usr/local/mysql whereas the library is actually found under /usr/local/lib/mysql. At any Didn't we just go over this yesterday? You needed to pass --with-mysql=/usr/local instead of --with-mysql=/usr/local/mysql In the configure you edited, it's going to be looking for [Whatever you passed configure for --with-mysql] plus a) lib or b) lib/mysql plus libmysqlclient.* So when you pass configure --with-mysql=/usr/local/mysql and the path is actually /usr/local/lib/mysql, you're making it look in a) /usr/local/mysql/lib or b) /usr/local/mysql/lib/mysql It doesn't find what it's looking for, so it tells you Cannot find mysqlclient library under /usr/local/mysql, which is the path you gave it. The error is sort of misleading because it doesn't report *exactly* where it looked, but it's correct nonetheless. You need to pass it /usr/local because that is the correct *base* path. Now, after that, if it doesn't configure correctly, that's another story. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Shin: A device for finding furniture in the dark. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]