MickyMick Posted July 10, 2009 Share Posted July 10, 2009 PHP/Apache on Vista Problem Hello all (bit of a lengthy one here...sorry!), I am relatively new to PHP and I am currently attempting to install apache and php on a system for the 1st time. My system details are: OS: MS Vista Ultimate (Adminstrator logon) PHP: php-5.3.0-Win32-VC6-x86.zip Apache: apache_2.2.11-win32-x86-no_ssl.msi Oracle: OracleXE 10g I installed the Oracle XE some months ago and it is working fine, and installed Apache according to the instructions here (http://www.thesitewizard.com/apache/install-apache-on-vista.shtml) and then PHP following these instructions (http://www.thesitewizard.com/php/install-php-5-apache-windows.shtml). Everything seems to be ok except for when i attempt to call some 'helloworld' type scripts via the browser i.e. apache allows me to view html pages with no problems and i can execute the php scripts via the command line including communcating with oracle but.... when i call the same scripts from a URL using firefox3.5 or Opera i get the following error: Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 Fatal error: Unknown: Failed opening required 'C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/phpinfo.php' (include_path='.;C:\php5\pear') in Unknown on line 0 I have looked on the web and through these forumns checking my settings are correct but i obv can't see the wood for the trees! i know it'll be something simple. I have changed the following in httpd.conf: LoadModule php5_module "c:/php5/php5apache2_2.dll" (ADDED) AddType application/x-httpd-php .php (ADDED in <IfModule mime_module> section) AddType application/x-httpd-php .phtml (ADDED in <IfModule mime_module> section) AddType application/x-httpd-php-source .phps (ADDED in <IfModule mime_module> section) PHPIniDir "C:/php5/" (ADDED, currently commented out, have tried it uncommented) and in php.ini (based upon php.ini-production [note I have also tried basing it on php.ini-development]) i changed the following: display_errors = on (changed from 'off') extension_dir = "C:\php5\ext" (chanaged from '\ext', also uncommented it) extension=php_oci8.dll (uncommented it) (I have also tried variations on 'include_path' i.e. leaving it commented out as well as changing it to "c:\php5\" and to "c:\php5\PEAR\" currently it is uncommented so guessing the 'C:\php5\pear' in the error message is a default value?!) and my environment variables are set as: PATH=C:\oracle\Database\xe\app\oracle\product\10.2.0\server\bin;C:\Program Files\Java\jdk1.6.0_11;C:\Program Files\CodeGear\RAD Studio\5.0\bin;C:\User s\Public\Documents\RAD Studio\5.0\Bpl;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C: \Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;c:\Program Files\Microsoft SQL Server\90 \Tools\binn\;C:\Users\Public\Documents\RAD Studio\5.0\Bpl;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Microsoft Network Monitor 3\;C: \PROGRA~1\DISKEE~1\DISKEE~1\;C:\Program Files\QuickTime\QTSystem\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Nmap;C:\php5;C:\php5\ext; PHPRC=C:\php5\; The path to the root directory of Apache is: C:\Program Files\Apache Software Foundation\Apache2.2 and for php I unzipped it to: C:\php5\ my test script phpinfo.php contains: <?php phpinfo() ;?> and as i said earlier runs fine when called from the command line using >php phpinfo.php I have restarted my machine to ensure environment vars are being changed and have verified this using the SET command on the command line. the only thing i haven't tried as yet is removing the symbolic link for the 'conf' and 'htdocs' folders and moving them back under the apache root folder. They currently sit in a foler named 'apache' on my desktop (Told to do this for ease of use when following the instal instructions in the link above). this is my next step but i was hoping somone may be able to notice any mistakes i have made or is there a problem with php5.3.0 with apache2_2_11 on Vista ultimate? I appreciated any help given, thanks inadvance. Cheers, Mick Quote Link to comment https://forums.phpfreaks.com/topic/165503-phpapache-on-vista-communcation-problem/ Share on other sites More sharing options...
MickyMick Posted July 10, 2009 Author Share Posted July 10, 2009 I've managed to get them communicating...by removing the symbolic links and placing the 'conf' and 'htdocs' folders back under the apache root folder. I followed the steps exactly as the author in the install tutorial stated so it seems pretty strange it never worked...he seemed very thorough in his instructions, perhaps there is some sort of permissions problem with vista even although I am the administrator. would it be the apache that would need the permissions, if so how would you go about granting them to it? hopefully this will help someone else in future. cheers, Mick Quote Link to comment https://forums.phpfreaks.com/topic/165503-phpapache-on-vista-communcation-problem/#findComment-873002 Share on other sites More sharing options...
wildteen88 Posted July 10, 2009 Share Posted July 10, 2009 When ever I install Apache, PHP (and MySQL) I always install them to a C:/Server. To change the install location you will need to choose Custom setup rather than Typical setup when installing Apache and MySQL. PHP can be just extracted to C:/Server/PHP Creating symbolic links seems OTT to me. Quote Link to comment https://forums.phpfreaks.com/topic/165503-phpapache-on-vista-communcation-problem/#findComment-873095 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.