Jump to content

Mandriva 2006, php and apache


User
 Share

Recommended Posts

I had a hard drive crash on me...

 

For the life of me I can't remember what I needed to do to get php to run on a local notebook with apache. I had it fine on 10.1 but on LE2006 I'm forgetting to add or edit something.

 

All modules apache, php and MySQL are installed.

 

I've edited my httpd.conf to the proper document root and proper <Directory "/home/my web">

 

added LoadModule php4_module extramodules/mod_php4.so - (also tried php5)

 

tried with and without AddType application/x-httpd-php .php - (and also the extra extensions like .php4, phtml, etc - and even tried AddHandlers)

 

Even tried the remove 2 php applications/x in the 70_mod_php.conf (and php4) suggestion (know I never did that in 10.1 )

 

edited the php.ini file to include the proper doc_root= "/home/my web"

 

copied php.ini in just about every php dir to cover almost every path I could think of (I may be missing something here - am running x64 version of Mandriva)

 

wrote a basic test.php file and put it into /home/my web

 

everytime I run firefox locally (http://192.168.1.10/test.php) it keeps asking what to do with the file (save to disk, etc options) instead of just parsing/running it properly and displaying it as a web page in the browser.

 

Also added in host file 192.168.1.10 MyNotebookName to properly resolve it

 

Made sure httpd service is running and can access/run html fine (no errors).

 

Does anyoneknow/can help with what I'm missing?

 

Thanks in advance!

 

[moved from Installing Mandriva by spinynorman]

Link to comment
Share on other sites

Do you have mod_php installed?

 

[ian@europa ~]$ urpmf --name mod_php
apache-mod_php:apache-mod_php-2.0.54_5.0.4-4mdk.i586.rpm
apache-mod_php:apache-mod_php-2.0.54_5.0.4-4mdk.i586.rpm
apache-mod_php4:apache-mod_php4-2.0.54_4.4.0-2mdk.i586.rpm
apache1-mod_php4:apache1-mod_php4-1.3.33_4.3.11-1mdk.i586.rpm
apache1-mod_php5:apache1-mod_php5-1.3.33_5.0.4-1mdk.i586.rpm
[ian@europa ~]$ rpm -qa apache-mod_php

 

I don't have it on my machine, which is why the last command didn't return any results. Run these two commands on your machine, and see what you get.

Link to comment
Share on other sites

Yes to all being installed as stated in the 3rd line in my oriinal post. :)

 

my rpm -qa apache-mod_php returns: apache-mod_php-2.0.54_5.0.4-4mdk

 

so pretty sure all is installed okay.

 

Just the php files will not run properly. They work fine on another server running LE2005.

 

Even gave it execute permission just for the hell of it. :) No go.

 

Any other suggestions.

 

Could it be I need to unassociate it to open with a text editor on the local machine (never needed to tdo that before). Will try that later when I am on that system.

 

Could it be I may be missing some specific <IfModule> directive perhaps in the httpd.conf file?

 

Thanks again in advance.

Link to comment
Share on other sites

Some other things worth checking:

 

in your httpd.conf, look for a line similar to this:

 

Include /etc/apache/mod_php.conf

 

If you have something like that, uncomment it and restart apache.

 

It could be /etc/apache/mod_php.conf, if not it might be like this /etc/httpd/conf.d/php.conf

 

also, add this:

 

LoadModule php4_module libexec/apache/libphp4.so
AddModule mod_php4.c

 

to the same file if they are not already there. I'm assuming php4, but update where necessarry if php5.

Link to comment
Share on other sites

Maybe I need to clear something up. This is 64 bit Mandrake installed.

 

I found out that the install does not create the 64 bit libphp4.so or the libphp5.so on some AMD systems. Anyone got a link to download these files? Any help would be appreciated.

 

Thanks in advance. :)

Link to comment
Share on other sites

Bump! :)

 

tried as suggested LoadModule php4_module /usr/lib64/libphp4_common.so.4

 

Syntax Error on line 248 of /etc/httpd/conf/httpd.conf:

Cannot load /usr/lib64/libphp4_common.so.4 into server: /usr/lib64/libphp4_common.so.4: undefined symbol: php_startup_internal_extensions

 

Has anyone got those files around? Only way it sems (per on the net) it will be created for me is if I decide to install Apache2 and PHP from source (if it is really suppose to be libphp4.so or libphp5.so - seems to be the _common.so for 64 bt - I could be wrong). That should not have to be the case if Mandriva is to be a user friendly OS and has all the rpms for installs.

 

Any help would be appreciated.

Edited by User
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...