Home General Chat
If you need urgent support, call 999 or go to your nearest A&E. To contact our Crisis Messenger (open 24/7) text THEMIX to 85258.
Options

PHP/Apache

I've got Apache with PHP4 running on Mandrake Linux 9, and keep getting this error message
Warning: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/lib/php/:/usr/lib/php/pear/:/var/www/html/') in Unknown on line 0

when opening http://localhost/

but another script (test.php), with phpinfo(); as the sole line of code, works fine...

any help is gratefully recieved! :)
Beep boop. I'm a bot.

Comments

  • Options
    Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
    I'm not sure if it's a problem with the path that you set when you make php, or if it's just that one page. Have you tried making your own index page in php or your own proper page? If they work fine I would ignore it and carry on, if not you may have to reinstall setting the paths up differently when you configure it.
  • Options
    Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
    index.php is my own page.
    It also fails on header.php and footer.php.

    I've fiddled with httpd.conf and php.ini (added the document root to the include_path), but to no avail.

    thanks for the advice :)

    Oh, it's Apache Advanced Extranet Server...but I think it's the same to configure. It came preinstalled with mod_php, mod_perl and some others.
  • Options
    Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
    Well, I vaguely remember something similar but can't remember exactly what to change to fix it.

    It's the case where I guess you're doing

    include "somefile.php"

    and it's looking for somefile.php in your document root which it thinks is /var/www/html but is probbaly something else. This is one of the options somewhere I think that you can alter.
  • Options
    Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
    Try
    phpDEV
    i don't know the URL and i don't know if they do one for your OS.

    cheers
    lank
  • Options
    Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
    Re: PHP/Apache
    Originally posted by bad seed
    I've got Apache with PHP4 running on Mandrake Linux 9, and keep getting this error message



    when opening http://localhost/

    but another script (test.php), with phpinfo(); as the sole line of code, works fine...

    any help is gratefully recieved! :)

    make sure you have index.php in the same folder as the page your including it off, when you open localhost make sure its working with index.html first, then make sure you have configured apache correctly to parse php, im running exactly the same setup as you- i guess you got madrake of linuxformat?

    any ditch mandrake- use debian...!!!!
  • Options
    Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
    all sorted...it was file permissions, and then I had to install some MySQL modules.

    all is good, now :D

    cheers for the advice people :)

    edited to add: I got downloaded the Mandrake ISOs using windows and burned the install CDs.
    I'm pleased with it as an OS, but i'd prefer MacOS X!
  • Options
    Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
    Thought it might be permissions :)
Sign In or Register to comment.