poniedziałek, 6 kwietnia 2009

PHP fopen localhost problem

Problem:
  • fopen("http://google.com", "r") works fine
  • fopen("http://localhost/test.txt", "r") doesn't work - error "failed to open stream"
  • in php.ini: allow_url_fopen = On
  • Windows Vista, WAMP Server, PHP 5.2.5
Solution:
  • use 127.0.0.1 instead of localhost
  • fopen("http://127.0.0.1/test.txt", "r") works fine
Keywords:
  • SoapClient, SoapServer, "Could not connect to host", remote file, unable to open http request stream with fopen, fsockopen, http request filed, warning

środa, 4 czerwca 2008

Jak przywrócić uruchamianie Windows po usunięciu partycji Linuksa?

- IBM Lenovo ThinkPad R61e
- Windows Vista i Ubuntu
- Grub

- usunięta partycja z Linuksem

Przywrócenie startu Windows:
Należy ściągnąć plik .iso z płytą ratunkową SystemRescueCD i zainstalować ją na USB. Następnie należy uruchomić komputer z opcją uruchamiania systemu z USB.
Po uruchomieniu SystemRescueCD z USB należy wpisać altker32, nacisnąć enter i poczekać na uruchomienie systemu.
Następnie należy wpisać
/sbin/lilo -M /dev/sdb
i zrestartować komputer (po wyjęciu USB).
Windows powinien już się uruchomić.

- MBRFix 1.0.9 (dokumentacja)
MbrFix /drive 0 fixmbr /vista

- bmgr (informacje)
cd C:\Program Files\Common Files\Lenovo\BMGR
bmgr32.exe /fbootmgr.bin /M0 /Think
- c:\Program Files\Common Files\Lenovo\mbrinst.log