Click to See Complete Forum and Search --> : Apache PHP3 and MySql
mrstella
11-28-2000, 01:46 PM
I am having a couple of problems, i think i know what the problem is but i do not know how to resolve it http://www.linuxnewbie.org/ubb/frown.gif
I have added phpmyadmin to enable me to administer the SQL server from afar. However when i try and open the .php3 html page i get an error "Fatal Error: Call to unsupported or undefined function mysql_connect() in lib.inc.php3 on line 255"
Now i think that PHP is not setup to use Mysql as it works fine with Apache when trying the test page.
I have searched through the NHF's and this board and found a couple of posts but they are about installing all the software in order etc. Think it was sweede's NHF.
Is there anyway that i can just add the compatibility on after the fact or do i have to resinstall PHP/Apache/Mysql again in the proper way.
Any help would be gratefull.
Best Regards
Peter
------------------
WakeBDr
11-28-2000, 03:27 PM
Is there an NHF on installing modules into Apache?
------------------
Your mouse has moved. Windows must reboot for the changes to take effect.
Sweede
11-28-2000, 05:14 PM
There is, but personaly (no offence to the person who wrote it), i do not like it.
i wrote one, but i actually never submited it because i would be updating it damn near every other day as i learn more tricks about php/apache/mysql
i need to play around the apache RPM just to learn whats going on with that, as opposed to using source all the time.
if you did infact use rpm'd apache, then updating will be as easy downloading the source to php4.0.3pl1 , and running
./configure --with-apxs=/usr/sbin/apxs [other options]
make
make install
and then restart apache,
if your using php3 right now, you will have to change a couple lines in the httpd.conf file.
remove...
AddType application/x-httpd-php3 .php
AddType application/x-httpd-php3-source .phps
and then add
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
btw, there is no logical reason to support both php3 and php4.
[This message has been edited by Sweede (edited 28 November 2000).]
The King Ant
11-28-2000, 06:15 PM
Doesn't php have to be compiled with mysql support? If you're using RedHat's php rpm that might be the case (the 7.0 php rpm might have mysql support though, I'm not sure).
You can see if you have mysql support by making a php3 page and calling the function "phpinfo();", then loading it in a web browser
Sweede
11-28-2000, 08:54 PM
dont use php 3. its outdated, slower and just old and nasty.
php 4 is everything better than php3.
php 4 has built in mysql support (its own libraries), that work perfectly except if you've got like, 3 or 4 modules working with apache, that use MySQL (such as mod_auth_mysql)
use php4.0.3pl1
mrstella
11-29-2000, 06:00 AM
Ok
Thx Sweede, i will download PHP4 now and give what u say a whirl and touch wood it will work http://www.linuxnewbie.org/ubb/wink.gif
Thx
Peter
mrstella
11-29-2000, 09:07 AM
http://www.linuxnewbie.org/ubb/frown.gif
I done the install as you said but when starting the apache server again i got the following error:-
Cannot load /etc/httpd/lib/apache/libphp4.so into server cannot open shared folder file does not exist.
So i created the folders and copied the libphp4.so file into it, when i rebooted the Apache server started ok but as soon as i got to the desktop it had shut back down again so i could not access any html files.
when i run ps - aux no HTTPD services are listed at all http://www.linuxnewbie.org/ubb/frown.gif
Any ideas otherwise its time for IIS and Win2k http://www.linuxnewbie.org/ubb/smile.gif
Regards
Peter
Sweede
11-29-2000, 03:26 PM
check your error_log
Sweede
11-29-2000, 03:57 PM
http://www.linuxnewbie.org/ubb/Forum21/HTML/001230.html
mrstella
11-30-2000, 12:25 PM
ok i have decided to start over again http://www.linuxnewbie.org/ubb/wink.gif
I have downloaded all the source files (instead of using the RPM's that came with RH 6.2)for Apache/PHP/MySQL and the Frontpage Extensions.
What order would you recommend installing them, MySQL first then Apache and PHP and lastly the F/Page Extensions.
Regards
Peter
Sweede
11-30-2000, 03:46 PM
if your using frontpage, i got a much better way of doing it.
http://home.edo.uni-dortmund.de/~chripo/index.html
MUCH better security, a whole hell of a lot simpler to setup. you dont need to edit the httpd.conf file or restart apache.
the install instructions are fairly simple.
MySQL is totally 100% seperate from apache/php or anything like that. and its always best to install that from RPM (have had hell of a time getting source to work correctly).
if you'd like to play around with transaction support in MySQL, i have a set of RPMS that will compile with transactions, let me know.
i've been thinking about making an apache_1.3.14+ImproveModFrontpage RPM, but i dont know how to make a spec file and to lazy to modify the current one (because there is about 30 patches to it).
if you need any help, just let me know.
mrstella
11-30-2000, 04:21 PM
Thx for your help Sweede.
Will have a bash at getting all up and running in the morning. Havent had 2 many probs installing the FP extensions for once the instructions on MS site seem fairly good. What screwed the system up last time was installing PHP4 but that was probably down to me being an idiot at some stage http://www.linuxnewbie.org/ubb/wink.gif
So i can safely install Mysql at any stage it doesnt matter now with PHP4 having support built into it unlike PHP3 ??
Thx again for all your help. Cold beers on there way http://www.linuxnewbie.org/ubb/wink.gif
Regards
Peter
Sweede
11-30-2000, 05:02 PM
all true, yep.
the problem with old frontpage style was that i was VERY insecure because it required files/folders 777 and it ran as the http user. all which is bad.
this new mod_frontpage patches apache to do the frontpage stuff internally, instead of making calls to auth.exe and admin.exe (or whatever). when it does this, it also uses fpexec (a modified suexec), which runs as the user of the virtual-domain, instead of the httpd user.
now the most a hacker can mess up is the users directory and nothing else (this also requires that your users are intellegent enough NOT to use 777 for anything.
i'd highly recommend the improved mod_frontpage over whatever ms uses.
also, do you plan on using SSL ?
because that'll change things even more...
see why i havent wrote an NHF yet !
although i could write an online configure script maker though.....
mrstella
12-05-2000, 09:23 AM
Hi Sweede
Thx for your help after much hair pulling and alcahol abuse its all finally up and running http://www.linuxnewbie.org/ubb/smile.gif http://www.linuxnewbie.org/ubb/smile.gif http://www.linuxnewbie.org/ubb/smile.gif
Thx again
Regards
Peter