DreamHost Discussion Board http://discussion.dreamhost.com/postlist.pl?Board=forum_programming Posts in the "forum_programming" forum at the DreamHost Discussion Board! Sun, 27 Jul 2008 01:55:02 -0700 http://discussion.dreamhost.com/ en Re: How to connect to mysql with php http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109056&page=0&view=collapsed&sb=5&o=14&vc=1#Post109056 Fri, 25 Jul 2008 20:25:36 -0700 pangea33 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109056&page=0&view=collapsed&sb=5&o=14&vc=1#Post109056 Post Reply?

Thanks for your forum etiquette, it's nice to see. Does everything seem to be resolved now? If not please post back.

]]> Post Reply?

Thanks for your forum etiquette, it's nice to see. Does everything seem to be resolved now? If not please post back.

]]> Customized cron path http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109052&page=0&view=collapsed&sb=5&o=14&vc=1#Post109052 Fri, 25 Jul 2008 17:02:00 -0700 bjhess forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109052&page=0&view=collapsed&sb=5&o=14&vc=1#Post109052 Post Reply?

I have a custom gem source installed in ~/.gems. My ~/.bashrc looks like:

export GEM_HOME="$HOME/.gems"
export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/1.8"
export PATH="$HOME/.gems/bin:$PATH"

My ~/.gemrc looks like:

gemhome: /home/bjhess/.gems
gempath:
- /home/bjhess/.gems
- /usr/lib/ruby/gems/1.8

So. I can run ruby jobs with special "requires" from my local gems fine via the command-line. However, when shoving the command into a recurring cron task, I get "no such file to load" errors:

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- flickr_fu (LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /home/.../.../scripts/slurp_flickr.rb:2

And if I try to call a command directly provided by a local gem (say, "staticmatic"), I get:

/bin/sh: line 1: staticmatic: command not found

What paths do I need to update to make these custom gems available from cron? I've scoured the 'net and the cron wiki for answers, but I can't fine 'em!

TIA,

Barry

]]> Post Reply?

I have a custom gem source installed in ~/.gems. My ~/.bashrc looks like:

export GEM_HOME="$HOME/.gems"
export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/1.8"
export PATH="$HOME/.gems/bin:$PATH"

My ~/.gemrc looks like:

gemhome: /home/bjhess/.gems
gempath:
- /home/bjhess/.gems
- /usr/lib/ruby/gems/1.8

So. I can run ruby jobs with special "requires" from my local gems fine via the command-line. However, when shoving the command into a recurring cron task, I get "no such file to load" errors:

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- flickr_fu (LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /home/.../.../scripts/slurp_flickr.rb:2

And if I try to call a command directly provided by a local gem (say, "staticmatic"), I get:

/bin/sh: line 1: staticmatic: command not found

What paths do I need to update to make these custom gems available from cron? I've scoured the 'net and the cron wiki for answers, but I can't fine 'em!

TIA,

Barry

]]> Re: How to connect to mysql with php http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109047&page=0&view=collapsed&sb=5&o=14&vc=1#Post109047 Fri, 25 Jul 2008 15:48:08 -0700 Brad99 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109047&page=0&view=collapsed&sb=5&o=14&vc=1#Post109047 Post Reply?

I think I might be connected now. My problem was that I had double quotes around all my variables of username, password, db name and hostname...

]]> Post Reply?

I think I might be connected now. My problem was that I had double quotes around all my variables of username, password, db name and hostname...

]]> Re: How to connect to mysql with php http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109046&page=0&view=collapsed&sb=5&o=14&vc=1#Post109046 Fri, 25 Jul 2008 15:31:46 -0700 Brad99 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109046&page=0&view=collapsed&sb=5&o=14&vc=1#Post109046 Post Reply?

Maybe I can't even connect this way.

I have a php file called output.php which required dbinfo.php to connect.

Its getting to the connection and saying access is denied. I'm just hitting the url in IE.

www.myurl.com/output.php

Is that doable?

]]> Post Reply?

Maybe I can't even connect this way.

I have a php file called output.php which required dbinfo.php to connect.

Its getting to the connection and saying access is denied. I'm just hitting the url in IE.

www.myurl.com/output.php

Is that doable?

]]> Re: How to connect to mysql with php http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109044&page=0&view=collapsed&sb=5&o=14&vc=1#Post109044 Fri, 25 Jul 2008 15:12:56 -0700 Brad99 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109044&page=0&view=collapsed&sb=5&o=14&vc=1#Post109044 Post Reply?

I have the php file on the server and I'm just trying to hit the file in IE.

I made the database earlier and I have connected through the web based phpadmin. I've checked over the user, password and added your advice to the hostname. I'm kinda stumped now...

I got this code and it looks reasonable...I have a require statement which holds these variables.

// Opens a connection to a mySQL server
$connection=mysql_connect ($hostname, $username, $password);
if (!$connection) {
die('Not connected : ' . mysql_error());
}

// Set the active mySQL database
$db_selected = mysql_select_db($database, $connection);
if (!$db_selected) {
die ('Can\'t use db : ' . mysql_error());
}

Edited by Brad99 on 07/25/08 03:14 PM (server time).

]]>
Post Reply?

I have the php file on the server and I'm just trying to hit the file in IE.

I made the database earlier and I have connected through the web based phpadmin. I've checked over the user, password and added your advice to the hostname. I'm kinda stumped now...

