PDA

View Full Version : Database



paulinchicago
10-10-2003, 08:25 AM
domain: flavourchicago.com

hey,

first of all, I always use http://tera-byte.com for all my hosting needs, and I always get help 24/7.

i was recommended to westhost because of the similar price and support, especially with a particular .php script that I use for e-mailing from http://www.activecampaign.com. great script.

now, for one of my new clients i recommended he get his hosting from westhost going on the suggestion of the owner of the above script.

I signed him up last thursday for a domain and hosting.

maybe i chose a bad time, maybe i chose a bad company, maybe i'm just crazy.

but, i'm having problems, and i've got no support.

anyhow,

i turn to the faithful forum, and am at the mercy of all of you.

well, my problem is the mysql database, i created a database named "mailingyou", but when you create a database shouldn't it be "flavourchicago_com_-_mailingyou" or rather "domainname_com_-_databasename" which is how i directed and created databases with tera-byte.

because all i can in the database options is "mailingyou (-)" as the database name.

I can't get the script to connect.

am I doing something wrong.

please advise, because tech support is dragging slower than a snail on a cold day over a road made of salt.

thanks guys.

-paul rodriguez
http://paulinchicago.com
elicitpaul@hotmail.com

paulinchicago
10-10-2003, 03:48 PM
actually got working, because of tech support.

thanks guys.

turns out that all you need to do is add a user from the myphpadmin index page

select the "privelages" button towards the bottom.

give global access, and then use that user as the username and password @ localhost.

worked like a charm.

next project setting up a cron job.

suggestions?

=p

wildjokerdesign
10-10-2003, 04:05 PM
Glad to hear you got things going. I just noticed your post. Don't know that any of us have set up any cron jobs yet... know I haven't. It may be that some of the others have. If you want to be more specific on what you need maybe we can give you a hand.

Sounds like tech may be catching up if they are helping on issues that do not directly concerning the overall system. That is more like the old WH support. They always state they do not support outside scripts and such but always seemed happy to try and help.

Shawn

Henning
10-10-2003, 05:31 PM
next project setting up a cron job.
suggestions?

Start here:
http://www.sitepoint.com/article/1196

paulinchicago
10-11-2003, 01:06 AM
First of all, this is all dependant to my mailing script from http://www.activecampaign.com, but it could apply to other programs.

The "Cron Job" allows my mailing script to send out emails in it's queue every 15 minutes by accessing the cron.php file:
-located in the script folder that I installed previously,
-which resulted from successfully connecting to my database.

Anyhow the first thing that needed to be changed on the cron.php file was exactly where the php is on my server.
-The default on the script was "#!/usr/local/bin/php -q"
-But, on my westhost account it is located at "#!/bin/php -q"
(Thanks mike)

In CuteFtp, I then changed the Mode "CHMOD" of the cron.php file to 755.

________________________________
Now I had to edit my cron job.

For those of you like myself I was drawing a very enormous blank at this point. :shock:

I guess West Host allows you to change your cron setup, that is, if, you know what to do.

First of all the only way to change this was by accessing your cron, only with SSH, with a program like PuTTY, which is a free download at:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
(which I found by typing "putty" into google)

I guess this program allows you to connect to your site with an SSH connection which is different from telnet.

After I downloaded it, I double-clicked putty.exe in Windows explorer (actually from my Desktop).

Where it asks for host name, all I put in was "mydomain.com", and selected SSH, which changed the port to 22.

A telnet looking black window opened saying "login as:" where I typed my username and hit enter (no username@domain.com, just username)

It then asked for my password and I hit enter.

"[My domain] [~] $" came up.

I then typed "editcron -e" and hit enter.

There was this weird line of text that said "46 0 * * * /bin/logrotate /etc/logrotate.conf 2>&1 > /dev/null"

*Don't erase this line*

Simply ---> Right Arrow past the "null" and hit enter.

On the next line I typed:
*/15 * * * * php /var/www/html/12all/cron.php


FYI, with an underscore _ to represent spaces on this line.
*/15_*_*_*_*_php_/var/www/html/12all/cron.php

