Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




How Can I Delete The Default Apache And Php On Linux?


I installed php4.0.2 and apache 1.3.12,but I use the function phpinfo() checked the version of the php,it always tells me it is 3.0.15,so I want to delete the default apache and php on linux,so I can install new php4 and apache and it can connect to the mysql.By the way how can I get rid of the php and apche which the in linux when I installed the linux.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Send Default Apache 404 Error From Php
How can I trigger the default Apache 404 error from PHP? I don't want
to specify a custom handler, I want the default handler. The reason is
that I am using mod_rewrite with Apache for my site. If certain a
certain page is requested that is not published, then I want to send
the apache default 404 error page. Currently, I am doing this to
return a custom error.

if($pageNotPublished) {
header("HTTP/1.1 404 Not Found");
// How do I send the default apache 404 message
// instead of the message below?
print("<html><body>HTTP 404 - Not Found</body></html>");
exit();
}

The default 404 error page has more details,

PHP Not Available On Apache (Linux)
I am a newbie to Linux, and therefore having a difficult time of installations that are probably quite mundane to "high-timers." I hope this is the correct newsgroup for a posting like this, but if not, please suggest other newsgroups.

I have installed PHP4 on a LInux/Mandrake machine, running Apache 1.3.12. All installations are compiled and installed in the default locations.
In the browser, I see a text printout of the .php document I'm requesting, rather than the executed form.
File types of:

AddType application/x-httpd-php .php3 .php4
AddType application/x-httpd-php-source .phps

have been added to the Apache config file.

I have a list of what PHP was compiled with, and --disable-short-tags was not one of them.

Execute permissions (755) have been added to the files I'm trying to see.
The INSTALL file called for mod_so which would be visible if httpd -l was run. It was. The five steps required in the "Quick Install" went through without a problem. Actually, I'm just trying to execute that tiny .php file that they give you... <?phpinfo()?> .

I've done the copying thing:
cp php.ini-dist /usr/local/lib/php.ini

In the INSTALL file, it calls for LoadModule php4_module libexec/libphp4.so to have an entry in Apache's config file. I don't see one. I also did a search for the libphp4.so file, and there's none to be found. A search for libphp4 shows a number of files, but none with .so extension.
This PHP installation was performed from a php-4.01pl2.tar.gz download - is this the right module?

As a note, CGI forms and MySQL queries work fine on this machine.

Apache, Php And Linux
I want to be able to use the php COM object to instantiate MS Word for a mail merge application I'm writing in php. I know this works like a charm on  a Windows Box because Windows is MS but my question is will this work on a Linux server? In order for this to work in Windows I need to change the login properties of the Apache Server and tick the box that says 'Allow service to interact with desktop '.

Php From Windows To Linux/Apache
I want to write php3-files in windows and then transfer them to a Linux-machine to run them on an Apache. Is it possible?

PHP 5.1.6 And SOAP And Apache On Linux
I thought I could just use the --enable-soap when I configure php, but
that does not seem to work. I was looking for it to create a
php_soap.so but i dont see it. I get this when I try and access the
page:
Fatal error: Class 'soapclient' not found in
/home/as411161/apache/htdocs/index4.php on line 3

If I run php from a command line, things work fine.

Is PHP The Best Language On Linux With Apache?
I am about to use server side technology with our new server (I want to begin using dynamic pages). These are the details:

Apache Web Server 1.4 on Linux Red Hat 7.1
PHP 4.06
Perl 5.6
SSL
MySQL 3.23

Could you tell me what is the best server side language to use for dynamic pages? I know PHP is becoming very popular. But I am from an ASP and JSP background. I could set up the server to use JSP and servlets etc but is there much point if PHP and Perl are installed? I've heard these are good and fast!

PHP, Apache (Linux), And Modules
I plan on installing PHP and Apache on a Linux box. (Plan on doing it with
binaries that come with Linux distro.)

One thing I'm confused about is how PHP is run as a module. I'm not that
familiar with this stuff, and I would have thought that there's something
called mod_php that needs installing. But I can't find much reference to
anything like that anywhere.

