apache won't parse
Posted: Mon Jul 20, 2009 5:21 pm
Hey all,
I'm just starting out with php, and I'm having trouble getting apache to parse the code.
I'm working on OSX 10.5.7
I installed Apache 2.2.11
I installed PHP 5.3.0 via the entropy package at http://www.entropy.ch/software/macosx/php/
I installed mySQL 5.1.36
Then I restarted my apache server, created a php file with the contents <?php phpinfo(); ?> and put it in my local host directory. When I opened it with a browser (via http://localhost/~user/my_phpinfo.php) it just read back the contents of the file to me rather than parsing it. However, local host index loaded just fine.
Then I tried using XAMPP. I installed it and created an identical php and put it in the xampp local host directory. I loaded up xampp, which claimed to have no trouble accessing the server or the mysql, but still didn't parse the file.
Then I uninstalled XAMPP and tried using MAMP with the same results.
Then I went into the terminal and backed the httpd.conf file. Then went into the original .conf file with nano and uncommented the "LoadModule php5_module" line, saved the file, restarted the apache server and tried again. It still won't parse the code. I've restarted the computer and tried again and it still won't work.
Again, apache isn't having trouble loading pages from the local host, but for whatever reason it isn't processing the php I feed it.
I have php 5.3.0 running at /usr/local/php5/bin/php from the entropy package and also php 5.2.8 running as the default. I'm not sure which one the system is using right now. Could that be part of the problem?
I've been banging my head against this for about 7 hours and I can't figure out what I need to do. If anyone could help me I would be eternally greatful!
I'm just starting out with php, and I'm having trouble getting apache to parse the code.
I'm working on OSX 10.5.7
I installed Apache 2.2.11
I installed PHP 5.3.0 via the entropy package at http://www.entropy.ch/software/macosx/php/
I installed mySQL 5.1.36
Then I restarted my apache server, created a php file with the contents <?php phpinfo(); ?> and put it in my local host directory. When I opened it with a browser (via http://localhost/~user/my_phpinfo.php) it just read back the contents of the file to me rather than parsing it. However, local host index loaded just fine.
Then I tried using XAMPP. I installed it and created an identical php and put it in the xampp local host directory. I loaded up xampp, which claimed to have no trouble accessing the server or the mysql, but still didn't parse the file.
Then I uninstalled XAMPP and tried using MAMP with the same results.
Then I went into the terminal and backed the httpd.conf file. Then went into the original .conf file with nano and uncommented the "LoadModule php5_module" line, saved the file, restarted the apache server and tried again. It still won't parse the code. I've restarted the computer and tried again and it still won't work.
Again, apache isn't having trouble loading pages from the local host, but for whatever reason it isn't processing the php I feed it.
I have php 5.3.0 running at /usr/local/php5/bin/php from the entropy package and also php 5.2.8 running as the default. I'm not sure which one the system is using right now. Could that be part of the problem?
I've been banging my head against this for about 7 hours and I can't figure out what I need to do. If anyone could help me I would be eternally greatful!