Jump to content

Search the Community

Showing results for tags 'Php'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Discussion
    • Website Management and Coding
    • Technology and the Internet
    • Philosophy, Politics, and Science
    • Art and Entertainment
    • Other Discussion
  • HelioHost
    • Questions
    • Customer Service
    • How You Can Help
  • HelioNet
    • News
    • Contact HelioNet

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. User: kymek Site: kymek.com Respected Sir, Thank you for your great services towards penniless organisations and individuals like us. Recently I tried to install aGov - a drupal distribution, but could not complete it. It said to set the php memory limit to 256mb. Can you please do something to solve this issue? By Jove if I can gather some money this year, I would share some ($60-70) with HelioNet. Thank you so much... __Kymek
  2. I'm proposing that HelioHost the wepay module for PHP, Ruby, Python, C#, and maybe Java. They SDK is free and Open Source and I think would make a great addition to the hosting service. https://www.wepay.com/developer/resources/sdks PLease consider this. UPDATE: This module might also need the web module for python. http://webpy.org/install
  3. php script not working on my site showing blank please my site cyber-tube.tk
  4. On my hosting I using mail(...) function for email delivering. Looks like some changes was applied to smtp server and for some email addresses email not coming. For email based on gmail.com emails go to spam. For email based on google email for custom domains nothing delivered, even into spam folder. I could provide exact email for testing and resolving issue. Thx.
  5. Hello everyone. I'm tryin to make a secure PHP script on johnny server where makes SQL query (Preventing SQL Injection), using mysqli class procedural style. The problem is than I got a Fatal error callin mysqli_stmt_get_result() cause is a undefined function, so I search in PHP bugs & forums and find this: http://www.php.net/manual/en/mysqli-stmt.get-result.php#105802 So, here is my feature request. Is possible to update the PHP version or Install that plugin? Thanks, OPhE.
  6. Hi I recently found my site un-avaliable because MySQL was complaining of too many connections, I cannot understand this as there is no one using the site (to my knowledge) so I'm wondering if something's happening on Steve.
  7. Our website starts on the page called: index.php but we want it to start on the page called: main.php but how do you that? Please help us!
  8. I have just installed PEAR on my account using the PHP PEAR packages wizard in the Software/Services section of the cPanel. As I am trying to use the package with the path '/home/dummy_id/php' I get the following error message... " Fatal error: Cannot redeclare _PEAR_call_destructors() (previously declared in /home/dummy_id/php/PEAR.php:735) in /usr/lib/php/PEAR.php on line 777 " I have searched a lot about this on the Internet and the most probable solution that says to put 'php_value include_path "/home/dummy_id/php" ' make things even worse, making the script throw a '500 Internal Server Error'. " Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@dummy_id.heliohost.org and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1 mod_wsgi/3.3 Python/2.7.1 Server at gargsms.heliohost.org Port 80\" Please help!!
  9. Hello, I want to edit php.ini file. I am installing Drupal - open hotel distribution package in the server. It is saying that max_execution_time 30 is exceeded and so the installation is not completing properly. So, is it possible to edit php.ini file and how?
  10. Can anyone help me to do it ~~ I try for so long but still can't do it -> Chat with me : hoang8595@yahoo.com.vn or Post it here tks so much
  11. I got a login script code but when add it it says: "Cannot select DB" You can find the whole code http://www.phpeasystep.com/phptu/6.html. Here it is: &--#60;?php $host="localhost"; // Host name $username="schimpfk"; // Mysql username $password="**PASSWORD**"; // Mysql password $db_name="test"; // Database name $tbl_name="members"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // username and password sent from form $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; // To protect MySQL injection (more detail about MySQL injection) $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = mysql_real_escape_string($mypassword); $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file "login_success.php" session_register("myusername"); session_register("mypassword"); header("location:login_success.php"); } else { echo "Wrong Username or Password"; } ?&--#62; I changed my password!
  12. Hey. I'm trying to make a banned user script. I want it so if a banned user trys to enter the chatroom, it brings them to a new page. My problem is, it acts like every user is a banned user... o.O Here is the part in the php code that gets the users "rank" from the db when they login. $row = mysql_fetch_assoc($result); session_register($row['rank']=$userlevel); Then here is the part of the code for the chatroom that checks if the user is a banned user or not: <?php session_start(); if(!session_is_registered(myusername)){ header("location:/login/main_login.php"); //This is just checking if the user is logged in or not. } if(session_register($userlevel=='banned')) { header("location:../banned.html"); } So that's it. Thanks. ~ Spencer
  13. Hello everybody! According to cPanel my site's PHP version is 5.3.8, and imagegrabscreen has been available since 5.2 or so according to php.net. I'm getting an error saying that the function does not exist. Any ideas? -Rick
  14. Hello There! I am trying to get my chat room, to automatically update the messages and data. As of right now, to see a new message, you must refresh the page. ( I learned from w3schools and don't quite get AJAX as much as I want to. :/ So if I'm way off track, please tell me. ) As always, here is the code I am using: &--#60;?php session_start(); if(!session_is_registered(myusername)){ header("location:/login/main_login.php"); } $myusername = $_SESSION['myusername']; ?&--#62; &--#60;html&--#62; &--#60;head&--#62; &--#60;link rel="SHORTCUT ICON" href="http://oi46.tinypic.com/rky444.jpg"&--#62; &--#60;title&--#62;Mbox:Chat&--#60;/title&--#62; &--#60;script type='text/javascript'&--#62; function updateChat() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("topscreen").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET",/chat/chatroom.php?error=",true); xmlhttp.send(); } &--#60;/script&--#62; &--#60;style&--#62; /*3DS SCREEN START*/ div#topscreen { border:15px solid; border-color:#1E90FF; overflow:auto; position: absolute; top: 0px; left: 0px; height: 205px; width: 290px; background-color:#FFFFFF; z-index:2; } div#bottomscreen { position: absolute; top: 218px; left: 0px; height: 212px; width: 320px; background-color:#1E90FF; } /*3DS SCREEN STOP*/ div#taskbar { background-color:silver; width:320px; height:100px; position:absolute; top:30px; z-index:5; } &--#60;/style&--#62; &--#60;meta name="viewport" content="width=320"&--#62; &--#60;/head&--#62; &--#60;body&--#62; &--#60;body onload="setInterval('updateChat()',5000);"&--#62; &--#60;!-- TOP SCREEN --&--#62; &--#60;div id="topscreen"&--#62; &--#60;?php $db_sitename="spencer_register"; $db_hostname="localhost"; $db_username="spencer_mega"; $db_password="PASSWORD HERE"; $no_of_comments="15"; /* Leave the script below as it is */ mysql_connect($db_hostname, $db_username, $db_password); mysql_select_db($db_sitename); $pagename=md5($_SERVER['PHP_SELF']); $query=mysql_query("Select * from comments where comment_on='$pagename' ORDER BY id DESC LIMIT 0, $no_of_comments"); while($fetch=mysql_fetch_array($query)) { echo "&--#60;p&--#62;&--#60;b&--#62;&--#60;sub&--#62;".$fetch['comment_by'].": &--#60;/sub&--#62;&--#60;/b&--#62;&--#60;sub&--#62;".$fetch['comment']."&--#60;/sub&--#62;&--#60;/p&--#62;"; } mysql_close(); ?&--#62; &--#60;/div id="topscreen"&--#62; &--#60;!-- BOTTOM SCREEN --&--#62; &--#60;div id="bottomscreen"&--#62; &--#60;!-- PUT STUFF ON THE TASKBAR UNDER THE DIV ID TASKBAR --&--#62; &--#60;div id="taskbar"&--#62; &--#60;a href="../homepage.php"&--#62;&--#60;img src="http://the12.squarespace.com/storage/zzzzhome.png?__SQUARESPACE_CACHEVERSION=1356027845932" width="50px" height="50px"&--#62;&--#60;/a&--#62; &--#60;/div id="taskbar"&--#62; &--#60;!-- Send input box start --&--#62; &--#60;form action="/chat/post_chat.php" method="post"&--#62; &--#60;table&--#62; &--#60;tr&--#62;&--#60;td&--#62; &--#60;/td&--#62;&--#60;td&--#62;&--#60;input type="hidden" name="comment_on" size="" readonly="readonly" value="&--#60;?php print md5($_SERVER['PHP_SELF']); ?&--#62;"/&--#62;&--#60;/td&--#62;&--#60;/tr&--#62; &--#60;input type="hidden" name="comment_by" value="&--#60;?php echo $myusername;?&--#62;"/&--#62; &--#60;tr&--#62;&--#60;td&--#62;&--#60;input name="comment" size="33" maxlength="255" &--#62;&--#60;input type="submit" value="Send!" /&--#62;&--#60;/td&--#62;&--#60;/tr&--#62; &--#60;br/&--#62;&--#60;br/&--#62;&--#60;br/&--#62;&--#60;br/&--#62;&--#60;br/&--#62;&--#60;br/&--#62;&--#60;br/&--#62;&--#60;br/&--#62; &--#60;tr&--#62;&--#60;td&--#62;&--#60;/td&--#62;&--#60;td&--#62;&--#60;/td&--#62;&--#60;/tr&--#62; &--#60;/table&--#62; &--#60;/form&--#62; &--#60;/div id="bottomscreen"&--#62; &--#60;/body&--#62; &--#60;/html&--#62; Yeah I know. =P Some messy coding, but I'm working on it. Alright, well thanks in advance! ~ Spencer
  15. Hey there! I want to style an "echo" in PHP. ( You know. Make it blue, position it, ect. ) All the examples and places I have learned about this work, but this echo has a variable in it: echo '<div id="welcome_username">"Welcome, " . $myusername . "!"</div>'; The variable is $myusername ( Making it say "Welcome, Username!" =P ) Is there a different way to style an echo, when it has a variable? Thanks for your time. ~ Spencer ( If you must, here is the whole code... I do't think it is needed though. ) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ <?php session_start(); if(!session_is_registered(myusername)){ header("location:main_login.php"); } $myusername = $_SESSION['myusername']; ?> <html> <head> <title>Mbox:homepage</title> <script> window.setInterval(function(){ window.scrollTo(40, 220); }, 50); </script> <style> /*3DS SCREEN START*/ div#topscreen { position: absolute; top: 0px; left: 0px; height: 218px; width: 320px; background-color:#E0FFFF; z-index:2; } div#bottomscreen { position: absolute; top: 218px; left: 0px; height: 212px; width: 320px; background-color:#E0FFFF; } /*3DS SCREEN STOP*/ /* WELCOME USERNAME STYLE START */ div#welcome_username { color:#0000EE; font-weight: bold; position:absolute; top:5px; left:50px; } /* WELCOME USERNAME STYLE STOP */ </style> <meta name="viewport" content="width=320"> </head> <body> <!-- TOP SCREEN --> <div id="topscreen"> <?php echo '<div id="welcome_username">Welcome, . $myusername . !</div>'; ?> <p style="color:red; text-decoration:underline;">Homepage under construction.</p> </div id="topscreen"> <!-- BOTTOM SCREEN --> <div id="bottomscreen"> </div id="bottomscreen>" </body> </html>
  16. Hey there! Recently, I have made a comment section on my website. It worked great, but to show who posted a comment, a user would have to type in who they are in the "Comment By:" inputbox. I don't want this anymore, due to users being able to impersonate one another. I want to make it show actually who posted it. ( Yes. I have a working register and login ). Here is my news:chatroom_first_priority.php code ( Note: I have removed the Comment By: inputbox and all the rest of that stuff. This is my attempted code. If needed, tell me you want to see my original code. ) : <?php session_start(); if(!session_is_registered(myusername)){ header("location:/login/main_login.php"); } $myusername = $_SESSION['myusername']; ?> <html> <head> <title>Mbox:News</title> <script> </script> <style> /*3DS SCREEN START*/ div#topscreen { position: absolute; top: 0px; left: 0px; height: 1300px; width: 320px; background-color:#1E90FF; z-index:2; } div#bottomscreen { position: absolute; top: 218px; left: 0px; height: 212px; width: 320px; background-color:#1E90FF; } /*3DS SCREEN STOP*/ /* WELCOME USERNAME STYLE START */ div#welcome_username { text-decoration:none; color:#000000; font-weight: bold; background-color:aqua; text-align:center; } /* WELCOME USERNAME STYLE STOP */ a.logout { text-decoration:underline; color:#000000; font-weight:bold; background-color:#FFFFFF; position:absolute; top:0px; left:250px; } a.home { text-decoration:underline; color:#000000; font-weight:bold; background-color:#FFFFFF; position:absolute; top:0px; left:5px; } a:link { color:#000000; text-decoration:underline; } a:visited { color:#000000; text-decoration:underline; } a:hover { color:#FF0000; text-decoration:none; } p.article_by { background-color:lime; text-align:left; font-weight:bold; } </style> <meta name="viewport" content="width=320"> </head> <body> <!-- TOP SCREEN --> <div id="topscreen"> <?php //echo "Welcome, " . $myusername . "!"; ( OLD CODE ) echo "<div id=\"welcome_username\">Welcome, $myusername ! </div>"; ?> <!-- WELCOME USERNAME PHP SCRIPT STOP --> <!-- REST OF STUFF DOWN --> <a href="../login/logout.php" class="logout">Log out</a> <a href="../homepage.php" class="home">Home</a> <!-- MAKE THE LINE BELOW THE WELCOME --> <br/> <hr/> <a href="/news/news.php"><img src="http://www.pokernewsreport.com/wp-content/uploads/2011/04/news-icon.png" style="width:75px; height:75px; position:absolute; top:60px; left:120px;"></a> <br/> <br/> <br/> <p class="article_by">Spencer:</p> <!-- ARTICLE START --> <p style="background-color:white;">This is just a test section for now</strong> <br/> <strong>~ Spencer</strong></p> <!-- ARTICLE STOP --> <hr/> <form action="/news/post_comment.php" method="post"> <table> <tr><td> </td><td><input type="hidden" name="comment_on" size="" readonly="readonly" value="<?php print md5($_SERVER['PHP_SELF']); ?>"/></td></tr> <tr><td>Comment: </td><td><textarea name="comment" cols=24></textarea></td></tr> <tr><td></td><td><input type="submit" value="Submit" /></td></tr> </table> </form> <?php $db_sitename="spencer_register"; $db_hostname="localhost"; $db_username="spencer_mega"; $db_password="PASSWORD HERE"; $no_of_comments="10"; /* Leave the script below as it is */ mysql_connect($db_hostname, $db_username, $db_password); mysql_select_db($db_sitename); $pagename=md5($_SERVER['PHP_SELF']); $query=mysql_query("Select * from comments where comment_on='$pagename' ORDER BY id DESC LIMIT 0, $no_of_comments"); echo "<hr />"; echo "<h3>Latest Comments</h3>"; while($fetch=mysql_fetch_array($query)) { echo "<p>".$fetch['comment']."<br/><sub><b>Comment by: </b>".$myusername."</sub><hr /><p>"; } mysql_close(); ?> </div id="topscreen"> <!-- BOTTOM SCREEN --> <div id="bottomscreen"> </div id="bottomscreen"> </body> </html> Here is my post_comment.php: <?php $db_sitename="spencer_register"; $db_hostname="localhost"; $db_username="spencer_mega"; $db_password="PASSWORD HERE"; /* Leave the script below as it is */ mysql_connect($db_hostname, $db_username, $db_password); mysql_select_db($db_sitename); $comment_on=$_POST[comment_on]; $comment_by=$_POST['$myusername']; $comment=$_POST[comment]; $query=mysql_query("INSERT INTO comments (comment_by,comment_on,comment) VALUES ('$myusername','$comment_on','$comment')"); if($query) { $ref=$_SERVER['HTTP_REFERER']; header("location: $ref"); } else { echo "Error when posting the comment."; } mysql_close(); ?> I actually know what I am doing wrong, but don't know how to fix it. myusername whatever the person types into the username login inputbox before logging in, to make it at the top say, Welcome, Username! So now, it will say all of the comments are posted by YOU. Thanks for the help! I appriciate it! ~ Spencer
  17. After customer filling the form, the form data will be send to mysql, and an email will sent to me with the last form data that customer submitted. All is working, but only the problem is in the email "last mysql data" is not going as inline text. So, how to do this? I am doing in PHP. In am new in PHP. Please help me. Sample code is given below. <?php define('DB_NAME', 'sandi565_form11'); define('DB_USER', 'XXXXXXX'); define('DB_PASSWORD', 'XXXXXXX'); define('DB_HOST', 'localhost'); $link = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD); if (!$link) { die('Could not connect: ' . mysql_error()); } $db_selected = mysql_select_db(DB_NAME, $link); if (!$db_selected) { die('Can\'t use ' . DB_NAME . ': ' . mysql_error()); } //Start Posting the data in Mysql database from Form Input $value = $_POST['input1']; $value2 = $_POST['MAmount']; $sql = "INSERT INTO demo (input1, MAmount) VALUES ('$value', '$value2')"; if (!mysql_query($sql)) { die('Error: ' . mysql_error()); } //start print the database $data = mysql_query("SELECT * FROM demo ORDER BY ID DESC LIMIT 1") or die(mysql_error()); Print "<table border cellpadding=3>"; while($info = mysql_fetch_array( $data )) { Print "<tr>"; Print "<th>ID:</th> <td>".$info['ID'] . "</td> "; Print "<th>Input1:</th> <td>".$info['input1'] . "</td> "; Print "<th>MAmount:</th> <td>".$info['MAmount'] . " </td></tr>"; } Print "</table>"; mysql_close(); //end print the database on form processing page //start emailing the data date_default_timezone_set('Asia/Kolkata'); require_once('class.phpmailer.php'); //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded $mail = new PHPMailer(); //$body = "gdssdh"; //$body = preg_replace("[\]",'',$body); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "ssl://XXXXXXX.XXXXXXX.org"; // SMTP server $mail->SMTPDebug = 1; // enables SMTP debug information (for testing) // 1 = errors and messages // 2 = messages only $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "ssl"; // sets the prefix to the servier $mail->Host = "XXXXXXX.XXXXXXX.org"; // sets GMAIL as the SMTP server $mail->Port = 465; // set the SMTP port for the GMAIL server $mail->Username = "contact@XXXXXXX.com"; // GMAIL username $mail->Password = "XXXXXXX"; // GMAIL password $mail->SetFrom('contact@XXXXXXXX.com', 'HAL'); //$mail->AddReplyTo("user2@gmail.com', 'First Last"); $mail->Subject = "Halmira 469"; THE PROBLEM IS HERE WHEN I WANT TO SEND THE DATA AS INLINE TEXT TO EMAIL FROM MYSQL IT IS NOT WORKING. ONLY "PRINT THE DATA" IS SENDING TO EMAIL. HOW TO DO THIS? $body = 'Print the data'; mysql_connect("localhost","XXXXXXX","XXXXXXX"); @mysql_select_db("sandi565_form11"); $query["SELECT * FROM demo ORDER BY ID DESC LIMIT 1"]; $result = mysql_query($query); //while ($row = mysql_fetch_array ($result)) { // $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test $mail->MsgHTML($body); $address = "XXXXXXX@gmail.com"; $mail->AddAddress($address, "user2"); //$mail->AddAttachment("images/phpmailer.gif"); // attachment //$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message sent!"; } ?>
  18. So I was wondering a useful way to use php the other day and came up with a simple but extremely useful script. Firstly I want to make it clear that this is more for smaller site designers wanting to find out how to best improve their sites, however larger sites with more traffic may find it useful as well for different reasons. USES FOR SMALL SITES Learn how your users move around your site. Learn the most popular areas of your site. Help learn what can be done to move users to the areas of your site that you want. USES FOR LARGE SITES Learn when users are visiting broken links. Learn when users are trying to enter restricted areas. Learn what IP is most likely that of a spammy or otherwise disruptive user. OVERALL USE Learn what peak times are for your site. Identify when the best time for site maintenace is. The script is simple and will only create a plaintext log but you can refine it to use MySQL databases for storage. I advise putting the script after the page's html and styling is processed to avoid any major problems with displays being broken. Now to the fun part. Small sites: <?php $ip=$_SERVER['REMOTE_ADDR']; $page=$_SERVER['REQUEST_URI']; $dayassoc=getdate(); $output= $ip."\t".$page."\t".$dayassoc['mon']."/".$dayassoc['mday']."/".$dayassoc['year']."\t".$dayassoc['hours'].":".$dayassoc['minutes']."\r\n"; file_put_contents("tracking.txt", $output, FILE_APPEND); ?> put that on each page to get as detailed a listing as you can about how users interact with your site. You can include this on custom error pages as well and I'll explain that shortly. Large sites: I suggest only placing it on error pages, also replace "errorpagecode" with 401, 404, etc depending on the page you're putting it in. If you must put it in a trafficed area try to limit the amount of pages you paste it in to avoid collisions with file write requests. <?php $errcode="errorpagecode"; $ip=$_SERVER['REMOTE_ADDR']; $page=$_SERVER['REQUEST_URI']; $dayassoc=getdate(); $output= $ip."\t".$page."\t".$dayassoc['mon']."/".$dayassoc['mday']."/".$dayassoc['year']."\t".$dayassoc['hours'].":".$dayassoc['minutes']."\t".$errcode."\r\n"; file_put_contents("tracking.txt", $output, FILE_APPEND); ?> Feel free to leave questions and comments ; EDIT: Changed to use file_puts_contents() instead of messy, unintuitive c-like fopen/fputs/fclose per Byron's suggestion. EDIT 2: I should probably add that you'd want to keep people from accessing this file so in your root folder's .htaccess add something like: AuthUserFile "/home/user/.htpasswds/public_html/passwd" AuthName "Visitor Tracking" AuthType Basic <Files "tracking.txt">; require valid-user </Files> where AuthUserFile is the filepath to a nonpublic directory containing the user=>key pairs required to access the file. AuthName can be anything you want. Don't put the require valid-user directive outside the files tag as that will password protect your entire site.
  19. User proxse, web-address proxse.heliohost.org on Stevie: When I try to run any PHP file at all, even a blank one, I get a 500 error. I tried creating a blank file, same thing. I don't know if it's somehow conencted to moving my account from Johnny. Somewhat related comment: FTP doesn't work either.
  20. The Php Mail() Function at stevie doesn't work. Does anyone knows why or when it is going to work again?
  21. Hi everybody! I am trying to send an email through an PHP script for authentification sakes. It used to work out with the PHP mail() function. My syntax was: mail("example@example.com", "subject", "message", "From: myemail@example.com"); Now that I moved to Heliohost this doesn't seem to work out anymore. It doesn't give me an error message, but I just won't recieve the sent mail at example@example.com. What could be the reason for this? Is there anything I have to configure in cPanel or in my code to get PHP mail() to work? Or is there any other way I can send an email from my script? My preference would be an easy way to send that mail. I don't need to have special features like HTML-Email, just the way mail() used to serve it. Thankfully, blog2
  22. Hi, I have an application developed in PHP but this requires having PHP4 version. You may request a change or is there a script that allows me to switch between versions? Thank you.
  23. I am connecting to my MySQL server using PHP and getting the error: Warning: mysql_connect() [function.mysql-connect]: Too many connections in file on line # Failed to connect to server: Too many connections I am using mysql_close() when I redirect or when the script stops. Why am I getting this error? Is there anyway to prevent this from happening?
  24. Is there any restriction on sending e-mails using mail() to the same domain that is hosting the script? I'm slowly building my site during my free time and just noticed that my contact form isn't working properly. It spits out no error, but the mail never reaches it's destination. So, I've created the following test file (let's say my domain is "example.com"): <?php error_reporting(E_ALL); $to = "me@example.com"; $subject = "Test Mail"; $message = "Hello world!"; $headers = "From: no-reply@example.com"; echo mail($to, $subject, $message, $headers) ? "The email was sent" : "Fail!"; ?> Playing with this file I discovered that my mail never gets sent only if the recipient I've specified is from my own domain, the same domain which is hosting the script. If I change it to another one (gmail in this case) it works without problems: <?php error_reporting(E_ALL); $to = "me@gmail.com"; $subject = "Test Mail"; $message = "Hello world!"; $headers = "From: no-reply@example.com"; echo mail($to, $subject, $message, $headers) ? "The email was sent" : "Fail!"; ?> What really puzzles me is that this code works flawlessly in another host - and yes, using my domain. I've been using an DNS Round Robin to check out it's pros & cons and I'm able to test both hosts at the same time. Some useful (or not) information: My MX records are pointing directly to Google's records, since I'm using their Tools, and I'm also using an spf. I'm not using any nameservers, but A records only. The round robin has been working like a charm so far and the only problem I've encountered is the mail() one. I don't see how the round robin could have anything to do with this. If you need more info like seeing my DNS records, or how my mail headers looks like when I manage to send them (through the other host/to my gmail account) just ask. P.s.: English isn't my mother tongue, sorry about any weird sounding sentence. Also, I wasn't sure about where post it. Since it looks like a host-restriction, I've chosen this section.
  25. Hi, when I was viewing my profile, I clicked on reputation and got this error message Fatal error: Call to undefined method skin_profile_3::tabReputation() in /var/www/html/helionet/index/admin/applications/members/extensions/profileTabs/reputation.php on line 73 I have no idea what it means but I thought you should know about it. Sorry if this is posted in the wrong place. PS - I only joined today so that could maybe be a factor...just saying... -Peace
×
×
  • Create New...