I got this code and it looks reasonable...I have a require statement which holds these variables.

// Opens a connection to a mySQL server
$connection=mysql_connect ($hostname, $username, $password);
if (!$connection) {
die('Not connected : ' . mysql_error());
}

// Set the active mySQL database
$db_selected = mysql_select_db($database, $connection);
if (!$db_selected) {
die ('Can\'t use db : ' . mysql_error());
}

Edited by Brad99 on 07/25/08 03:14 PM (server time).

]]>
Re: How to connect to mysql with php http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109043&page=0&view=collapsed&sb=5&o=14&vc=1#Post109043 Fri, 25 Jul 2008 15:07:40 -0700 norm1037 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109043&page=0&view=collapsed&sb=5&o=14&vc=1#Post109043 Post Reply?

Are you running a php script that is trying to access the MySQL database locally on your account or are you trying to access it remotely say from home/work?


Check your script uses your MySQL hostname,user and password and that they have been entered correctly.


--
Norm


Opinions are my own views, not DreamHosts'.
I am NOT a DreamHost employee OK!

Act on my advice at your own risk! ]]> Post Reply?

Are you running a php script that is trying to access the MySQL database locally on your account or are you trying to access it remotely say from home/work?


Check your script uses your MySQL hostname,user and password and that they have been entered correctly.


--
Norm


Opinions are my own views, not DreamHosts'.
I am NOT a DreamHost employee OK!

Act on my advice at your own risk! ]]> Re: How to connect to mysql with php http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109042&page=0&view=collapsed&sb=5&o=14&vc=1#Post109042 Fri, 25 Jul 2008 14:42:20 -0700 Brad99 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109042&page=0&view=collapsed&sb=5&o=14&vc=1#Post109042 Post Reply?

Getting acces denied, so I must have more than that wrong...ugh

Thanks for the advice! I was wondering what that 2nd chance at making a hostname was all about...

Is this nitti stuff correct when trying to connect?

Not connected : Access denied for user 'sid'@'nitti.dreamhost.com' (using password: YES

Edited by Brad99 on 07/25/08 02:52 PM (server time).

]]>
Post Reply?

Getting acces denied, so I must have more than that wrong...ugh

Thanks for the advice! I was wondering what that 2nd chance at making a hostname was all about...

Is this nitti stuff correct when trying to connect?

Not connected : Access denied for user 'sid'@'nitti.dreamhost.com' (using password: YES

Edited by Brad99 on 07/25/08 02:52 PM (server time).

]]>
Re: How to connect to mysql with php http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109041&page=0&view=collapsed&sb=5&o=14&vc=1#Post109041 Fri, 25 Jul 2008 14:27:33 -0700 norm1037 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109041&page=0&view=collapsed&sb=5&o=14&vc=1#Post109041 Post Reply?

When you create the database using the DreamHost control panel you will see that you are given the choice to create your own Hostname or accept the default of mysql.example.com.

You must use this hostname. You cannot use 'localhost' with DreamHost.

So in your scripts wherever you see 'localhost' use the correct mysql hostname.

See here


--
Norm


Opinions are my own views, not DreamHosts'.
I am NOT a DreamHost employee OK!

Act on my advice at your own risk! ]]> Post Reply?

When you create the database using the DreamHost control panel you will see that you are given the choice to create your own Hostname or accept the default of mysql.example.com.

You must use this hostname. You cannot use 'localhost' with DreamHost.

So in your scripts wherever you see 'localhost' use the correct mysql hostname.

See here


--
Norm


Opinions are my own views, not DreamHosts'.
I am NOT a DreamHost employee OK!

Act on my advice at your own risk! ]]> How to connect to mysql with php http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109039&page=0&view=collapsed&sb=5&o=14&vc=1#Post109039 Fri, 25 Jul 2008 13:38:55 -0700 Brad99 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109039&page=0&view=collapsed&sb=5&o=14&vc=1#Post109039 Post Reply?

Hi, I am looking for advice as to what to use for the server name(I used localhost) parameter when trying to connect to a mysql database. I am using this but getting an error. Any ideas?

$connection=mysql_connect (localhost, $username, $password);
if (!$connection) {
die('Not connected : ' . mysql_error());

]]> Post Reply?

Hi, I am looking for advice as to what to use for the server name(I used localhost) parameter when trying to connect to a mysql database. I am using this but getting an error. Any ideas?

$connection=mysql_connect (localhost, $username, $password);
if (!$connection) {
die('Not connected : ' . mysql_error());

]]> Re: Upload via FTP or PHP http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109032&page=0&view=collapsed&sb=5&o=14&vc=1#Post109032 Fri, 25 Jul 2008 09:57:33 -0700 jlrray forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109032&page=0&view=collapsed&sb=5&o=14&vc=1#Post109032 Post Reply?

That is exactly the type of solution I'm looking for. I've been playing with different scripts all to various degrees of success. The flash ones have not been behaving well with my htaccess files (im assuming) and the PHP will definately have the limits. Since I'm comfortable with PERL your script may be the answer. Thanks!

]]> Post Reply?

That is exactly the type of solution I'm looking for. I've been playing with different scripts all to various degrees of success. The flash ones have not been behaving well with my htaccess files (im assuming) and the PHP will definately have the limits. Since I'm comfortable with PERL your script may be the answer. Thanks!

]]> re: htaccess help http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109030&page=0&view=collapsed&sb=5&o=14&vc=1#Post109030 Fri, 25 Jul 2008 09:30:19 -0700 dpix forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109030&page=0&view=collapsed&sb=5&o=14&vc=1#Post109030 Post Reply?