(Want to install as little stuff as possible.)

Php Configuration For Mssql On Linux With Apache
I'd like to know the easiest way to make my php access to a mssql database.

Is there something to do as easy as uncommenting an "extension" line in the php.ini file (like for win32 platform)?

Php,PhPBB,Apache,MySQL,Linux
The problem is that i must run a BulletinBoard like Helpdesk program. Somebody else made this program. but in the vacation the shutted down the linux server. Now the Database doesn't work anymore.

The error he gives is:

phpBB : Critical Error

Could not connect to the database

I installed al programs again (Apache,Php,MySQL). And then i put back the backup from the database/phpBB program. I already asked some people and they say it is maybe the link between the database and the MySQL.

Dom And Excel Under Linux/apache/php4.04
I'm wondering if there is a way for me to create an excel document and fill it with the fields that have been provided to me by the user using a form ? can it be done using dom even if I don't use windows/iis ?

I guess that under NT/IIS that whould be possible but I don't use NT/IIS I want to do this using Apache/PHP/Linux.

If not, then do you think that I could do this:
-create an empty excel document under windows
-copy it on linux
-now from linux/apache/php, every time instead of creating a new one I copy the empty excel doc to a new doc ex: empty.xls to form.xls
-create the sells I need, populate the excel doc and send it via mail ?

Running PHP 4 And PHP 5 Together As Modules, Linux, Apache 1.3.x
We have been running PHP 4.x on Apache 1.3.x with
no problems. After the first upgrade from php3 -> php4 were
were able to load both modules for php 3 and php 4 with no
problem. With an AddType directive we forced php 3 execution
for just those files ending in php3.

Thought we could do the same with php 5. We have a
lot of folks on 4 who may not be ready to upgrade yet, so
we were planning on letting php 4 handle anything ending in
..php or .php4 -- and use php 5 for just php5 extensions.

Did the same thing as before in our Apache Config,
we are running on Redhat 9 -- but can't get both 4 and 5
running together. It seems we can run one or the other, but
not both -- when we start apache we get ONE server process
that just sits there, nothing in the log files?

After some web searching could not find much, one
guy said there was a conflict in memory management and
you can't run the two together?

Anyone got this to work and how? Had posted this to
the alt..php group and still looking for a solution?

Installation Php For Ldap And Apache Under Linux
i'm trying to compile for apache the php with a link for functions ldap In a static way with apache , i have to launch a configure for apache first , then i go to php and i launch a configure --with-apache= directory apache --with-ldap = directory ldap and i finish with make and make install for php:

this is functionning The last thing to do is to activate module php for apache with the following command for apache :

./configure --activate-module=/src/modules/php3/libphp3.a

and after make and make install but when i launch the make the functions ldap aren't not found I use apache 1.3.12 , php 3.0.17 and openldap 1.2.11 and a linux mandrake 7.0.

Apache,MySql,PHP On Windows Vs. Linux
Crazy (possibly dumb) question here...
I have a site running apache, mysql, php in a Win2K environment.
Primary development is that env also. I also am setting up a linux box
(old laptop), to begin playing with Linux. I'd like to set it up
similiary with apache,mysql, php.
If I do that, and start doing some development there (Linux box) - can
I expect that when I move the php code to the windows box that it will
behave similarly as it did on Linux?
Anything to watch out for? I'm completely new to Linux...

Php,apache,mysql,phpmyadmin Bundle For Linux?
Is there a bundle that will work on RedHat 7? I wanted to check first because I heard that the RH 7 rpm's dont work right.

Installing And Running Apache 2.0.46 / Php5.0.0b1 / Suse Linux 8.2
I did the following as instructed in the docs. (see below)
everything seemed to install ok
and I started apache with no complaints, but,

1)I do not see a process for apache using ps -ef
2) In yast I see that the new apache2 version is installed but not
php5, its still on php4

any ideas ?

1. gzip -d httpd-2_0_NN.tar.gz
2. tar xvf httpd-2_0_NN.tar
3. gunzip php-NN.tar.gz
4. tar -xvf php-NN.tar
5. cd httpd-2_0_NN
6. ./configure --enable-so
7. make
8. make install

