SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
httpd: Syntax error on line 116 of /etc/httpd/httpd.conf: Cannot load /usr/libexec/apache/libphp4.so into server: /usr/libexec/apache/libphp4.so: undefined symbol: ap_user_id
go to any slackware mirror site and find the pkgs you need there - upgrade them - then look in /etc/httpd - all the files you will need to edit are there, apart from mysql - i norm use phpmyadmin to change anything there
to load php all you have to do, is go right to the bottom of httpd.conf and uncomment out the php line and then restart apache
i have unistall php-5.2.3-i486-2.tgz because my aplication was make on php4(under windows) and not work correctly on this version.
How can i make php4 to run under slack 12?
thanks
i have unistall php-5.2.3-i486-2.tgz because my aplication was make on php4(under windows) and not work correctly on this version.
How can i make php4 to run under slack 12?
thanks
Too bad, since support for PHP4 will end in December of this year.
Assuming its and out of the box install with Slack 12 and that you told it to start apache and mysql in the menu during install.
If you didn't then start by chmod +x /etc/rc.d/rc.httpd and /etc/rc.d/rc.mysqld
Edit the /etc/httpd/httpd.conf - scroll right to the bottom and find the line that relates to the PHP mod and uncomment them. That's the only thing you need to do to get PHP working - it's actually including a seperate mod_php.conf file but i think you've already covered these bits in your original post. You may want to tweak /etc/httpd/php.ini but unlikely. You'll probably want to add lots of other stuff like Servername and other config to the apache config - see the manual which is helpfully included in /var/www/htdocs/manual/ and is therefore in localhost/manual/ if apache is running.
mysql comes with no db installed - do a less /etc/rc.d/rc.mysqld and read the instructions about installing the root db. When you do this you'll get a message about doing the all important setting passwords thing. If you need network access to the Mysql server - ie from another Webserver or Terminal then make sure you comment the SKIP-NETWORKING line in /etc/rc.d/rc.mysqld.
Right, comming back to the PHP4.0.....
hmm.... assuming that re-writing the code to function on PHP5 is not an option ( and assuming that there is not platform (windows) specific code in there that'll stop the php running )... the reference in the error to "undefined symbol: ap_user_id" looks like some incompatability between the php4 library and the apache binary.
I've had a punt around for php4 packages for Slack 12 but i can't find any. The only thing i can sugest is get the PHP source code and recompile the module against apache... failing that, get the apache 1.2 packages for slack11 to go with the php4 packages for slack11 - they _should_ have been compiled against each other and _should_ therfore work.
If you have the time and the will, you can compile php4 from source.
Just download and mount the appropriate slack 11 source cd iso. (you don't have to burn it per se, just "mount -o loop /path-to-iso-file/mountpoint", adapt to your own situation)
cd into the directory with the source, and run the file that ends in .SlackBuild
this should create a new package for you.
this might work, it might not.
I never ran a web server, and I only once compiled a package from the source cd, so my instructions may be incomplete.
I use this thread because I had the same problem like the thread starter.
I installed a cms and edited the document root in the httpd.conf file and uncommented the php line to aktivate php.
After the restart I got a directory tree view (index of /) and a click at the index.php resulted in a download.
So I checked the modphp.conf file and saw that the path to the php5 module was wrong.
It was lib/httpd/modules/libphp5.so but the libphp5.so is located in /usr/lib/httpd/modules/libphp5.so.
I changed the path and restarted the deamon again.
Unfortunately I got the directory tree view again but a click at the index.php resulted in the correct display this time.
My only problem for now is the directory tree view when I open my site but I guess I will find the reason soon.
What I don't understand is why ever a proofed distribution like Slackware comes along with such a crazy configuration
mismatch in one of the most used features (xamp) under Linux.
My only problem for now is the directory tree view when I open my site but I guess I will find the reason soon.
That's because you haven't properly edited the DirectoryIndex directive in httpd.conf. Locate the following section:
<IfModule mod_dir.c>
</IfModule>
and add index.php and restart the server. Check out apache documentation for more on this.
So I checked the modphp.conf file and saw that the path to the php5 module was wrong.
It was lib/httpd/modules/libphp5.so but the libphp5.so is located in /usr/lib/httpd/modules/libphp5.so.
I changed the path and restarted the deamon again.
yup, this is true, someone should contact Pat for the typo so he can correct it in -current
anyway,
what I want to ask is
how to make the development doesn't involves root login?
Because the default web directory is owned by root,nonroot php developer can't write in that directory. So ,developer can only code in home dir but can't preview.
What's the usual workaround for this?
Any suggestion?
So I checked the modphp.conf file and saw that the path to the php5 module was wrong.
It was lib/httpd/modules/libphp5.so but the libphp5.so is located in /usr/lib/httpd/modules/libphp5.so.
I changed the path and restarted the deamon again.
yup, this is true, someone should contact Pat for the typo so he can correct it in -current
No, this is not true. The path is relative to the ServerRoot defined in httpd.conf (/usr by default), as are all the LoadModule directives.
Quote:
how to make the development doesn't involves root login?
Because the default web directory is owned by root,nonroot php developer can't write in that directory. So ,developer can only code in home dir but can't preview.
What's the usual workaround for this?
Any suggestion?
You could add a symlink from within /var/www/htdocs to the directory you like to code in. Alternatively you could make a directory in htdocs which is owned by your user. BTW, apache does not have root access either. It runs as the user and group defined in httpd.conf (apache:apache by default in apache2). If everything in htdocs is root:root, apache is only able to access them by virtue of their global privileges.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.