I would be hugely appreciative if someone could help me solve a redirection issue I'm having. This is our current htaccess code:

RewriteEngine on
RewriteRule tag/(.+) http://www.domain.com/pub/mt-search.cgi?tag=$1&blog_id=34&Template=stare

The problem with this is that while http://www.domain.com/tag/example will redirect and search our CMS correctly, the redirection changes the URL.

Can someone please tell what we can do to this htaccess code so that the http://www.domain.com/tag/example will be 'sticky' and not display the CMS search URL.

Much thanks!

]]> Post Reply?

I would be hugely appreciative if someone could help me solve a redirection issue I'm having. This is our current htaccess code:

RewriteEngine on
RewriteRule tag/(.+) http://www.domain.com/pub/mt-search.cgi?tag=$1&blog_id=34&Template=stare

The problem with this is that while http://www.domain.com/tag/example will redirect and search our CMS correctly, the redirection changes the URL.

Can someone please tell what we can do to this htaccess code so that the http://www.domain.com/tag/example will be 'sticky' and not display the CMS search URL.

Much thanks!

]]> Re: Upload via FTP or PHP http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109027&page=0&view=collapsed&sb=5&o=14&vc=1#Post109027 Thu, 24 Jul 2008 23:57:31 -0700 rlparker forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109027&page=0&view=collapsed&sb=5&o=14&vc=1#Post109027 Post Reply?

This question comes up continually, and while there are a lot of ways to approach the issue, I think the best approach is to use a script to facilitate the uploads (I know, I sound like a broken record with what follows ).

To me this is preferable to kludging together an FTP based arrangement because it is more secure and much more easily managed.

If the use of FTP (or, preferably SFTP for security reasons) is not an absolute requirement, you might consider an alternative approach. By providing a script-based uploading tool (or even a "filemanager" type application) accessible by users via a browser. You can eliminate the multiple users management issues and retain a single user (yourself, or the "master" user) as "owner" of all the files.

This "plays well with others" in that there are no suEXEC permissions issues, and you can manage *all* the files conveniently from your own user's account without having to jump through hoops.

There are *many* such programs readily and "freely" available that can provide this function (with varying degrees of quality, flexibility, and security) but you have to watch out for the PHP based scripts if you have files larger than 7MB because of the DreamHost default PHP max_upload_filesize setting.

One script that I use, and recommend, is uber-uploader. This is particularly nice in that it is focused on the single function of facilitating uploads, and because of the way in which it uses both PHP and perl, it is not constrained by a given PHP environment's max_upload_filesize settings.

By installing a copy of this (protected by .htaccess based apache authentication), and having the users place all files only in the designated sub-dir, you can allow convenient uploading to the appropriate directories while preventing "up-tree" exploring.

This is the method I use in similar situations, and I have found it to work very well - most users needing to upload find the web-based upload interface to be easier to use than FTP, and they are far less likely, in my experience, to "bork" stuff up that way than they are using FTP. I also think it's more secure.

The big added advantage is that at the end of the day *your user* owns all the files, and that saves a lot of management hassles.

--rlparker
--DreamHost Tech Support ]]> Post Reply?

This question comes up continually, and while there are a lot of ways to approach the issue, I think the best approach is to use a script to facilitate the uploads (I know, I sound like a broken record with what follows ).

To me this is preferable to kludging together an FTP based arrangement because it is more secure and much more easily managed.

If the use of FTP (or, preferably SFTP for security reasons) is not an absolute requirement, you might consider an alternative approach. By providing a script-based uploading tool (or even a "filemanager" type application) accessible by users via a browser. You can eliminate the multiple users management issues and retain a single user (yourself, or the "master" user) as "owner" of all the files.

This "plays well with others" in that there are no suEXEC permissions issues, and you can manage *all* the files conveniently from your own user's account without having to jump through hoops.

There are *many* such programs readily and "freely" available that can provide this function (with varying degrees of quality, flexibility, and security) but you have to watch out for the PHP based scripts if you have files larger than 7MB because of the DreamHost default PHP max_upload_filesize setting.

One script that I use, and recommend, is uber-uploader. This is particularly nice in that it is focused on the single function of facilitating uploads, and because of the way in which it uses both PHP and perl, it is not constrained by a given PHP environment's max_upload_filesize settings.

By installing a copy of this (protected by .htaccess based apache authentication), and having the users place all files only in the designated sub-dir, you can allow convenient uploading to the appropriate directories while preventing "up-tree" exploring.

This is the method I use in similar situations, and I have found it to work very well - most users needing to upload find the web-based upload interface to be easier to use than FTP, and they are far less likely, in my experience, to "bork" stuff up that way than they are using FTP. I also think it's more secure.

The big added advantage is that at the end of the day *your user* owns all the files, and that saves a lot of management hassles.

--rlparker
--DreamHost Tech Support ]]> Upload via FTP or PHP http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109024&page=0&view=collapsed&sb=5&o=14&vc=1#Post109024 Thu, 24 Jul 2008 22:11:38 -0700 jlrray forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109024&page=0&view=collapsed&sb=5&o=14&vc=1#Post109024 Post Reply?