Now you have Apache 2.0.NN available under /usr/local/apache2,
configured with loadable module support and the standard MPM
prefork.
To test the installation use your normal procedure for starting
the Apache server, e.g.:
/usr/local/apache2/bin/apachectl start
and stop the server to go on with the configuration for PHP:
/usr/local/apache2/bin/apachectl stop.

9. cd ../php4-NN
10. ./configure --with-apxs2=/usr/local/apache2/bin/apxs
11. make
12. make install
13. cp php.ini-dist /usr/local/lib/php.ini

Edit your php.ini file to set PHP options. If
you prefer this file in another location, use
--with-config-file-path=/path in step 10.

14. Edit your httpd.conf file and check that these lines are
present:

LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php

The path on the right hand side of the LoadModule statement must
point
to the path of the PHP module on your system. The above statement is
correct for the steps shown above.

15. Use your normal procedure for starting the Apache server, e.g.:
/usr/local/apache2/bin/apachectl start

Libmysqlclient.so Unresolved Mysql_close On Apache Start, Non-linux
I have a successful compile with no complaints of dso php with
mysql that is getting the message, mysql_close not resolved in
libmysqlclient.so on apache start after install in libexec.

There is a suggestion in the online php docs to add something to
ld.so.conf, but we're on Tru64, don't have that option. There's also a
suggestion to set LD_LIBRARY_PATH, and I've done that at both compile
time and apache restart time with no success found.

I've put links to libmysqlclient.so in various places on my system to
get it to load at apache start, is that the problem? Is one of these
libmysqlclient.so locations looking for other same-dir mysql libraries?

Apache Conf To Make The PHP's System Command Works On Linux.
I've got a big problem to make my code works.
My system() command don't seems to work.

for that code :

$res = system($command);
echo"res = $res<br>";

the result is "res = " and the command is not executed.

I feel that it come from my Apache configuration.
However my safe_mode_exec_dir is pointing on the dir of my exec code. My OS is Unix.

Running PHP/Apache On A User Mode Linux Machine, Where To Stick Mysql?
I hope no one minds me running this past them.

I'm running a linux machine with with apache, php and mysql. This is not
accessable from the internet. I want a server that is visable to the
internet. For that purpose I am running a user mode linux machine and using
apache on that as the external looking web server. This means that stuff I
want to see on the outside is on a copy of apache that is doing little and
does not get messed around with as much as my main copy of apache.

I am not using mysql with it at the moment. If I do am I better running
mysql on the user mode machine or running a second copy of mysql on a
different port on the 'main' machine. I'm beginning to think the latter
has advantages.

High Performance And High Avalaibility Platform On Linux/Php/Apache/mySql
i'm setting up a website with a forecast traffic of 70.000 sessions and
1.000.000 pageviews a day.
I'm in trouble about the short budget I have (about 10K $) and the big
traffic and so the best architecture I can set up.
Any Idea about I can do?


Database Stores Default Number Everytime, But I Havent Set A Default Number??
Im having some problems with my database. Everytime i store a number which is longer than 10 numbers the script or database puts this number into the database: 2147483647. Its does this everytime no mather how i write the numbers and nomather how long the number is, it just needs to be over 10.

I have set any default value in the database and to be sure i havent i tried deleting the table, but same thing happends again???

GD Default DPI
I'm currently making a website that needs to edit images with adding text,
the problem is, the picture starts at 300 DPI (pixels/inch), but after GD
edits the image, it's set to 72 which i read to be the default value GD
always uses. is there a way to edit that default to a higher number, if not
are there other ways to edit images through php and still keeping the
original DPI.

Magic_quotes_gpc On By Default In PHP 4.3.3?
Prior to upgrading to PHP 4.3.3 (Windows), magic_quotes_gpc was turned off in the php.ini file. However, when I upgraded, I told the installer overwrite my previous php.ini files. I didn't have anything special in my previous version of php.ini and I wanted a clean slate.