To save this I hit "Ctrl X" to exit, it asked if I wanted to save I and I hit "y" for yes, then I closed the window.

____________________________
Now, I didn't know why I typed that in, mike at livechat support told me that was what i had to type.

But, thanks to Henning's link to sitepoint's article, it makes sense, well at least sort of.

Basicially, the first * divided by 15 is the minutes of the day divided by fifteen, hence every fifteen minutes, the rest were left as asterisks because I want this to happen every day, not on a specific hour, or day of the month, or month, or weekday, which those asterisks represent.

Secondly, I guess php is invoked to run my cron.php at it's full location, which is in a folder I created called "12all" in the same location as my index.htm file.

____________________________
With all that being said, I don't know precisely how everything works, but this was what I did to create a cron job, to run my cron.php file, which expedites the emails I send out with my mailing script, so I don't have to babysit the Message Queue, and click Re-Queue message about 150 times, which takes about 4 minutes between clicks.

I hope this helps somebody. :wink:

Thank you.

=p

abomahdy
03-28-2006, 05:46 AM
First of all, this is all dependant to my mailing script from http://www.activecampaign.com, but it could apply to other programs.

The "Cron Job" allows my mailing script to send out emails in it's queue every 15 minutes by accessing the cron.php file:
-located in the script folder that I installed previously,
-which resulted from successfully connecting to my database.

Anyhow the first thing that needed to be changed on the cron.php file was exactly where the php is on my server.
-The default on the script was "#!/usr/local/bin/php -q"
-But, on my westhost account it is located at "#!/bin/php -q"
(Thanks mike)

In CuteFtp, I then changed the Mode "CHMOD" of the cron.php file to 755.

________________________________
Now I had to edit my cron job.

For those of you like myself I was drawing a very enormous blank at this point. :shock:

I guess West Host allows you to change your cron setup, that is, if, you know what to do.

First of all the only way to change this was by accessing your cron, only with SSH, with a program like PuTTY, which is a free download at:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
(which I found by typing "putty" into google)

I guess this program allows you to connect to your site with an SSH connection which is different from telnet.

After I downloaded it, I double-clicked putty.exe in Windows explorer (actually from my Desktop).

Where it asks for host name, all I put in was "mydomain.com", and selected SSH, which changed the port to 22.

A telnet looking black window opened saying "login as:" where I typed my username and hit enter (no username@domain.com, just username)

It then asked for my password and I hit enter.

"[My domain] [~] $" came up.

I then typed "editcron -e" and hit enter.

There was this weird line of text that said "46 0 * * * /bin/logrotate /etc/logrotate.conf 2>&1 > /dev/null"

*Don't erase this line*

Simply ---> Right Arrow past the "null" and hit enter.

On the next line I typed:
*/15 * * * * php /var/www/html/12all/cron.php


FYI, with an underscore _ to represent spaces on this line.
*/15_*_*_*_*_php_/var/www/html/12all/cron.php

To save this I hit "Ctrl X" to exit, it asked if I wanted to save I and I hit "y" for yes, then I closed the window.

____________________________
Now, I didn't know why I typed that in, mike at livechat support told me that was what i had to type.

But, thanks to Henning's link to sitepoint's article, it makes sense, well at least sort of.

Basicially, the first * divided by 15 is the minutes of the day divided by fifteen, hence every fifteen minutes, the rest were left as asterisks because I want this to happen every day, not on a specific hour, or day of the month, or month, or weekday, which those asterisks represent.

Secondly, I guess php is invoked to run my cron.php at it's full location, which is in a folder I created called "12all" in the same location as my index.htm file.

____________________________
With all that being said, I don't know precisely how everything works, but this was what I did to create a cron job, to run my cron.php file, which expedites the emails I send out with my mailing script, so I don't have to babysit the Message Queue, and click Re-Queue message about 150 times, which takes about 4 minutes between clicks.

I hope this helps somebody. :wink:

Thank you.

=p

Hi my friend!

I am using the same software as you, and i want to ask you ,so how can i know if the cron jobs it's working correctly?is there anyway to make the cron jobs send an e-mail for every action?

Thx.
Samer