I need a bunch of clients to be able to upload some PDF or DOC files. I was thinking of a PHP script to upload files but I heard there was a limitation of size. Some of the files being uploaded are near 10 MB large. If PHP wont work, do you guys know of a way to create individual ftp accounts and 1 account to manage all of them.

]]> Post Reply?

I need a bunch of clients to be able to upload some PDF or DOC files. I was thinking of a PHP script to upload files but I heard there was a limitation of size. Some of the files being uploaded are near 10 MB large. If PHP wont work, do you guys know of a way to create individual ftp accounts and 1 account to manage all of them.

]]> Re: MySQL Selection Help http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109023&page=0&view=collapsed&sb=5&o=14&vc=1#Post109023 Thu, 24 Jul 2008 21:21:19 -0700 maxhugen forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109023&page=0&view=collapsed&sb=5&o=14&vc=1#Post109023 Post Reply?

You'd have to retrieve that yourself, using a select, eg:

SELECT user_id FROM user WHERE username ='fred' AND password='flintstone';

(or similar!)

]]> Post Reply?

You'd have to retrieve that yourself, using a select, eg:

SELECT user_id FROM user WHERE username ='fred' AND password='flintstone';

(or similar!)

]]> MySQL Selection Help http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109017&page=0&view=collapsed&sb=5&o=14&vc=1#Post109017 Thu, 24 Jul 2008 17:52:01 -0700 Joseph Witchard forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=109017&page=0&view=collapsed&sb=5&o=14&vc=1#Post109017 Post Reply?

When you're selecting a username and password from your database, how do you write your PHP script where it selects the correct user_id for that username and password? Or does the database do it for you when you tell it which username and password to retrieve in the WHERE clause (provided you write the query to retrieve the user_id as well, of course).

]]> Post Reply?

When you're selecting a username and password from your database, how do you write your PHP script where it selects the correct user_id for that username and password? Or does the database do it for you when you tell it which username and password to retrieve in the WHERE clause (provided you write the query to retrieve the user_id as well, of course).

]]> Re: PHP upload progress http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108985&page=0&view=collapsed&sb=5&o=14&vc=1#Post108985 Wed, 23 Jul 2008 21:25:30 -0700 sXi forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108985&page=0&view=collapsed&sb=5&o=14&vc=1#Post108985 Post Reply?

Did you implement the (undocumented) hook?

Add apc.rfc1867 = 1 to your php.ini


Maximum Cash Discount on any plan with MAXCASH
]]> Post Reply?

Did you implement the (undocumented) hook?

Add apc.rfc1867 = 1 to your php.ini


Maximum Cash Discount on any plan with MAXCASH
]]> Re: mySQL database duplication http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108984&page=0&view=collapsed&sb=5&o=14&vc=1#Post108984 Wed, 23 Jul 2008 21:16:46 -0700 sXi forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108984&page=0&view=collapsed&sb=5&o=14&vc=1#Post108984 Post Reply?

Export the content and Import it into a new database.


Maximum Cash Discount on any plan with MAXCASH
]]> Post Reply?

Export the content and Import it into a new database.


Maximum Cash Discount on any plan with MAXCASH
]]> mySQL database duplication http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108976&page=0&view=collapsed&sb=5&o=14&vc=1#Post108976 Wed, 23 Jul 2008 16:28:21 -0700 orionsbelt forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108976&page=0&view=collapsed&sb=5&o=14&vc=1#Post108976 Post Reply?

Is there a way to duplicate an existing database?

]]> Post Reply?

Is there a way to duplicate an existing database?

]]> PHP upload progress http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108934&page=0&view=collapsed&sb=5&o=14&vc=1#Post108934 Tue, 22 Jul 2008 11:49:25 -0700 n3ldan forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108934&page=0&view=collapsed&sb=5&o=14&vc=1#Post108934 Post Reply?

Okay, I got custom php5, got apc for it. Everything works in that regards.

I tried Rasmus' upload progress script (http://progphp.com/progress.phps). It always returns false instead of returning progress.

$status = apc_fetch('upload_'.$_GET['progress_key']);

That's the relevant line. This code works on other servers, anybody know what's up?

]]> Post Reply?

Okay, I got custom php5, got apc for it. Everything works in that regards.

I tried Rasmus' upload progress script (http://progphp.com/progress.phps). It always returns false instead of returning progress.

$status = apc_fetch('upload_'.$_GET['progress_key']);

That's the relevant line. This code works on other servers, anybody know what's up?

]]> Re: Bypassing Mod_rewrite http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108914&page=0&view=collapsed&sb=5&o=14&vc=1#Post108914 Mon, 21 Jul 2008 22:02:17 -0700 Atropos7 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108914&page=0&view=collapsed&sb=5&o=14&vc=1#Post108914 Post Reply?

In reply to:

For example if I do an image source of /~1/image.jpg I'd like to be able to do it just like that instead of http://www.gwcmayhem.com/~1.... having to spell out the entire domain of the main site just to load images, CSS, other scripts, javascript, etc.


Try adding a RewrtieCond with a test for a URL that matches "/"

ie
RewriteCond %{REQUEST_URI} ^/$

openvein.org -//- One-time $50.00 discount on DreamHost plans: Use ATROPOS7

Edited by Atropos7 on 07/21/08 10:05 PM (server time).

]]>
Post Reply?

In reply to:

For example if I do an image source of /~1/image.jpg I'd like to be able to do it just like that instead of http://www.gwcmayhem.com/~1.... having to spell out the entire domain of the main site just to load images, CSS, other scripts, javascript, etc.


