|
Starting simpler might be a better bet, instead of using OsCommerce, try something lighter. Editing oscommerce as a beginner can be troublesome and tricky if you're not completely familiar with the basics of php.
Edit: especially when using a template!!!
|
|
|
|
|
hi all
i would like to know i to attach video files in php using ajax control.
and in some places i use ajax but some time its necesssary to refresh antotehr wise that not show updated data in list.
|
|
|
|
|
|
hi,
i have a page which value is added, edited and deleted using Ajax. in this page when we click on add button than display a textbox and after entering value in this box click on button than value is store in database and show in list box, same process for all but some time its shows value in list box but some time its require refresh or when i enter second data then show last value. this happen some times not all time.
|
|
|
|
|
Well, what do you wanna know ?
If you wanna know how you can solve your problem , I can't solve it without see your snippet code !
Please post your code or refer our to your web page .
|
|
|
|
|
It sounds like you have 2 AJAX queries running. One to send the added text to the database, and then another to refresh the displayed contents. Think of AJAX as XL streams leaving and entering through channels. We need to make sure the XML streams do not attempt to use the same channel. If they do, the second will suffer if the first has not completed yet.
A way to get around this is to assign a random session ID to the XML stream to differentiate it. Consider this Javascript AJAX function-
http://whatsaranjit.com/includes/grabData.js[^]
Notice the line:
url=url+"&sid="+Math.random()
This is so that anytime an AJAX request is initiated, they are unique and will not overlap. Try that out. Good luck!
|
|
|
|
|
Hi, I used to learn Red Hat Linux version 9 and now I didn't continue to study it. At my work place I have a problem with my internet connection that over usage. As I have check with the document, I found that suse linux could be setup as a web proxy (squids) which could control and limit the amount of usage of internet. From here I would like to have a question as follow:
1. Is it possible for me to read only the chapter of setup and configure linux as web proxy?
2. Does the machine run as linux web proxy require one or two network interface card?
3. Do I need to read any additional document regarding to configure and monitoring linux web proxy?
Thank in advance!!!
|
|
|
|
|
For questions 1 and 3: If you're familiar with Linux, yes, it's enough you read up the chapter on squid. I also found a simple tutorial here[^].
For question 2: Generally, you need two. One connects the proxy server to the local network. Another connects it to the internet, unless you're using an interface other than Ethernet.
|
|
|
|
|
I need to create a folder on the server with chinese or japanese name. I encode the folder name to UTF-8. I found that I can create the folder. But name of the folder I created on the server become unreadable code.
Thank for any reply.
|
|
|
|
|
Hi,
I am trying to recieve Mobility Header sent (raw sockets). The problem is after receiving, packets are not sent to ip6_input_finish; it is dropped here. (tshark running shows the packet is received)
int ip6_input(struct sk_buff *skb)
{
//It is coming here and NF_HOOK is returning -1
return NF_HOOK(PF_INET6, NF_INET_LOCAL_IN, skb, skb->dev, NULL,
ip6_input_finish);
}
If you need i will send the sender program.
Thanks,
Chandrashekhar
banshekhar
|
|
|
|
|
Problem got solved after doing ip6tables -F.
Thanks,
Chandrashekhar
banshekhar
|
|
|
|
|
Hi,
Please let me know why the option CONFIG_NETFILTER_DEBUG is set while compiling kernel.
Thanks,
Chandrashekhar
banshekhar
|
|
|
|
|
Hello guys
I'm trying to boot Linux from USB. It's an ISO file. But boot can't continue due to a fatal error. Boot is looking for this livecd.sgn file which I think was included in the image file. Then it had this suggestion of copying the data to hard drive and reboot again. It seems that kernel is expecting this file to be in the hard drive. Really no idea how to proceed with this.
|
|
|
|
|
hello friends,
1.I like to create a dynamic tree view taking data from database. I browsed through net but all the sites have them as controls or their own classes. I like create without components using PHP javascript and ajax.
2.I also like to get values from database when clicking on tree node and place it on a dropdown box without posting it to the server(i,e using ajax).
Thanks in advance,
praveen
modified on Saturday, November 8, 2008 1:52 PM
|
|
|
|
|
|
Have you heard about LetMeGoogleThatForYou[^]? You should start linking that from now on. Seems to me searching on Google is a skill we should put on our Resume!
|
|
|
|
|
Sounds great
|
|
|
|
|
Nice try, but that's the first thing I did. Like going down the rabbit's hole, one thing leads to another, but all the while you find nothing with a solid answer. I stated that I was new to SQL and Perl, not the use of a computer and the internet, but thanks for the help, oh that's right, you didn't really answer my question, my bad...
|
|
|
|
|
sk8te320 wrote: Nice try, but that's the first thing I did.
I truly believe you did that. In fact, I'm not even a PHP expert. I was just visiting this PHP forum to see what people were discussing. And I saw that someone kept on providing Google links, so I thought I'd suggest "Let me google that for you" web-site. And I'm sure there's plenty to learn about Google Search... otherwise there won't be books sold about "Google Search Hacks" and "How to do effective Google Search".
Anyways.. hope you have a good one. Peace.
|
|
|
|
|
sk8te320 wrote: but thanks for the help, oh that's right, you didn't really answer my question, my bad...
D'Oh! I just realized you are talking about my response to your question in Perl forum (You posted in PHP forum, and I'm like.. what? When did I say go look in Google?!)
Anywho, my further response is in Perl forum
|
|
|
|
|
The jQuery toolkit has multiple plugins that could handle this
|
|
|
|
|
Hi,
While trying to send routing header by using following raw socket program, i am getting invalid argument error. Can anyone tell me what wrong with this.
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
#include <errno.h>
#include <string.h>
void main()
{
int sock_fd;
int on = 1;
int offset = 4;
int ret = 0;
struct sockaddr_in6 *daddr;
struct in6_pktinfo pinfo;
struct msghdr msg;
struct cmsghdr *cmsg;
struct iovec *iovector;
socklen_t rthlen = 0;
int cmsglen;
bzero (&msg, sizeof(msg));
sock_fd = socket(AF_INET6, SOCK_RAW, IPPROTO_IPV6);
if(sock_fd < 0)
{
printf("\nClient: Socket Creation Failed: Error %d\n", errno);
return;
}
iovector = (struct iovec*)calloc(1, sizeof(struct iovec));
/* Since for Mobility Header the checksum is located in offset 4, we need to
* set the offset to 4
*/
if (setsockopt(sock_fd, IPPROTO_IPV6, IPV6_RECVRTHDR, &on, sizeof(on)) < 0)
{
printf("\nClient: RTHDR option set failed\n");
return;
}
/* Our Destination Address is fe80::21d:9ff:fe17:5d0e eth0 interface
* i.e. fe80 :021d:09ff:fe17:5d0e
*/
daddr = (struct sockaddr_in6*)calloc(1, sizeof(struct sockaddr_in6));
daddr->sin6_family = AF_INET6;
daddr->sin6_addr.s6_addr16[0] = 0xfe80;
daddr->sin6_addr.s6_addr16[1] = 0x0;
daddr->sin6_addr.s6_addr16[2] = 0x0;
daddr->sin6_addr.s6_addr16[3] = 0x0;
daddr->sin6_addr.s6_addr16[4] = 0x021d;
daddr->sin6_addr.s6_addr16[5] = 0x09ff;
daddr->sin6_addr.s6_addr16[6] = 0xfe17;
daddr->sin6_addr.s6_addr16[7] = 0x5d0e;
daddr->sin6_port = htons(IPPROTO_IPV6);
/* Our Source Address is fe80::21d:9ff:fe17:58c7 eth0 interface
* i.e. fe80 :021d:09ff:fe17:58c7
*/
memset(&pinfo, 0, sizeof(struct in6_pktinfo));
pinfo.ipi6_addr.s6_addr16[0] = 0xfe80;
pinfo.ipi6_addr.s6_addr16[1] = 0x0;
pinfo.ipi6_addr.s6_addr16[2] = 0x0;
pinfo.ipi6_addr.s6_addr16[3] = 0x0;
pinfo.ipi6_addr.s6_addr16[4] = 0x021d;
pinfo.ipi6_addr.s6_addr16[5] = 0x09ff;
pinfo.ipi6_addr.s6_addr16[6] = 0xfe17;
pinfo.ipi6_addr.s6_addr16[7] = 0x58c7;
pinfo.ipi6_ifindex = 2; /* Interface Id */
//Fill ancilliary data and call sendmsg
void *extptr;
socklen_t extlen;
struct cmsghdr *cmsgptr;
extlen = inet6_rth_space(IPV6_RTHDR_TYPE_0, 1);
cmsglen = CMSG_SPACE(extlen);
cmsgptr = malloc(cmsglen);
cmsgptr->cmsg_len = CMSG_LEN(extlen);
cmsgptr->cmsg_level = IPPROTO_IPV6;
cmsgptr->cmsg_type = IPV6_RTHDR;
extptr = CMSG_DATA(cmsgptr);
extptr = inet6_rth_init(extptr, extlen, IPV6_RTHDR_TYPE_0, 1);
int check = inet6_rth_add(extptr, &daddr->sin6_addr);
if (check < 0)
{
printf("FAILURE \n");
}
msg.msg_control = cmsgptr;
msg.msg_controllen = cmsglen;
iovector->iov_base = malloc(10);
iovector->iov_len = 10;
strcpy(iovector->iov_base, "MAG-TO-LMA");
msg.msg_iov = iovector;
msg.msg_iovlen = 1;
msg.msg_name = (void *)daddr;
msg.msg_flags = 0;
msg.msg_namelen = sizeof(struct sockaddr_in6);
ret = sendmsg(sock_fd, &msg, 0);
if (ret < 0)
{
printf("\nClient:Send Message Failed: Error %d Ret %d\n", errno, ret);
free(iovector->iov_base);
free(iovector);
return;
}
}
Regards,
Shekharban
banshekhar
|
|
|
|
|
Hi,
Meanwhile i was trying to send icmp packets; got to know that byte ordering of address is wrong. I tried the above program by changing the address byte order, but with no luck. Could any one please let me know how routing header can be sent as a ancilliary data in v6 and what might be wrong with this code.
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
#include <errno.h>
#include <string.h>
void main()
{
int sock_fd;
int on = 1;
int offset = 4;
int ret = 0;
struct sockaddr_in6 *daddr;
struct in6_pktinfo pinfo;
struct msghdr msg;
struct cmsghdr *cmsg;
struct iovec *iovector;
socklen_t rthlen = 0;
int cmsglen;
sock_fd = socket(AF_INET6, SOCK_RAW, IPPROTO_IPV6);
if(sock_fd < 0)
{
printf("\nClient: Socket Creation Failed: Error %d\n", errno);
return;
}
iovector = (struct iovec*)calloc(1, sizeof(struct iovec));
/* Since for Mobility Header the checksum is located in offset 4, we need to
* set the offset to 4
*/
if (setsockopt(sock_fd, IPPROTO_IPV6, IPV6_RECVRTHDR, &on, sizeof(on)) < 0)
{
printf("\nClient: RTHDR option set failed\n");
return;
}
/* Our Destination Address is fe80::21d:9ff:fe17:5d0e eth0 interface
* i.e. fe80 :021d:09ff:fe17:5d0e
*/
daddr = (struct sockaddr_in6*)calloc(1, sizeof(struct sockaddr_in6));
daddr->sin6_family = AF_INET6;
daddr->sin6_addr.s6_addr16[0] = 0x80fe;
daddr->sin6_addr.s6_addr16[1] = 0x0;
daddr->sin6_addr.s6_addr16[2] = 0x0;
daddr->sin6_addr.s6_addr16[3] = 0x0;
daddr->sin6_addr.s6_addr16[4] = 0x1d02;
daddr->sin6_addr.s6_addr16[5] = 0xff09;
daddr->sin6_addr.s6_addr16[6] = 0x17fe;
daddr->sin6_addr.s6_addr16[7] = 0x0e5d;
daddr->sin6_port = htons(IPPROTO_IPV6);
/* Our Source Address is fe80::21d:9ff:fe17:58c7 eth0 interface
* i.e. fe80 :021d:09ff:fe17:58c7
*/
memset(&pinfo, 0, sizeof(struct in6_pktinfo));
pinfo.ipi6_addr.s6_addr16[0] = 0x80fe;
pinfo.ipi6_addr.s6_addr16[1] = 0x0;
pinfo.ipi6_addr.s6_addr16[2] = 0x0;
pinfo.ipi6_addr.s6_addr16[3] = 0x0;
pinfo.ipi6_addr.s6_addr16[4] = 0x1d02;
pinfo.ipi6_addr.s6_addr16[5] = 0xff09;
pinfo.ipi6_addr.s6_addr16[6] = 0x17fe;
pinfo.ipi6_addr.s6_addr16[7] = 0xc758;
pinfo.ipi6_ifindex = 2; /* Interface Id */
/* Fill the Routing Header in ancillary data */
rthlen = inet6_rth_space(IPV6_RTHDR_TYPE_0, 1);
cmsglen = CMSG_SPACE(rthlen);
printf("\nClient: rthlen is %d\n", rthlen);
cmsg = malloc(cmsglen);
if (cmsg == NULL)
{
printf("\nClient:Ancillary Data memory allocation failed\n");
return;
}
memset(cmsg, 0, cmsglen);
memset(&msg, 0, sizeof(msg));
iovector->iov_base = malloc(10);
iovector->iov_len = 10;
strcpy(iovector->iov_base, "TEST-4-RH");
msg.msg_control = (void *)cmsg;
msg.msg_controllen = cmsglen;
msg.msg_iov = iovector;
msg.msg_iovlen = 1;
msg.msg_name = (void *)daddr;
msg.msg_namelen = sizeof(struct sockaddr_in6);
void *rthp;
cmsg = CMSG_FIRSTHDR(&msg);
cmsg->cmsg_len = CMSG_LEN(rthlen);
cmsg->cmsg_level = IPPROTO_IPV6;
cmsg->cmsg_type = IPV6_RTHDR;
rthp = CMSG_DATA(cmsg);
rthp = inet6_rth_init(rthp, rthlen, IPV6_RTHDR_TYPE_0, 1);
if(rthp == NULL)
{
printf("\nClient: Routing Header Init failed\n");
return;
}
inet6_rth_add(rthp, &daddr->sin6_addr);
rthp = NULL;
ret = sendmsg(sock_fd, &msg, 0);
if (ret < 0)
{
printf("\nClient:Send Message Failed: Error %d Ret %d\n", errno, ret);
free(iovector->iov_base);
free(iovector);
return;
}
}
Regards,
Shekharban
banshekhar
|
|
|
|
|
Hi all,
I m working with C under linux and i have a little prob :
while(1)
{
if(scanf("%s", msg)>0)
printf("Yr message is %s\n", msg);
else
}
but when i run the prog it still frozen waiting for the message but i wanna it do the other Job bloc. So is there any function that helps me detecting if there is a key pressed or no ???
Thx.
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
|