[PHP] Re: First PHP
Not to hard to find http://www.php.net/manual/en/history.php ~Tim Heikkikk [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello! I would like to know, Who made the first step to start programming PHP? So who is the father of PHP. Can anyone give me a link to proof it? -- =|---+---|= Heikki Kniivilä [EMAIL PROTECTED] http://heikkikk.homelinux.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getaddrinfo failed: No address associated with hostname
I have a php script setup which downloads a file from a remote server via FTP. It worked fine for a couple months until I went to use it one day and it returned the error below. I hadn't made any changes to the script in that time. It was no big deal so I wrote it off as it wasn't really an important script. Today I went to use the fopen command in another php script with a remote http file and it returned the same error. I'm not sure if this is a php config thing or something else. Warning: php_network_getaddresses: getaddrinfo failed: No address associated with hostname Any help would be greatly appreciated. Thanks! -Tim Here is a snippet of the ftp script: - $ftp_server=domain.com; $ftp_user_name=user; $ftp_user_pass=password $localfile=/home/usernam/www/filename.txt; $remotefile=/paht/to/remotfile/filename.txt; $hostname_softcart = mysqlhostname; $database_softcart = dbasename; $username_softcart = user; $password_softcart = password $dbase_name = dbase; $file=$PHP_SELF; // Connect to FTP server $conn_id = ftp_connect($ftp_server); // Login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // Check Connection if ((!$conn_id) || (!$login_result)) { echo FTP connection has failed!; echo Attempted to connect to $ftp_server for user $ftp_user_name; die; } else { echo Step 1: Connected to $ftp_server Succesfully.br; } // Set Passive Transfer Mode. ftp_pasv($conn_id, pasv); // Display Download Button echo form action=$file; echo input type=hidden name=download value=true; echo Step 2: input type=submit value=\Click Here to download Database file\br; echo /form; // Download the file if (isset($download)) { $download = ftp_get($conn_id, $localfile, $remotefile, FTP_ASCII); // Check download success...if its OK do some stuff if (!$download) { echo FTP Download has failed!; } else { echo STUFF ; } } // close the FTP stream ftp_close($conn_id); - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] It only prints lines that beggin with a number? I'm on a deadline!
Thanks so much guys, that worked perfectly. I do ok with php but am still on the bumpy part of the road with SQL queries. Thanks again! Regards, Tim 1lt John W. Holmes [EMAIL PROTECTED] wrote in message news:00da01c28cad$b9a90d50$a629089b;TBHHCCDR... $result = mysql_query (SELECT * FROM `data` WHERE categories); Where categories is what?? You don't have any comparison... What it's doing is evaluating the column as true or false. Any integer column 0 will evaluate to true, so that row will be returned. 1A will be converted to 1, so it'll be returned as true. CD will be converted to zero, so that row will not be returned... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] It only prints lines that beggin with a number? I'm on a deadline!
Hi everyone, I have a pretty strange problem that may be simple, but I have never heard of it. //I have a database in the following format: 2 2 2 Cd's Cd's DVD's DVD's DVD's DVD's DVD's // Someone recently helped me out in writing a short script that would turn it into this: 2 1 \\ each unique entry gets a unique number separated by Tabs 2 1 2 1 Cd's2 Cd's2 DVD's 3 DVD's 3 DVD's 3 DVD's 3 DVD's 3 Here is the script -- $count = 0; $db = mysql_connect(localhost, user, pass); mysql_select_db(database,$db); $result = mysql_query (SELECT * FROM `data` WHERE categories); while ($row = mysql_fetch_array($result)) { $currow = $row[0]; if ($count == 0) { $lastrow = $currow; $count = 1; } echo $row[0] . \t . $count . BR\n; if ($currow != $lastrow) { $count++; } $lastrow = $currow; } -- This worked great on my home server. Now I need to move it over to our real server which has an almost identical setup. The problem I have is that it will only print rows that begin with a number! I have tried changing the dbase format to just about everything, but still no good. The table has about 4000 rows but the script only prints the first 300 or so which are the ones that begin with a number. I have tried removing all of the rows that start with a number, in that case it prints nothing, acting like the other row's don't exist. My home server has since been formatted so I can't verify what the setup was or if there was anything different about it. If anyone can help in any way it would be greatly appreciated, I am on a deadline which ends in a few days and this is putting me behind schedule. Thanks Very Much,Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php