After I upgraded to 4.3.3, I noticed that my scripts were acting strange, specifically form input. I checked php.ini and found that magic_quotes_gpc was turned on.

I unzipped the installer exe and upon inspecting the php.ini, I found the default php.ini included had magic_quotes_gpc On.

I thought they were going to set magic_quotes_gpc off by default in the later versions.

Anyone know why they did this? Was it a mistake?

What Is Better As A Default Value: NULL Or ''?
I would like to collect some statistical data and then make some reports on it. I'm creating tables for this task and i'm not sure what is better for filling default values: NULL or ''. What is optimal for storage purposes and for further reports creation?

Default Image
How can I write a function in such a way that it would look for a specific image to load. If that image exists on the server it will load it, if not it will load a default image.

Dropdown - Default Value
I want to be able to have a drop down list that doesn't necessarily have the first item as the default. The content is being populated by PHP so I have no idea how to do it.

Default Variable Value
Does php provide a built in way to use a variable's current value if
that variable is already set but to use a default value otherwise.
That is, a more compact syntax for:

$some_var = isset("$some_var") ? $some_var : "default value";

Set Column Default
we have a table  sistock with column cameramodel  varchar(30) and try to  set default value to blank with the following:

ALTER TABLE SISTOCK CHANGE COLUMN CAMERAMODEL CAMERAMODEL ENUM ('INSTOCK',
'BACKORDER','SERVICE','OBSOLETE') DEFAULT '';

and we get an error at the mysql prompt;

ImageString: How Do I Use A Font That Is Not One Of The Default 5?
I am playing with imagegd for generating images, and was wondering if there is a way I could use a font that is not one of the default 5? I remember reading somewhere about a TT font library for imagegd, but don't remember the specifics. If someone could point me in the right direction I would appreciate it.

Problem On Default Value : : MySQL
Problem on default value : : MySQL

I am facing problem in this line

