Jump to content

koo_04

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Everything posted by koo_04

  1. EDIT: I have tired this and got a really crazy page... I will keep put up a screen shot. foreach($files as $file){ echo '<p><a href="'.file_get_contents($file).'">'.basename($file).'</a></p>'; };
  2. Sounds good to me. Should I be doing like this? foreach($files as $file){ echo '<p><a href="'file_get_contents(.basename($file).'">'.basename($file).'</a></p>'; }; I keep getting a broken server from it though.
  3. I would like to go from a glob list, which is working great, to a download link kinda thing. So, The glob list is shown and each file has a link. The problem is that the download folder for PHP is apparently NOT within my website, but in another portion of the server. Also that when I modify the code to work within the website, it doesnt work. Probably because of the glob array. Anyone have an idea on how to fix this? Code: <?php $dir = "/downloads/"; $files = glob($dir."*.zip", GLOB_NOSORT); // echo'<select name="Files">'; foreach($files as $file){ // echo'<option value="'.$file.'">'.basename($file).'</option>'; echo '<p><a href="/downloads/'.basename($file).'">'.basename($file).'</a></p>'; }; // echo'</select>'; ?>
  4. Thanks a ton. Now I need to just make a button that will download the selected file from the list.
  5. I wouldn't of posted it again if I didn't read and try to apply it. I get nothing out of it. Some ways I have tried it, it even breaks the webpage. :-\
  6. How should I go about using it? Replace it with glob()?
  7. I am using glob() to see a list of .zip files on my website. I wanted to display them on a drop down list. I got that working fine, but the file path shows up with it. Any idea how to remove it? Here is the code I am using. <?php $dir = "/downloads/"; $files = glob($dir."*.zip", GLOB_NOSORT); echo'<select name="Files">'; foreach($files as $file){ echo'<option value="'.$file.'">'.$file.'</option>'; } echo'</select>'; ?>
  8. So I manualy installed everything and my PHP pages work great. But now I am having issues with PHP communitcating with mysql. I keep getting stuff like "The installer was unable to detect MySQL support in PHP. Please ask your host to ensure that PHP was compiled with MySQL, or that the proper extension is being loaded."
  9. When I try to run the PHP page I get This is the code <?php $db = mysql_connect("localhost", "root", "Password") or die("Could not connect."); if(!$db) die("no db"); if(!mysql_select_db("database_password",$db)) die("No database selected."); if(!get_magic_quotes_gpc()) { $_GET = array_map('mysql_real_escape_string', $_GET); $_POST = array_map('mysql_real_escape_string', $_POST); $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE); } else { $_GET = array_map('stripslashes', $_GET); $_POST = array_map('stripslashes', $_POST); $_COOKIE = array_map('stripslashes', $_COOKIE); $_GET = array_map('mysql_real_escape_string', $_GET); $_POST = array_map('mysql_real_escape_string', $_POST); $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE); } ?>
  10. I found the problem...
  11. I get this in the error (before I restore it)
  12. I do have those set as well as # configure the path to php.ini PHPIniDir "C:/php"
  13. So I had to change some stuff, none of it major. Stuff like the extension_dir and such. BEFORE I did much, I had that code working fine. Then I did some changed... well a lot of changes that I cant remember, now it stopped working. I just get "<?php phpinfo()?>" in text. I was origanlly trying to make the mysql DB stuff to connect. Please help!
  14. I am running PHP 5 on IIS 5.0 and I am using ISAPI module. We have everything set up correctly, as far as I know. Sept that we get this error.. %1 is not a valid Win32 application. Any suggestions?
  15. If I am correct, we just reinstall php with the OSAPI setting instead of CGI. After that we add the ISAPI.dll in the filter of IIS
  16. It is a challenge now. I kinda just want to get it to work now. Although it is nice to keep it to as limited programs as posible. Less we have to watch and update, the better... I think anyway.
  17. We have the version for the IIS, the number 9 one I belive. I did make sure we grabbed the right one.
  18. Umm, I did notice that the "doc_root =" was not set. But reading about that, it sounded like you dont need it UNLESS using something OTHER THEN IIS. ; The root of the PHP pages, used only if nonempty. ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root ; if you are running php as a CGI under any web server (other than IIS) ; see documentation for security issues. The alternate is to use the ; cgi.force_redirect configuration below ; http://php.net/doc-root doc_root = Should it be ;doc_root = ? Since it is not being used? Could that cause a conflict?
  19. Ok, so to start. I did choose CGI in the start of the install. I know that for sure, not fastCGI. I cant test the phpinfo() because I cant even get past that error. No matter what I put in, it fails and comes with that error. Unless you mean testing it another way?
  20. Ah, fastCGI is not avaliable for 5.0. Anyone have a good solution to the error? Or should I start another post somewhere else?
  21. I am running IIS 5.0, and I do have the force to 0. But I do not think I have the fastCGI. Will that cause a major problem?
  22. What acctually started this wild goose chase what this error that I keep getting when running PHP with IIS.. CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: And that is it... I have searched for weeks on end trying to figure out why. I have tried all kinds of solutions and none have worked.
  23. Well, I found this... From MSDN: The getaddrinfo function was added to the Ws2_32.dll on Windows XP and later. To execute an application that uses this function on earlier versions of Windows, then you need to include the Ws2tcpip.h and Wspiapi.h files. When the Wspiapi.h include file is added, the getaddrinfo function is defined to the WspiapiGetAddrInfo inline function in the Wspiapi.h file. At runtime, the WspiapiGetAddrInfo function is implemented in such a way that if the Ws2_32.dll or the Wship6.dll (the file containing getaddrinfo in the IPv6 Technology Preview for Windows 2000) does not include getaddrinfo, then a version of getaddrinfo is implemented inline based on code in the Wspiapi.h header file. This inline code will be used on older Windows platforms that do not natively support the getaddrinfo function. The IPv6 protocol is supported on Windows 2000 when the IPv6 Technology Preview for Windows 2000 is installed. Otherwise getaddrinfo support on versions of Windows earlier than Windows XP is limited to handling IPv4 name resolution. The GetAddrInfoW function is the Unicode version of getaddrinfo. The GetAddrInfoW function was added to the Ws2_32.dll in Windows XP with Service Pack 2 (SP2). The GetAddrInfoW function cannot be used on versions of Windows earlier than Windows XP with SP2.
  24. I don't know where I should be posting this question, so I desited to post it here. I am running Win2000 on my server, and I have the latest PHP installed. Well, I have been spending weeks trying to get it to work. I went to MSDN and found an artical that bassically says that I need to find a PHP version that will work with Windows 2000. Please help!
  25. So, I am working with a team and we have our own servers and stuff. We had MySql and Apache installed. As far as I know, they are configured fine. But when I go to open the "setup.php" for phpMyAdmin, it just downloads it... Please help! EDIT: I can't use "localhost," I have to use a web browser for everything that has to do with the site.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.