Try adding a RewrtieCond with a test for a URL that matches "/"

ie
RewriteCond %{REQUEST_URI} ^/$

openvein.org -//- One-time $50.00 discount on DreamHost plans: Use ATROPOS7

Edited by Atropos7 on 07/21/08 10:05 PM (server time).

]]>
Re: PDF and PHP http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108903&page=0&view=collapsed&sb=5&o=14&vc=1#Post108903 Mon, 21 Jul 2008 17:14:05 -0700 GFv forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108903&page=0&view=collapsed&sb=5&o=14&vc=1#Post108903 Post Reply?

Solved by using ImageMagick ;)


]]> Post Reply?

Solved by using ImageMagick ;)


]]> Bypassing Mod_rewrite http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108901&page=0&view=collapsed&sb=5&o=14&vc=1#Post108901 Mon, 21 Jul 2008 16:10:33 -0700 kblessing forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108901&page=0&view=collapsed&sb=5&o=14&vc=1#Post108901 Post Reply?

Hello, I got this .htaccess setup on gwcmayhem.com

In reply to:


Options +FollowSymLinks

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} !^(www|webmail|ftp|mail|stats|mailboxes)\.gwcmayhem\.com [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.gwcmayhem\.com$ [NC]
RewriteRule ^.*$ /home/kblessing/gwcmayhem.com/view.php?member=%1 [L]

RewriteRule ^~(.*)/avatar.jpg /avatar.php?id=$1 [L]
RewriteRule ^~(.*)/(.*).jpg /userimg/$1/$2.jpg [L]



Basically it does what I want in regards of the subdomain passing it on to view.php

But I would like it if every other path (ie: if theres actually something behind the domain's / ) was treated as if it was on the main site.

For example if I do an image source of /~1/image.jpg I'd like to be able to do it just like that instead of http://www.gwcmayhem.com/~1.... having to spell out the entire domain of the main site just to load images, CSS, other scripts, javascript, etc.


-Karl Blessing ]]> Post Reply?

Hello, I got this .htaccess setup on gwcmayhem.com

In reply to:


Options +FollowSymLinks

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} !^(www|webmail|ftp|mail|stats|mailboxes)\.gwcmayhem\.com [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.gwcmayhem\.com$ [NC]
RewriteRule ^.*$ /home/kblessing/gwcmayhem.com/view.php?member=%1 [L]

RewriteRule ^~(.*)/avatar.jpg /avatar.php?id=$1 [L]
RewriteRule ^~(.*)/(.*).jpg /userimg/$1/$2.jpg [L]



Basically it does what I want in regards of the subdomain passing it on to view.php

But I would like it if every other path (ie: if theres actually something behind the domain's / ) was treated as if it was on the main site.

For example if I do an image source of /~1/image.jpg I'd like to be able to do it just like that instead of http://www.gwcmayhem.com/~1.... having to spell out the entire domain of the main site just to load images, CSS, other scripts, javascript, etc.


-Karl Blessing ]]> Re: cURL http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108882&page=0&view=collapsed&sb=5&o=14&vc=1#Post108882 Mon, 21 Jul 2008 07:00:28 -0700 scjessey forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108882&page=0&view=collapsed&sb=5&o=14&vc=1#Post108882 Post Reply?

Just a thought - are you trying to access your own computer through your IP address? If so, I would hazard a guess that you are using a router that is blocking access to port 8080. You'll need to open up that port to make it work.

-- si-blog --
Max discount on any plan with promocode SCJESSEYTOTAL ]]> Post Reply?

Just a thought - are you trying to access your own computer through your IP address? If so, I would hazard a guess that you are using a router that is blocking access to port 8080. You'll need to open up that port to make it work.

-- si-blog --
Max discount on any plan with promocode SCJESSEYTOTAL ]]> Re: cURL http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108876&page=0&view=collapsed&sb=5&o=14&vc=1#Post108876 Sun, 20 Jul 2008 22:16:01 -0700 pangea33 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108876&page=0&view=collapsed&sb=5&o=14&vc=1#Post108876 Post Reply?

I am not sure if you're hesitant to provide us with the legitimate IP address, or just figured it wasn't relevant. It would help if you were willing to give the actual location though, it's hard to troubleshoot the problem without more information. Is there a .htaccess file on that server that might refuse requests from certain sources?

]]> Post Reply?

I am not sure if you're hesitant to provide us with the legitimate IP address, or just figured it wasn't relevant. It would help if you were willing to give the actual location though, it's hard to troubleshoot the problem without more information. Is there a .htaccess file on that server that might refuse requests from certain sources?

]]> Re: cURL http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108875&page=0&view=collapsed&sb=5&o=14&vc=1#Post108875 Sun, 20 Jul 2008 21:20:43 -0700 instanttron forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108875&page=0&view=collapsed&sb=5&o=14&vc=1#Post108875 Post Reply?

Could this be a permission thing to my server?

I tried other url, http://w3schools.com/xml/note.xml to replace my server url
The PHP curl code above executed fine with no problem.
I get the print out of the xml result.


]]> Post Reply?

Could this be a permission thing to my server?

