jazzman1
Staff Alumni-
Posts
2,713 -
Joined
-
Last visited
-
Days Won
12
Everything posted by jazzman1
-
No, that wasn't my purpose, that's why their permissions are set to 0 (zero)
-
I solved it, in fact it was very simple When you added a new user to some particular group, you must log off then log on the new one. Results: [jazzman@localhost ~]$ ls -ld /var/www/html/permission/index.php -rwxrwx--- 1 apache apache 9 Nov 25 19:05 /var/www/html/permission/index.php [jazzman@localhost ~]$ cat /var/www/html/permission/index.php <?php echo 'Hello World'; ?> But, for a regular user named - "dummy", the access is still denied: [dummy@localhost jazzman]$ cat /var/www/html/permission/index.php cat: /var/www/html/permission/index.php: Permission denied
-
@oarecare, indexes are not a panacea! Re-read David's reply #12.
-
Hey friends, Let's say that I have a premission sub-directory in /var/www/html. That permission directory belongs to user, named "apache". [root@localhost jazzman]# mkdir -p /var/www/html/permission [root@localhost jazzman]# chown apache:apache -Rv /var/www/html/permission changed ownership of `/var/www/html/permission' to apache:apache [jazzman@localhost ~]$ ls -ld /var/www/html/permission/ drwxr-xr-x 2 apache apache 4096 Nov 25 12:42 /var/www/html/permission/ The user, named "apache" has a file in that directory, it's called - index.php [root@localhost jazzman]# ls -la /var/www/html/permission/index.php -rw-r--r-- 1 apache apache 28 Nov 25 12:42 /var/www/html/permission/index.php I've changed a permission for group's apache on this directory. [root@localhost jazzman]# chmod 0770 -Rv /var/www/html/permission/ mode of `/var/www/html/permission/' changed to 0770 (rwxrwx---) mode of `/var/www/html/permission/index.php' changed to 0770 (rwxrwx---) [root@localhost jazzman]# ls -la /var/www/html/permission/ total 12 drwxrwx--- 2 apache apache 4096 Nov 25 12:42 . drwxrwxr-x. 12 root root 4096 Nov 25 12:37 .. -rwxrwx--- 1 apache apache 28 Nov 25 12:42 index.php Add a new user, named "jazzman" to apache group [root@localhost jazzman]# usermod -G jazzman apache [root@localhost jazzman]# id apache uid=48(apache) gid=48(apache) groups=48(apache),500(jazzman) The question is, why jazzman doesn't open the index.php file? [jazzman@localhost ~]$ cat /var/www/html/permission/index.php cat: /var/www/html/permission/index.php: Permission denied EDIT: OS CentOS 6.3
-
Type of the "index" and extra "Using filesort" . The type of the second one "eq_ref" is used during joins, and in fact, is the best possible value of type for joins. If you look carefully at explanation of query of post #10, you will see that a type is "ALL". The "All" means a full table scan is needed for each combination. You should endeavor to avoid this situation in all queries that are run with any frequency.
-
-
Loop Throught Sql Results And Don't Print Repeated Data
jazzman1 replied to alapimba's topic in PHP Coding Help
Barand, if he has only one single table to get the same results, he has to use self-join, right or..... am I wrong? -
Hm...@mrMarcus, you are right, that method doesn't accept an array only a string -> http://phpmailer.wor....php?pg=methods I've never used phpMailer. @OP, try this $string2 = array( $email.'@yahoo.com' => 'Person One', $email2.'@yahoo.com' => 'Person Two', $email2.'@hotmail.com' => 'Person Three' // ...etc ); foreach($string2 as $email => $name) { $mail->AddAddress($email, $name); }
-
Where did you get that: $mail->AddAddress('john@doe.com', 'John Doe'); It should be: $mail->AddAddress(array('john@doe.com', 'john@doe.com' => 'John Doe'));
-
No, that doesn't make any sense! You want to tell me that if I want to send 1000 mails, I need to copy/paste that property 1000 times? It could be something like this, I preffer this format it's called - RFC # 822 Example: $e_list = array("joeDoe@gmail.com"=>"Joe Doe","joeDoe_1@gmail.com"=>"Joe Doe 1","joeDoe_2@gmail.com"=>"Joe Doe 2","joeDoe_3@gmail.com"=>"Joe Doe 3"); $mail->AddAddress($e_list);
-
That' s why I told him to use array. Repeating the same code multiple times is a very bad practice, too.
-
Please Friends, I Have Problem That Have Been Bordering
jazzman1 replied to stutego's topic in PHP Coding Help
You have erros too in your script! Why are you using a $_post global varible instead of $_POST? Ereg() and eregi() are deprecated from php 5.2 (I think), do you know that?- 25 replies
-
- php coding problem
- form problem
- (and 2 more)
-
Please Friends, I Have Problem That Have Been Bordering
jazzman1 replied to stutego's topic in PHP Coding Help
@David, depend of the notice. It's not possible the language to know that you made a logical error, right?- 25 replies
-
- php coding problem
- form problem
- (and 2 more)
-
You can remove $to from the script or to be like @mrMarcus wrote - $to = $email . "@yahoo.com" . "," . $email2 . "@yahoo.com" . "," . $email2 . "@hotmail.com"; After that, just assign it to an array instead of a string. $to = array($email . "@yahoo.com" . "," . $email2 . "@yahoo.com" . "," . $email2 . "@hotmail.com");
-
Please Friends, I Have Problem That Have Been Bordering
jazzman1 replied to stutego's topic in PHP Coding Help
I know that you know, but just to be clear - there are no errors here- 25 replies
-
- php coding problem
- form problem
- (and 2 more)
-
Have you tried to change $string2 form a string to an array?
-
Every time you post different queries. That's a bad idea to use multiple IN operator like in examples. If you're new to databases disign, you should take some time study how these tables are comming together.
-
I'm thinking that you want to make a mock of windows Why don't you install a wamp or xampp server?
-
I don't think so, that the firewall is blocking communication with server on the localhost. @simpleorchid, did you try to connect to database using a mysql console? Exemple: mysql -h localhost -u root -p
-
Well, you can add an index on the idProduct and idFilter. After that, explain the query from your first post again. Try, ALTER TABLE productFilters ADD INDEX index_on_ids(idProduct,idFilter)
-
@Muddy_Fuster, are you joking with us? Do you know who is Barand for this forum? You disappointed me with what you read. It wasn't very classy. jazz.
-
You don't show us yet, describe of productFilters. mysql> DESCRIBE productFilters; Take a look at this guide -> http://hackmysql.com/case1 We need to know your tables' structure.
-
EDIT: The first table is pf (productFilters) in your sql explanation, sorry about that. mysql> DESCRIBE productFilters; mysql> SHOW INDEX FROM productFilters;
-
No, there is something rotten in the state of Denmark Could you describe the tables for us? mysql>DESCRIBE customer; mysql>DESCRIBE customer_2;
-
I'm not a windows user, but...... you should check the current status of your database! How to open them - Windows button+R and type: services.msc