|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have just installed apache 2 + php5, from YaST2. I tested if my apache web server was running fine (after changing the read and execute permission on /srv/www/htdocs/, and adding a simple html file for its index.html) by entering as URL:
Code:
http://localhost But now when I try to test if the PHP installation was fine, by creating a file info.php, putting it again in /srv/www/htdocs/, adding to the file the classic lines: Code:
<? phpinfo(); ?> Code:
http://localhost/info.php ![]() What else I have to do to allow php to run just fine from apache ? :blink: |
|
|||
|
Add php5 to the list of modules in APACHE_MODULES in /etc/sysconfig/apache2 and restart apache2.
|
|
|||
|
Quote:
Code:
APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user authn_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl suexec userdir php5" PD: What I can do to be sure that apache is running w/out problems ? I created a simple index.html file then I located it in /srv/www/httdocs, then I tested apache from my browser by going to http://localhost/ and the server loaded the simple page I had created. I guess that's enough to test that apache is running ok, or not ? |
|
|||
|
Check if you have a valid php5.conf in /etc/apache2/conf.d/ and then check if it is included near the end of /etc/apache2/default-server.conf.
EDIT: Also, use full PHP tags: <?php ... ?> I believe php5.ini disables short tags by default. |
|
|||
|
I made the change to the tags and it worked! Thanks a lot for your help.
A strange message is appearing when I restart apache, do you know how to solve it ? Quote:
|
|
|||
|
Quote:
|
|
|||
|
Problem solved!
In my intents to make to work PHP, I added 'php' to: /etc/sysconfig/apache2 So it looked like this: Quote:
Code:
Dixie7:/ # rcapache2 restart Syntax OK Shutting down httpd2 (waiting for all children to terminate)******** done Starting httpd2 (prefork)********************************************done |
|
|||
|
Oh, yeah, you have a directive somewhere requiring php4. I don't think what you did is a proper solution, though. Rather hunt the offending directive and have only php5 installed (unless you need them both). With your solution, you have both PHP4 and PHP5 modules installed. Check the error_log in /var/log/apache2, maybe it will provide more info about the offending directive. |
|
|||
|
Quote:
Changing of topic. Yesterday I installed other stuff, in my search to finally solve my problem as specified here So since yesterday I have 2 php.ini files, located at: /etc/php5/cli/php.ini /etc/php5/apache2/php.ini Apparently they appeared after installing either one of these packages, which I installed yesterday:
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|