I tried other url, http://w3schools.com/xml/note.xml to replace my server url
The PHP curl code above executed fine with no problem.
I get the print out of the xml result.


]]> Re: cURL http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108839&page=0&view=collapsed&sb=5&o=14&vc=1#Post108839 Sun, 20 Jul 2008 05:12:01 -0700 scjessey forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108839&page=0&view=collapsed&sb=5&o=14&vc=1#Post108839 Post Reply?

The obvious thing to do is to test your script with a different web page (such as the Google home page or something) so that you can figure out if the problem lies with the script or the remote source.

-- si-blog --
Max discount on any plan with promocode SCJESSEYTOTAL ]]> Post Reply?

The obvious thing to do is to test your script with a different web page (such as the Google home page or something) so that you can figure out if the problem lies with the script or the remote source.

-- si-blog --
Max discount on any plan with promocode SCJESSEYTOTAL ]]> Re: cURL http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108837&page=0&view=collapsed&sb=5&o=14&vc=1#Post108837 Sun, 20 Jul 2008 01:58:48 -0700 instanttron forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108837&page=0&view=collapsed&sb=5&o=14&vc=1#Post108837 Post Reply?

Thanks pangea33 for replying =)
that is just a made up server ip.
i took your advice and updated my code but i am still getting the same "could not connect to host" error
Sorry to confuse you with a fake ip address at first. =(

]]> Post Reply?

Thanks pangea33 for replying =)
that is just a made up server ip.
i took your advice and updated my code but i am still getting the same "could not connect to host" error
Sorry to confuse you with a fake ip address at first. =(

]]> Re: cURL http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108834&page=0&view=collapsed&sb=5&o=14&vc=1#Post108834 Sat, 19 Jul 2008 22:05:12 -0700 pangea33 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108834&page=0&view=collapsed&sb=5&o=14&vc=1#Post108834 Post Reply?

I am not sure how that could possibly work even in your browser. The specifications for IPv4 addressing don't allow numbers greater than 255, and the IP address you posted has two octets with values above that number. What is that IP address?

Does that value exist in your HOSTS file as pointing to a different domain? If not, I am at a loss. Whatever the reason you're seeing something in your browser, you're simply not going to get a valid curl response from your page on Dreamhost.

Incidently, the code snippet you posted looks valid for all other intents and purposes. Although you're going to want to execute the "curl_close($ch)" statement whether an error occurs or not.

When working with curl I also assigning the response/error code to a variable, closing the curl connection, and then performing operations on those variables.

]]> Post Reply?

I am not sure how that could possibly work even in your browser. The specifications for IPv4 addressing don't allow numbers greater than 255, and the IP address you posted has two octets with values above that number. What is that IP address?

Does that value exist in your HOSTS file as pointing to a different domain? If not, I am at a loss. Whatever the reason you're seeing something in your browser, you're simply not going to get a valid curl response from your page on Dreamhost.

Incidently, the code snippet you posted looks valid for all other intents and purposes. Although you're going to want to execute the "curl_close($ch)" statement whether an error occurs or not.

When working with curl I also assigning the response/error code to a variable, closing the curl connection, and then performing operations on those variables.

]]> cURL http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108826&page=0&view=collapsed&sb=5&o=14&vc=1#Post108826 Sat, 19 Jul 2008 11:35:14 -0700 instanttron forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108826&page=0&view=collapsed&sb=5&o=14&vc=1#Post108826 Post Reply?

I opened the browser with this url, http://77.666.555.44:8080/file/test.jsp
That is a sample server address
It works fine in the browser, I see the page.

But when I run it through cUrl it stalls and returns a blank page.
The error message I get from cUrl is “couldn’t connect to host”

Any reason why?
I am new to PHP
If anyone knows the answer please help
I have been stuck on this for weeks.
Any advice will be appreciated.

The PHP code:

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, “http://77.666.555.44:8080/file/test.jsp”);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$response = curl_exec($ch);

if (curl_errno($ch)) {
echo curl_error($ch);
} else {
echo $response;
curl_close($ch);
}



]]> Post Reply?

I opened the browser with this url, http://77.666.555.44:8080/file/test.jsp
That is a sample server address
It works fine in the browser, I see the page.

But when I run it through cUrl it stalls and returns a blank page.
The error message I get from cUrl is “couldn’t connect to host”

Any reason why?
I am new to PHP
If anyone knows the answer please help
I have been stuck on this for weeks.
Any advice will be appreciated.

The PHP code:

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, “http://77.666.555.44:8080/file/test.jsp”);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$response = curl_exec($ch);

if (curl_errno($ch)) {
echo curl_error($ch);
} else {
echo $response;
curl_close($ch);
}



]]> Re: Change Loaded Configuration File http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108821&page=0&view=collapsed&sb=5&o=14&vc=1#Post108821 Fri, 18 Jul 2008 23:47:56 -0700 rlparker forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108821&page=0&view=collapsed&sb=5&o=14&vc=1#Post108821 Post Reply?

There is a good reason that register_globals is set off by default with PHP5.

http://wiki.dreamhost.com/Register_globals

Why do you want to set it on?

--rlparker
--DreamHost Tech Support ]]> Post Reply?

There is a good reason that register_globals is set off by default with PHP5.

http://wiki.dreamhost.com/Register_globals

Why do you want to set it on?

--rlparker
--DreamHost Tech Support ]]> Change Loaded Configuration File http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108818&page=0&view=collapsed&sb=5&o=14&vc=1#Post108818 Fri, 18 Jul 2008 23:22:46 -0700 darthkimo forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108818&page=0&view=collapsed&sb=5&o=14&vc=1#Post108818 Post Reply?

