The Apache Server
Hi,
I wasn't sure where to post this, but here goes:
I'm playing around with PHP on the Apache server bundled with my version of OS X (10.4.6 when bought but now 10.4.10)
I'm using this code:
<?php
iniset("displayerrors", "1");
errorreporting(EALL);
$File = "YourFile.txt";
$Handle = fopen($File, 'w') or die('can\'t open file');
$Data = "Jane Doe\n";
fwrite($Handle, $Data) or die('can\'t write to file');
fclose($Handle);
?>
And it says it can't write to the file because of this:
Warning: fopen(YourFile.txt) [function.fopen]: failed to open stream: Permission denied in /Library/WebServer/Documents/php/file.php on line 2
Why is this? The permissions for the directory must be read only, or something such as, but I've checked and they all seem to state that it's read and write, but obviously not.
Any ideas?
Thanks,
George.
I needed to make the file permissions on the folder Read/Writable for the group Other. Simple really!
Similar Messages
-
How can I run a a class file on the Apache server?
Hi Guys and Gurus,
I am seeking some favor all of experienced gurus, i.e.
How can I run a a class file on the Apache server?
Actually, I want to extract some records from a MySQL Database running on Apache Server. I wrote a program just to select the columns and show them. It is now a Class file, Now how can I run this class file from the Server???
Please advise...
VJcross posted
http://forum.java.sun.com/thread.jsp?thread=299137&forum=31&message=1184025 -
URGENT PLEASE:How can I run a a class file on the Apache server?
Hi Guys and Gurus,
I am seeking some favor all of experienced gurus, i.e.
How can I run a a class file on the Apache server? Can I run through an Applet?
How can I set Environment variables in Windows2000 Professional Environment?
Actually, I want to extract some records from a MySQL Database running on Apache Server. I wrote a program just to select the columns and show them. It is now a Class file, Now how can I run this class file from the Server???
The code is here
import java.sql.*;
public class RecordShow {
public static void main(String args[]) {
String url = "jdbc:mysql://localhost/myhost";
Connection con;
String query = "select mytable.column," +
"from mytable " +
"where mytable.column = 1";
Statement stmt;
try {
Class.forName("com.mysql.jdbc.Driver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
try {
con = DriverManager.getConnection(url,
"myuser", "mypassword");
stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(query);
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
int rowCount = 1;
while (rs.next()) {
System.out.println("Row " + rowCount + ": ");
for (int i = 1; i <= numberOfColumns; i++) {
System.out.print(" Column " + i + ": ");
System.out.println(rs.getString(i));
System.out.println("");
rowCount++;
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.print("SQLException: ");
System.err.println(ex.getMessage());
Please advise... THANKS
VJEhm, I wasn't referring to you at all... read up,
there's a comment by jschell saying that CGI might be
easier/better for his purposes.
Yep.
I know PHP/Perl/whatever might be easier for some
purposes, but only if you happen to know them and want
to/are able to use them. Ok. But you aren't the one asking the question are you. And the person who asked the question seems to have absolutely no familiarity with Apache or applets.
So whatever they do they are going to have to learn a lot.
And that does indeed suggest that in all likelyhood they have not investigated the alternatives.
And for the vast majority of internet applications, especially with smaller projects (obvious this person is not working with a large team), using perl, or something besides java, is going to be the best business solution. It is simpler, and more secure (probably due to the fact that it is simpler.)
Since this is a Java forum, I
answer under the assumption that people have made a
choice one way or another to use a Java solution to
their problem, so I try to solve it in Java first, and
only when that fails (very seldom) do I turn to other
solutions.You approach problems by arbritrarily deciding to try to solve it in java first and only if you fail do you then look to other solutions?
My first step is to try to figure out which of the various avenues is going to cost less. (And a secondary, but non-trivial concern, is then to convince the customer that just because they have heard of a buzz word like 'enterprise bean' that it doesn't mean that is a cost effective solution.) We must come from different worlds. -
Limiting Connections to the Apache Server
I need to limit the number of physical TCP connections that can be made to the Apache server at any given instant. Is MaxClient the configuration parameter to use? Or, does MaxClient simply limit the number of concurrent threads supported for a given physical connection? Is there a different parameter I should be looking at? Thanks in advance for your assistance. . . .
In Windows, each Oracle instance runs as a single process. All the sessions share the same address space. Therefore, oversizing SGA_TARGET or DB_CACHE_SIZE or SHARED_POOL_SIZE etc OR oversizing PGA_AGGREGATE_TARGET and/or combined with multiple processes can mean that Oracle hits the address space limits. A general rule of thumb is that that the SGA should be less than 1.7GB.
There are extensions which allow addressing more memory space : eg using the "/PAE" switch in Windows boot. -
Where is the Apache server in eBusiness Suite
Hi:
I would like to write helloworld.jsp and want to put this file in under the Apache server and would like to run it by calling from one of the html pages in eBS
Where did the WEB-INF folder and the web.xml file for the Apache server.
Can some one help me to know the location (path) of the Apache server?
Thank you
Ali_2Ali,
As applmgr user, source the application env file and issue "echo $IAS_ORACLE_HOME", this should point to the directory where Apache files are installed (for example, apache executable file under bin directory).
Script to find Apache, Java, Jinitiator, Forms version and JVM details for Oracle E-Business Suite 11i [ID 466890.1]
Script to find Apache, Java, JRE, Forms version for Oracle E-Business Suite R12 [ID 468311.1]
Oracle Applications Concepts -- 11i/R12
http://www.oracle.com/technetwork/documentation/applications-167706.html
Thanks,
Hussein -
Where is the Apache server folder
I don't know if this is the right place to ask this question, but I"ve been on this forum for nearly and hour just LOOKING for a button that lets me post my question. I got so frustrated I actually phoned the Mac Help Linel to ask them, but they didn't know either. I looked in the forum help section but it didn't help either.
Anyway, it sounds so obvious I'm almost embarrased to ask: Where Is The Folder in which you put your Index.html file to replace the generic Apache start page which is what you see when you try to access your own computer on the web?
This question seems so blindingly obvious it makes me feel like there's something wrong with me. Perhaps I'm intellectually challenged or maybe I'm getting an early case of Alhzeimer's or Apple has a sweetheart deal with the makers of Prozac.
If anybody replies, please restrict your answers to normal plain-language English, without abbreviations. Please reply in full sentences, and assume no prior knowledge of anything beyond about Grade 3.
PowerBook G5 Mac OS X (10.4.7) also Ibook & Powermac G5> Where Is The Folder in which you put your Index.html file to replace the generic Apache start page
/Library/WebServer/Documents
It isn't obvious, but you can see if if you use Server Admin to manage your site - the DocumentRoot is where it serves files from, and that's the default. -
Rights to the apache server?
Running Apache 2.0.59 on NW 6.5 SP 7. I gave my new web master rights to
my httpdocs directory so he can handle all the web changes.
Here's the fun part...every time he makes a change to a PHP file and
saves it. Apache will display an error saying it can't find so-and-so
file that was required (require_once function in PHP). If I go in, open
his file, add a space, delete it, and save, it works again. He goes in,
add a space, delete it, and save, and it breaks again.
Is there some sort of right I have to give him so he can make changes or
something? This is so odd....
HowardHi,
Nuri Inuki <[email protected]> wrote in
news:q7qKj.1183$[email protected]:
> Guenter wrote:
>> Hi Dave,
>> "Dave Parkes" <[email protected]> wrote in
>> news:[email protected]:
>>
>>> I found that you don't need to edit the file, just (as Admin) copy it
>>> somewhere and copy it back. Use Ndir to list the ownership, that's
>>> where the problem is, but I never really got to the bottom of what
>>> Apache is looking for.
>> It's not an Apache issue but PHP seems guilty for that; another admin
>> reported to me that this issue was gone when he moved to use my PHP
>> builds.
>>
>> Gnter.
>>
> Hm...I am running your version of PHP 5.2.1, but I do notice that you
> have 5.2.4 out...maybe I should upgrade to that and see if it'll address
> the issue...
no, I dont believe that this version will fix it then; the other admin
reported that when he moved away from the Novell build....
and btw. I've already done 5.2.5 for longer, and PHP is just about to release
5.2.6, so I would then wait a bit to catch this up....
Is it possible that you did install either Apache2 or PHP with another user
account than the real admin ?
Gnter. -
Installing the Apache HTTP Server Plug-In as a Dynamic Shared Object
My environment is: Windows 2000 Server SP3 + Apache 2.0.45 + WebLogic 7.0 SP2
I followed the install guide.
1. Locate the shared object file for your platform. >>> No problem
2. Enable the shared object. >>> No problem
3. Install the Apache HTTP Server Plug-In in the Apache server with a support
program called apxs (APache eXtenSion) that builds DSO-based modules outside of
the Apache source tree, and adds the following line to the httpd.conf file:
>>> I don't know how to do this. where can I find apxs,
>>> and should I add "AddModule mod_so.c" in httpd.conf
>>> I did it, but Apache -t tell me:
>>> Syntax error on line 173 of D:/Program/Apache/Apache2/conf/httpd.conf:
Invalid command 'AddModule', perhaps mis-spelled or defined by a module not incl
uded in the server configuration
I don't understand the 4th step, where can I find 'perl' and how to use it?
thanks.For Apache 2.x I think you use LoadModule instead of AddModule. That's what
the docs say anyway.
"muli" <[email protected]> wrote in message
news:3ed558aa$[email protected]..
>
My environment is: Windows 2000 Server SP3 + Apache 2.0.45 + WebLogic 7.0SP2
>
I followed the install guide.
1. Locate the shared object file for your platform. >>> No problem
2. Enable the shared object. >>> No problem
3. Install the Apache HTTP Server Plug-In in the Apache server with asupport
program called apxs (APache eXtenSion) that builds DSO-based modulesoutside of
the Apache source tree, and adds the following line to the httpd.conffile:
I don't know how to do this. where can I find apxs,
and should I add "AddModule mod_so.c" in httpd.conf
I did it, but Apache -t tell me:
Syntax error on line 173 ofD:/Program/Apache/Apache2/conf/httpd.conf:
Invalid command 'AddModule', perhaps mis-spelled or defined by a modulenot incl
uded in the server configuration
I don't understand the 4th step, where can I find 'perl' and how to useit?
>
thanks. -
Is the Apache web server feature limited without OS X Server edition?
I couldn't really find a post that answers my question so here it is...
I want to use the built-in Apache web server (a.k.a "Web Sharing") in OSX 10.4, I was just wondering if I am limited on the amount of simultaneous connections/requests? I know only a limited amount (like 5) can connect to my system over a network, unless I install Mac OSX Server. Is the Apache Server stuck under these same restrictions? I'd rather run it from my Mac than have to make a separate linux box for the site (and I don't want to have to fork out $1,000 for OSX Server, lol). I am running Mac OS 10.4.9. If someone could tell me if they know anything regarding this, I'd appreciate it. Thank youThere are differences between the Apache installation in Mac OS X client and Mac OS X Server, but if you're likely to encounter them you should be running Server anyway.
Most of the changes relate to additional apache modules that are installed (which you could add to client if you're up to it) and performance tuning.
The latter is likely to be something you can tweak to cover your needs.
Apache will spawn a new process for each active connection, with an upper limit set to prevent it running away. The limit is higher in Mac OS X Server, but you can increase the default in Mac OS X client to better suit your needs.
Edit the file /etc/httpd/httpd.conf and look for the line:
<pre class=command>MaxClients 50</pre>
(note, your number may be different). You can change the number to any reasonable figure - but don't set it much higher than you actually expect to need. -
I have a MySql database on my Mac and I'm using Dreamweaver CS5 to generate dynamic content in PHP.
For the Site Definitions, I have Dreamweaver configured this way:
- Local Site Folder: users/bronzino1/mysite
- Testing Server Folder: Applications/MAMP/htdocs/mysite_test
- Testing Server Web URL: http://localhost/mysite_test
Here is what I am not understanding: Every time I go to test the live code on a page, it is saved to "mysite_test." If I just save the page without testing the live code, it gets saved to "mysite." I don't need two copies of every file on my machine, and I'm worried about what's going to happen when I try to test pages with pictures (which are all saved to "mysite" not "mysite_test").
Is there anyway to make my Local Site folder THE Testing Server Folder?
Thanks in advance for any help!
Elizabeth
PS - Did search the forum for an answer but I just found the same question, and some crickets.Hmm, I guees it´s better if you´d post your issues in the regular Dreamweaver Application Development forum, because I fear I can´t be of help with this, as I´m using a Windows machine and am not familiar with how such things works on a Mac.
I´m also somewhat confused about the "It is a set location proximate to applications, rather than with the rest of my data" scenario you´re describing -- in my world the traditional scenario is this:
- the "Local Site Folder" is always an absolute path and points to, say, "C:\wampserver\htdocs\whateverfolder\"
- the "Testing Server Folder" points to the very same directory
- the "Testing Server Web URL" would normally be "http://localhost/whateverfolder/", but could be different in case you´re configured the Apache Server (and your System) to rather use Virtual Hosts
It seems as if you´re explicitely tell Dreamweaver to use different physical directories (mysite vs. mysite_test), and I don´t know if this is really supported at all.
Cheers,
Günter -
How do you Configure Coldfusion MX7 Developer Version Step by Step to an Apache Server?
Please provide exact steps as to how to Configure Coldfusion
MX7 Developer Version Step by Step to an Apache Server Step by
Step. I would be using the latest Apache Server download, which
would be: apache_2.2.4-win32-x86-no_ssl.msi Please provide this
answer ASAP.... Please also provide info on what folders to point
the system to when configuring; in the version I provided it is
rather hard to figure out what folders to use. Right now the way I
did it does not work and I cannot see the administration page when
the Apache Server is Running. Should the Apache Server be Running
while installing? Also I noticed after the first install of Cold
Fusion there is another step for full configuration where you have
to go to the local host page for further configuration. What do you
have to do there? I couldn't even get to that page because I
couldn't access the admin page after I did the installation. Any
help would be very welcome. Thanks in advance.This looks promising:
http://www.sitepoint.com/article/install-coldfusion-mx-windows
Ken Ford
Adobe Community Expert
Fordwebs, LLC
http://www.fordwebs.com
"spinaweb" <[email protected]> wrote in
message
news:eorrk3$m1g$[email protected]..
> Please provide exact steps as to how to Configure
Coldfusion MX7 Developer
> Version Step by Step to an Apache Server Step by Step. I
would be using
> the
> latest Apache Server download, which would be:
> apache_2.2.4-win32-x86-no_ssl.msi Please provide this
answer ASAP....
> Please
> also provide info on what folders to point the system to
when configuring;
> in
> the version I provided it is rather hard to figure out
what folders to
> use.
> Right now the way I did it does not work and I cannot
see the
> administration
> page when the Apache Server is Running. Should the
Apache Server be
> Running
> while installing? Also I noticed after the first install
of Cold Fusion
> there
> is another step for full configuration where you have to
go to the local
> host
> page for further configuration. What do you have to do
there? I couldn't
> even
> get to that page because I couldn't access the admin
page after I did the
> installation. Any help would be very welcome. Thanks in
advance.
>
> -
Hai,
I am using WindowsNT. When i tried to create an item of image type Dr.Watson error appeared showing that an error has appeared on the Apache server. After that i couldn't start the server. When i tried to start the server on the command line it said some files are missing which are mention in the htpd.conf file. The irony is those files are present in the system. I don't know wether it could be because of PATH settings. I haven't altered the default path settings which included the directory for Apache server.
regards,
MathanA handy (and free) tool for checking out these kinds of errors is filemon, available at www.sysinternals.com
-
Problem in configuring the Mobile Server.
Hi,
I am trying to configure Mobile Server for Apache for the Apache Server. I am following the steps listed in the Installation guide. As listed in the document I did the changes in the Apache Configuration file "httpd.conf" i.e. I included the Mobile Server module confuguration file into Apache Config file. On starting the apache server I am getting following listed warning,
"[Wed Apr 28 18:14:46 2004] [warn] Loaded DSO D:\oracle\oralite\mobile\server\bin\wtgapach.DLL uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI)".
The Apache server is working and through browser I am able to access the default page. But as mentioned in the Mobile Server configuration section the Mobile server is not started or at least I do not know how to access the Mobile server through browser.
Please let me know if the cause of the warning message has any effect on the Mobile Server instantiation and if not how can I access the Mobile Server?
Thanks,
Sachin.Hi,
I am trying to install the Oracle Lite suit versioned 5.0.2 for Windows. The RDBMS is Oralce 9i (9.2.0.1). I am able to install the Mobile server. Refering the Installation mannual I am trying to configure and run the mobile serve in either standalone mode or with Oracle HTTP server. In the installation mannual it is mentioned that the HTTPD.conf file for apache http server should be modified to include the wtgapach.conf file from the Oralce Lite ORACLE_HOME\mobile\server\bin folder. On making this change and starting the apache server I am getting the error listed in the post. In the mannual it is mentioned that for standalone mode run the webtogo executable from the bin folder. On doing so I am getting a message
"D:\oracle\oralite\Mobile\Server\bin>webtogo
Unrecognized option: -Xrs"
So currently I am stuck and do not know how to start the mobile server. Please let me know the appropriate steps to start the Mobile server in stadalone as well as with Oracle HTTP server.
Also as mentioned by you I replaced the wtgapach.conf with wtgias.conf. The warning message which was displaying earlier on start of Apache is now gone but if tried to start the mobile server from the browser it is not working as expected.
Thanks and Regards,
Sachin. -
Apache Server starting up problem !
Hi,
I am getting problem in starting up the server. Right now I am using the Apache - tomcat server. I have started the Apache server and restarted the tomcat server by using restart_apache.bat .The server is starting fine.
Somehow i couldn't able to open the http://localhost:8080/ on the browser. I have read the forum answers , but it couldn't help me.
I appreciate if anyone help me out.
- balajiDid you check the port number? It may not be 8080.
What error r u geting? -
How to configure the web server
Hi there!
I'm using the Apache Server 2.0.63 and PHP 5 on my computer
and Apache is set as "loclhost" using the port 80 .They're are both
good to go but I have failed to configure Dreamweaver so that I
would be able to test my PHP projects directly from Dreamweaver.
Please help my by giving me a piece of advice or suggesting
me some useful links.
Thank you!raducutzu5 wrote:
> Hi there!
> I'm using the Apache Server 2.0.63 and PHP 5 on my
computer and Apache is set
> as "loclhost" using the port 80 .They're are both good
to go but I have failed
> to configure Dreamweaver so that I would be able to test
my PHP projects
> directly from Dreamweaver.
Open the site definition and select the Advanced tab.
In the Testing server category, use the following settings:
Server model: PHP MySQL
Access: Local/network
Testing server folder: path to site root
URL prefix: URL of site root.
Testing server folder and URL prefix both point to the same
place. The
first is the physical path, the second is the URL you use to
get there.
For example:
Testing server folder: C:\htdocs\mysite\
URL prefix:
http://localhost/mysite/
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Maybe you are looking for
-
How can I open a picture file in PS Elements after installing service pack 2?
Since I installed service pack 2 on my HP computer a week or two ago, the Photoshop "Open" tab no longer appears at the top of my Pictures screen, but rather a "Preview" tab, and I haven't been able to open a picture in Photoshop. Instead, when I do
-
How to preset the order of rows in the outer query of a correlated query ?
Good morning, I have the following simple query: select empno, ename, sal, sum(case when rn = 1 then sal else -sal end) over (order by sal, empno) as running_diff from ( select emp
-
I had contacts and pictures on my new iphone 4 from my old android. I went to sync my music and itunes account and it asked if I wanted to restore. I thought that it meant the music so i said yes. I lost all of my contacts and pictures and it set eve
-
How to read particular Sector and Block in Mifare 1k through Java?
Hi Friends.. Do you know how to read particular Sector and Block in Mifare 1K through Java?.. I've created the simple application that read data from Mifare 1K, but i've problem when i want to read the other sectors and blocks.. i tried to read the b
-
Quick Question about Transposing/Crosstab SQL or PL/SQL query
Hi All, Looking for how to transpose rows into column in SQL and/or PLSQL I've got thousands of rows in the format phone_no Code 4161231234 A 4161231234 B 4161231234 C 6471231234 A 6471231234 B 6471231234 C need to transpose this to phone_no Code_1 C