`datetime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,

when I tried to crate a new table in MySQL(version 3.23.47-nt)

Default Option On Select Box
I need to make a field in a admin form to be a drop down select box. I have the field right now as: PHP Code:

Using Default DB, User, Password
How do I use odbc.default_db, odbc.default_user and odbc.default_password defined in php.ini in the mssql_connect() function? I do not want to define these vars globally at the application level for many reasons. Shouldn’t calling the function without any parameters force PHP to look at the INI file for the defaults?

Form With To Submits, Which One To Default To?
Say, I have a form. Both cancel and save (in that order) are submits, then in the code I check which button was pressed. The point is that I want the save button (2nd) to be default, not the cancel. Is there a way (in js?) to "focus" the other button? One other way to be some simple js, which submits the page anyway......

Object Default Value In Constructor
I'm trying to write a class with a constructor that takes a single object
parameter. So far so good, but I can't for the life of me make the parameter
optional. I understand how to do it with a numerical or textual parameter,
but not with an object. I tried null, but it doesn't work.

class A
{
}

class B
{
function B($a = ???)
{
if (!isset($a)) $a = new A;
}
}

Default Selection From Query
I'm having difficulty trying to have a DEFAULT selected record from a query in my dropdown box (code below). I have about 20 records in a 'facility' table, which listed names of our company's locations. I want to default select one of those records "exton" to be selected in my dropdown box. Code:

PHP Default Host Best Practices
I've got my dev and production environments all setup, and the mysql
DBs working fine. What need to do is set the mysql.default_host option
in php.ini to be one thing on dev, and something different on
production. Unfortunately, my web host doesn't allow me to mess with
php.ini.

So, what's the best way to specify a different host to mysql_connect()
on dev and production. Yes, I could manually edit the variable
everything I FTP, but I'd rather not.

Should I use a global variable in a separate include file? Other
options?

Default Argument Values
something like this possible in PHP:

function foo($a=1, $b=2, $c=3) {
//...
}

foo($b=2);

Will this assign $a and $c to default values?

How To Overwrite Default Php Installation
On my linux system php seems to have been installed by default. When I
type:

"which php" it tells me /usr/bin/php

I installed php and it has put an executable in the /usr/local/bin/php

"which php" still says /usr/bin/php

"whereis php"
php: /etc/php.ini /usr/bin/php /usr/local/bin/php /usr/local/lib/php
/usr/local/lib/php.ini

/usr/local/lib/php -v shows the new version but php -v shows the old
version.

How can I correct this problem?

I want to run the command php -v and it shows the newest version.

I have already tried removing /etc/php.ini /usr/bin/php

Default Value To Insert Into MySQL
What should I insert as the default value if a form field is blank? My fields don't currently accept null.

if($_POST['height']) {
  // error checking
  $height = $_POST['height'];
}
else {
  $height = '';
}
Should $height be equal to '', NULL, or maybe 'NULL'? I'm thinking 'NULL' incase I or someone else decides to change the field to accept null?

PHP Session Default Timeout
what is the default Session Timeout for php...is there a way to increase this on the web server I am hostign my php scripts on..

Default Error Message
How to prevent the default error message from being  displayed ?

Default Date Drop Down
Ive got the following drop down which works perfectly, although the default date is set to todays date. Could you please advise me on how to set it to show -- -- ---- instead of 31 05 2007? Code:

Php's Default Character Set
Where does it say that on php.net, that iso8859 is the default charset for strings? Can't find anything about it.

Display A Default Image?
Is there an "if" statement I can use to check if an image exists in a certain directory, and if it does display it, but if it doesn't exist then display another image in a different directory? I've written simple "if" statements for text display, but nothing like this. Is this possible?

It might help to tell the scenario. I am putting together templates for teacher web sites. If they wish, they can upload their own logo into their upload directory to display at the top of the page, but if they choose not to upload their own logo I want the default (district) logo to appear there. The default logo is located in another directory on the same server.

Default Error Page If No Rows
If there are no rows in the result of my query, instead of just showing some text in the browser saying no rows found, could i redirect to a standard error page using this function?

Need Access To Default File Attributes
When I was first learning php, I created an upload script. The basics of the script had:

<form method="POST" ENCTYPE="multipart/form-data">
<input type="file" name="FILE">
<input type="submit" name="SUBMIT" value="Upload">
</form>

Then in the submit section, it accesses the filename and filesize by virtue of a default php ability to extract these attributes by using: $FILE_name and $FILE_size (where _name gives the name of $FILE and _size gives the size of $FILE).

if($SUBMIT)
echo " Filename: $FILE_name <br> Filesize: $FILE_size";

Also, I did add the necessary lines to handle the post variables, like so:

$FILE = $_POST['FILE'];
$SUBMIT = $_POST['SUBMIT'];

I have tried to mimic this script in a new upload script, but am unable to access those same attributes (_name and _size).

At the time of my original upload script, we were running it on a Linux server (but I don't remember what we were running for a php version). Currently, I am running PHP 4.2.3 on Mac OS 10.2.8 server.

One thought I had was that maybe PHP 4.2.3 no longer supports _name and _size. Or, maybe I am not handling the retrieval of the POST var for the file correctly? I wonder this because I did try print_r($_POST) and I only got the submit returned as a post var.

Dropdown List - Trying To Get Default Populated From Db.
Nooby question but when I try and get this to work (it should identify which
rows in the database have GK, MID, DEF, FWD against them and then put
SELECTED into the option value to give a default of what the entry is
currently) it just adds SELECTED to all the results as if $row["Position"]
is returning true against all four conditions? What am I doing wrong? CODE:..

Entering The Date As Default Within A Form
Anyone know how to enter the time into a form or a website that might
tell how? I'm using the following html code and trying to get the
time to default into the text box. thanks

html code
<tr>
<td><b>Date:</b></td>
<td align="left"><input type="text" name="date" size="8"
maxlength="8"></td>
</tr>

php code
<? print strftime("%m/%d/%Y"); ?>

Default Function Argument Issue
function test($foo=array()) {
echo gettype($foo);
implode(' ',$foo);
}

foo();

This code will output:
null

and generate the error
Bad arguments. in .... on line x ( bad implode args )

what's the deal?
$foo should be an array!


Copyright © 2005-08 www.BigResource.com, All rights reserved