Jump to content

jazzman1

Staff Alumni
  • Posts

    2,713
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by jazzman1

  1. Yes. In the beginning the mail-script was written in bash lately i switched it to swiftmailer / php. The messages are chunk-ed at small portions and using a cron job sending them in 1 hour. This way prevents emails flooding.
  2. There is a limit up to 1000 emails per day (24h) for the shared hosting plan. Not sure how they calculate them, but more than 3 years I've been able to send around 3000 mails per day to my members
  3. He wants to use assignment operator there,it's a tricky question. In the first example, we've got - "true" in the second one - "false". $var1 = FALSE || TRUE; $var2 = FALSE OR TRUE; The answer is precedence. @OP, never ever mix up the logical operators written in pure English words with those one written with symbols. If you want to separate the logic in your application always use parentheses!
  4. @Jacques, I had lived in a country for more than 38 years where the communist party said what's wrong and what's not.This is a free php helping forum, here is not a school, nor we are teachers. If you have some personal issues with someone from the "staff", so be free to PM'ed him. There is no sense to make public your complaints.
  5. audio books for kids.
  6. You need to connect to mysql server, then you need to create a database, after then you need to create a table with the same name of the query. Don't waste the people time.
  7. Yes sKunKbad, that was the issue here, but in fact that we can apply some additional security added by SELinux, so although DAC rules allowed "ls -ld" process access this directory ~/http, SELinux policy would denied access to it. We never know what could be a problem without providing some additional information. Most of the users coming to the forums said - Hey, I added permissions to 777 to the dir / file, but it still do not have permission on it @snehu, do you have an access to apache error_log file? What distro is that? I suspect is RedHat based.
  8. sKunKbad, why the apache user gets the message of permission denied when it / he tries to open the file in his own directory? [root@lxc dummy]# ls -ld /home/dummy/http/ drwxr-xr-x. 2 apache apache 4096 Sep 16 20:34 /home/dummy/http/ [root@lxc dummy]# ls -l /home/dummy/http/test.php -rwxr-xr-x. 1 apache apache 202 Sep 16 20:34 /home/dummy/http/test.php [root@lxc dummy]# su -l apache -s /bin/bash -bash-4.1$whoami apache -bash-4.1$ ls -ld /home/dummy/http ls: cannot access /home/dummy/http: Permission denied -bash-4.1$ php -f /home/dummy/http/test.php Could not open input file: /home/dummy/http/test.php
  9. .htaccess gets not-affected into files running by shell_exec using STDIN. 1.get_header.html <form action="phpinfo.php"> Name: <input type="text" name="type" /> <input type="submit" value="Go!"/> </form> 2. phpinfo.php <?php if (defined('STDIN')) { $type = $argv[1]; } else { $type = $_GET['type']; } var_dump($type); 3. .htaccess RewriteEngine on RewriteRule ^/?phpinfo.php$ http://phpfreaks.com [R=301] 4. shell_exec.php <?php $get= 'jazzman'; $cmd = shell_exec("php -f phpinfo.php type=".escapeshellarg($get)); echo $cmd; So, he could achieve that with the code given above, but running php into a shell can be a challenge
  10. If the .htaccess file is your problem, then remove / rename it by using php, execute the script that you want to be executed and create / rename it again using php. This file is just a simple text file. Never try it, but it should work I think, however not sure what would happened if two or more users try to run the same script at the same time, you have to check before doing this Using php into a shell it's like running a shell commands into the terminal. But not sure what happens if you try to run $_GET / $_POST variables into a shell.
  11. Not to mention all mysql_* functions inside the foreach construct
  12. what about next one - $HTTP_POST_VARS? Have you checked its value? I am using it, but on my server with php version 4.1.0, so it's deprecated long time ago and replaced by $_POST.
  13. why don't you run php in to a shell mod, if you want to execute something before apache to spill the content out?
  14. He did it. He is using the code from my reply #20.
  15. it could be possible if the directory or the previous directory when the file is deployed has a 0 permissions to others. So, we need to see the output of: ls -la /var/tmp/the_name_of_the_file
  16. Your website can be ran onto your personal computer as well, if it has all services to do this task. Anyway...I suspect you're deployed the scripts of your website onto a remote windows server using IIS web server as default one and maybe, this error coming from IIS overriding the mysql error of bad connection. Not sure for that. Google it. I am not familiar with windows system and not able to help you here. Next time, when you have a problem, be so nice to explain everything in more detail from the very beginning.
  17. The path - "G:\PleskVhosts\mysite\subdomain" coming from your computer or you're using windows server with IIS web server somewhere on the web?
  18. what happens with error number 500?
  19. please, show us everything you get as outputs when you ran my script from reply #20, don't tell me empty stories..
  20. Use my code of previous reply. Run the script with your database credentials and post out everything you get as outputs, including errors and warnings.
  21. Can you post the entire error message? Also add getcwd() I want know where are you before to set your database credentials: <?php ini_set('display_startup_errors',1); ini_set('display_errors',1); error_reporting(-1); // current directory echo getcwd() . "\n"; $db_conx = mysqli_connect('db_address', 'db_user','db_pass', 'db_name'); // Evaluate the connection if (mysqli_connect_errno()) { echo "cannot connect to database"; echo mysqli_connect_error(); exit(); } else { echo "Successful database connection, happy coding!!!"; }
  22. No, don't use the mysql library for new development, use either mysqli or pdo. So, about the error number of 500, try to turn php error on like in my previous reply and post out the result if you get some new error(s).
  23. Ha-ha-ha....good triple color master
  24. Where are you from? The name of mysqli_connect() contains a non-english character itself. Go to php.net and copying/past the pattern from there. PS - When I'm copying/paste your script from reply #5, I'm getting even a fatal error: <?php ini_set('display_startup_errors',1); ini_set('display_errors',1); error_reporting(-1); $db_conx = mysqli_connnect('db_address', 'db_user','db_pass', 'db_name'); // Evaluate the connection if (mysqli_connect_errno()) { echo "cannot connect to database"; echo mysqli_connect_error(); exit(); } else { echo "Successful database connection, happy coding!!!"; } Result: Fatal error: Call to undefined function mysqli_connnect() in /home/content/04/8337604/html/phpinfo.php on line 9
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.