Could anyone help me?
Now, I having a trouble with my PHP Loaded Configuration File directory. I got two domains on my space and I want to make both of them PHP.ini 's registar_global = On. So I made a costume php.ini file.
Here is my php info:
http://urjourneys.com/phpinfom.php
http://www.thedesignwei.com/phpinfom.php

I want to make my "urjourneys.com"'s Loaded Configuration File change to the place I want.
Could anyone please tell me how to do it.

Thanks a lot,

Darthkimo

]]> Post Reply?

Could anyone help me?
Now, I having a trouble with my PHP Loaded Configuration File directory. I got two domains on my space and I want to make both of them PHP.ini 's registar_global = On. So I made a costume php.ini file.
Here is my php info:
http://urjourneys.com/phpinfom.php
http://www.thedesignwei.com/phpinfom.php

I want to make my "urjourneys.com"'s Loaded Configuration File change to the place I want.
Could anyone please tell me how to do it.

Thanks a lot,

Darthkimo

]]> mail() http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108802&page=0&view=collapsed&sb=5&o=14&vc=1#Post108802 Fri, 18 Jul 2008 00:48:04 -0700 Tarsuar forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108802&page=0&view=collapsed&sb=5&o=14&vc=1#Post108802 Post Reply?

Hi!
I'm having problems with a simple php function.
On my dreamhost hosting can't send mails using this function. The most simple code returns 'true' (mail sent) but i dont get any mail...
mail('tarsuar@gmail.com','testingmail', 'lalalalala'); does not work on my hosting!!! WHY??
http://www.unlimitedps2games.com/p.php script got just that line in php.

I changed php version from 5 to 4, and from 4 to 5. Didn't work, just received 1 time an e-mail when changing version 5 to 4.
Really need this problem to be fixed!!

]]> Post Reply?

Hi!
I'm having problems with a simple php function.
On my dreamhost hosting can't send mails using this function. The most simple code returns 'true' (mail sent) but i dont get any mail...
mail('tarsuar@gmail.com','testingmail', 'lalalalala'); does not work on my hosting!!! WHY??
http://www.unlimitedps2games.com/p.php script got just that line in php.

I changed php version from 5 to 4, and from 4 to 5. Didn't work, just received 1 time an e-mail when changing version 5 to 4.
Really need this problem to be fixed!!

]]> MSSQL MYSQL http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108785&page=0&view=collapsed&sb=5&o=14&vc=1#Post108785 Thu, 17 Jul 2008 03:33:45 -0700 overblue forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108785&page=0&view=collapsed&sb=5&o=14&vc=1#Post108785 Post Reply?

I know php and a little of python, and i need to make a script that retrieves data out of MSSQL external server and insert's it on a mysql server (if can't be done with php) or just get the data out of the external servers!
I already tried to install freetds (and it seems it's ok) but when i try to compile php gives a error saying that a dir where i install freetds is not the installation directory!

]]> Post Reply?

I know php and a little of python, and i need to make a script that retrieves data out of MSSQL external server and insert's it on a mysql server (if can't be done with php) or just get the data out of the external servers!
I already tried to install freetds (and it seems it's ok) but when i try to compile php gives a error saying that a dir where i install freetds is not the installation directory!

]]> Re: Fatal error: session_start() http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108767&page=0&view=collapsed&sb=5&o=14&vc=1#Post108767 Wed, 16 Jul 2008 10:57:36 -0700 sXi forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108767&page=0&view=collapsed&sb=5&o=14&vc=1#Post108767 Post Reply?

If you have a customised PHP, try changing the session.save_path variable in your php.ini



Maximum Cash Discount on any plan with MAXCASH
]]> Post Reply?

If you have a customised PHP, try changing the session.save_path variable in your php.ini



Maximum Cash Discount on any plan with MAXCASH
]]> Re: groupoffice on dreamhost http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108745&page=0&view=collapsed&sb=5&o=14&vc=1#Post108745 Tue, 15 Jul 2008 19:10:05 -0700 greenman forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108745&page=0&view=collapsed&sb=5&o=14&vc=1#Post108745 Post Reply?

I figured it out. There was a setting in php.ini that was improperly set. Doh!

]]> Post Reply?

I figured it out. There was a setting in php.ini that was improperly set. Doh!

]]> Fatal error: session_start() http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108743&page=0&view=collapsed&sb=5&o=14&vc=1#Post108743 Tue, 15 Jul 2008 18:31:05 -0700 missdacia forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108743&page=0&view=collapsed&sb=5&o=14&vc=1#Post108743 Post Reply?

Hello, I am new to PHP and running into a major issue with a user authentication class that I am using.

Error is:
Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: user (path: /tmp)

I have searched the forums and found a solution posted by urbanroute in 2006,
http://discussion.dreamhost.com/showthreaded.pl?Cat=0&Board=forum_programming&Number=53329&page=&view=&sb=&o=&vc=1#Post53329

I followed the steps by urbanroute and created a test page which worked fine, then i created the sesstmp dir and chmod 777, added this path to a .htaccess file, but still to no avail. In addition, the error still seems to be looking for /tmp.

I check the phpinfo() on my site after adding this line to .htacess:
php_value session.save_path /home/youraccount/yourwebsite.com/sesstmp (using my account info of course)
and the phpinfo() still shows /tmp.

So then I created /tmp in my domain directory as such /home/youraccount/yourwebsite.com/tmp and chmod to 777. Still no dice.

I added the .htaccess file to the following directory within my site: /home/youraccount/yourwebsite.com/, but should it be one above this? Meaning should it be here /home/youraccount/?

Also, I turned off Extra Web Security on the site to see if this was causing an issue.

I have my site set to use PHP 4.4x and my settings are as follows:

session.use_trans_sid - on
session.save_path - /tmp
session.save_handler - files

]]> Post Reply?

Hello, I am new to PHP and running into a major issue with a user authentication class that I am using.

Error is:
Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: user (path: /tmp)

I have searched the forums and found a solution posted by urbanroute in 2006,
http://discussion.dreamhost.com/showthreaded.pl?Cat=0&Board=forum_programming&Number=53329&page=&view=&sb=&o=&vc=1#Post53329

I followed the steps by urbanroute and created a test page which worked fine, then i created the sesstmp dir and chmod 777, added this path to a .htaccess file, but still to no avail. In addition, the error still seems to be looking for /tmp.

I check the phpinfo() on my site after adding this line to .htacess:
php_value session.save_path /home/youraccount/yourwebsite.com/sesstmp (using my account info of course)
and the phpinfo() still shows /tmp.

So then I created /tmp in my domain directory as such /home/youraccount/yourwebsite.com/tmp and chmod to 777. Still no dice.

I added the .htaccess file to the following directory within my site: /home/youraccount/yourwebsite.com/, but should it be one above this? Meaning should it be here /home/youraccount/?

Also, I turned off Extra Web Security on the site to see if this was causing an issue.

I have my site set to use PHP 4.4x and my settings are as follows:

session.use_trans_sid - on
session.save_path - /tmp
session.save_handler - files

]]> Camping http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108736&page=0&view=collapsed&sb=5&o=14&vc=1#Post108736 Tue, 15 Jul 2008 12:48:03 -0700 milkjam forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108736&page=0&view=collapsed&sb=5&o=14&vc=1#Post108736 Post Reply?

Hi,

Does anybody know of any instruction on deploying a Camping app to Dreamhost, making use of Passenger?

]]> Post Reply?

Hi,

Does anybody know of any instruction on deploying a Camping app to Dreamhost, making use of Passenger?

]]> ffmpeg installed or not? http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108720&page=0&view=collapsed&sb=5&o=14&vc=1#Post108720 Tue, 15 Jul 2008 02:26:19 -0700 suman07 forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108720&page=0&view=collapsed&sb=5&o=14&vc=1#Post108720 Post Reply?

I have my website hosted in dreamhost. How do I know if it supports ffmpeg or not? If it support how can I access it?

]]> Post Reply?

I have my website hosted in dreamhost. How do I know if it supports ffmpeg or not? If it support how can I access it?

]]> PDF and PHP http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108714&page=0&view=collapsed&sb=5&o=14&vc=1#Post108714 Mon, 14 Jul 2008 16:15:01 -0700 GFv forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108714&page=0&view=collapsed&sb=5&o=14&vc=1#Post108714 Post Reply?

Hello.
Does anyone know if there are PHP classes that allows to open a PDF and save one or more pages from it as bitmap images?


]]> Post Reply?

Hello.
Does anyone know if there are PHP classes that allows to open a PDF and save one or more pages from it as bitmap images?


]]> Bash script help http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108687&page=0&view=collapsed&sb=5&o=14&vc=1#Post108687 Sun, 13 Jul 2008 19:08:02 -0700 makno forum_programming http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=108687&page=0&view=collapsed&sb=5&o=14&vc=1#Post108687 Post Reply?

Hi guys, i'm having a problem with a bash script to run on a crontab:

i can get the script to login on a ftp and download all the stuff i need to backup and publish it on my website but i can't get the script to connect and delete the stuff that has been backed up. To explain what i was trying to do here is the lines i added:

#!/bin/bash
suffix=$(date +%y%m%d)
mkdir /home/user/domain.com/folder/$suffix
cd /home/user/domain.com/folder/$suffix
wget -nc ftp://user:pass@domain/folder/*.*

so until now it works fine: i run the script and all the files are backed up but i need to remove them from the souce so i added:

ftp
open domain
user
pass
cd /folder/
delete *.*

but the error is that when i execute the bash script i can see the shell at ftp: with no further action.

Also is it possible to add a line to automaticcaly create the .htaccess file in the folder that would just containt the line "DirectoryIndex some.htm" ?

Anyone can help?

]]> Post Reply?

Hi guys, i'm having a problem with a bash script to run on a crontab:

i can get the script to login on a ftp and download all the stuff i need to backup and publish it on my website but i can't get the script to connect and delete the stuff that has been backed up. To explain what i was trying to do here is the lines i added:

#!/bin/bash
suffix=$(date +%y%m%d)
mkdir /home/user/domain.com/folder/$suffix
cd /home/user/domain.com/folder/$suffix
wget -nc ftp://user:pass@domain/folder/*.*

so until now it works fine: i run the script and all the files are backed up but i need to remove them from the souce so i added:

ftp
open domain
user
pass
cd /folder/
delete *.*

but the error is that when i execute the bash script i can see the shell at ftp: with no further action.

Also is it possible to add a line to automaticcaly create the .htaccess file in the folder that would just containt the line "DirectoryIndex some.htm" ?

Anyone can help?

]]>