I followed this site -> https://www.box.com/blog/how-to-debug-php-with-vim-and-xdebug-on-linux/ but I'm not having much luck. I followed the firections and my phpinfo() functions is showing that xdebug is up and running but I see don evidence of xdebug from within vim. I typed in my localhost url, localhost/mysite.php?XDEBUG_SESSION_START=1 and then wen to vim and pressed f5 but that didn't seem to have an effect at all. When I run `cat /var/log/apache/error.log` I get no errors showing. And here are my xdebug setting in my /etc/php5/apache/php.ini file ;My Modules [bash][Zend] zend_extension = /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable = 1 xdebug.remote_port = 9000 xdebug.remote_host = localhost [/bash] Any …

Member Avatar
Member Avatar
+0 forum 1

Please, I need help to echo atable row and div tag within PHP code. The following is what I have unsuccessfully tried: echo '<tr>' '<td style="text-align:left">' . '<div class="describe">' . $row['im_description'] . '</div>' . '</td>' '</tr>'; I don't want it to appear in this format: <tr> <td style="text-align:left"><div class="describe"><?php echo $image['im_description']; ?></div></td> </tr>

Member Avatar
Member Avatar
+0 forum 2

It might be obvious, but I can't seem to understand it. So don't laugh. Let's assume this scenario. My website has 5 themes, there are 5 buttons. Clicking each button changes theme respectively and uniquely. I use JavaScript to do that, so I set name of theme in a cookie, for example `theme=DarkOne` and set it to expire over 10 years. My very **local** storage, saves that variable. Without knowledge of the server. Visitor of my website decides to change his theme to `theme=DarkOne` by clicking one of buttons. Then, goes off wondering visiting of the wonderful images and very …

Member Avatar
Member Avatar
+0 forum 9

Hi guys! I need help with meta tags on my website! Look on all intire website i have more then 20 pages, and im using only one head.php and footer.php files. So i want to have a meta tags for each page, without dupicating the head.php, and i'm really struggling. is there a way to do this without duplicating the head.php I hope get some repply from you guys!

Member Avatar
Member Avatar
+0 forum 2

i have been able to pass value from form to ajax and to php to insert into my database. Now there is a value which determines whether to redirect to page 1 or page 2 after inserting. As well i alert that the form was successful. So i wanna know how to do pass this values back to ajax and how to redirect to the page i require.Thank you very much in advance.

Member Avatar
Member Avatar
+0 forum 3

Hi, I'am newer in PHP development.I have a question please,Is there any way to create a web application with AngularJS, HTML5, and CSS3 as front end, and NodeJS as back end ,and PHP5 as a the restful web service? thanks for Help

Member Avatar
+0 forum 0

Can anyone help me figure out how to fix these errors? Warning: mysql select db(): supplied argument is not a valid MySQL-Link resource in /home/xxxxx /index.php on line 37 Line 37 is: mysql_select_db($conn, "yourmil_content"); ----------------------------------------------------------------------------- Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in/home/xxxxxx/index.php on line 247 Line 247 is: $result = mysql_query($sql, $conn); --------------------------------------------------------------------------------------------------- Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in/home/xxxxx/index.php on line 248 Line 248 is: $data = mysql_fetch_array($result);

Member Avatar
Member Avatar
+0 forum 5

Hi guys. Can you tell me what do you think of No Glue project? The aim is to create a set of loose components in PHP that can be used individually or combined to make web applications. Whoever likes the idea can join the project too. [Click Here](https://bitbucket.org/npavlicevic/no-glue) No Glue project [Click Here](https://bitbucket.org/npavlicevic/no-glue-blog) No Glue blog

Member Avatar
Member Avatar
+0 forum 4

hay how is everybody here, I have this form which should sign up users and send email to them to confirm they emails the users sign up OK but the Email don't go at all to the users email see my code and please need help on this. <?php if(isset($_POST['submited'])) { $msg=""; $RFname = clean_text($_POST['RFname']); $RLname = clean_text($_POST['RLname']); $USERname = clean_text($_POST['UserName']); $USERpassword = $_POST['UserPass']; $USERpassword2 = $_POST['UserPassConfirm']; $USERemail = $_POST['UserEmail']; $USERwebsite = $_POST['WebSite']; $hash = clean_text(md5(rand(0,1000))); $checkEmail=$db->query("select * from loginaccess where Email ='".$USERemail."'"); $checkUID=$db->query("select * from loginaccess where Uname ='".$USERname."'"); if($USERpassword !== $USERpassword2) { $msg = "<span style='color:#F00; font-size:14px; font-weight:bold;'>Passwords …

Member Avatar
Member Avatar
+0 forum 5

Hi I have a simple code below that fetches, make, model and year from the database, but for some weird reason I get: Fatal error: Cannot access protected property error, any ideas as to why this might be happening? (i btw have this code on a different server running with no issues.) $count = 0; foreach( $_product->getFitModels() as $fit ) { $trimmedData = ' '.$fit->row->make.' '.$fit->row->model.' '.$fit->row->year; $tempMMYArray[] = $trimmedData; }

Member Avatar
Member Avatar
+0 forum 5

Dear friends, I am using shared linux hosting php5 enabled and also supports php4, I am using some .php files for my site, Now I want to edit my php ini, Whether I need to edit php5.ini or or php.ini. I do not know which type of php files I am having. Which version I am using?. Please help me. Thanks

Member Avatar
Member Avatar
+0 forum 1

I have a singleton class that I am revamping and need a little help with. I want to use the following syntax for my queries without having to declare a global object. Below is my current code: /** * The db database object * * @access private * @var object */ private $db; /** * MySQLi database object * * @access private * @var object */ private static $instance; /** * Current result set * * @access private * @var object */ private $result; /** * The last result (processed) * * @access private * @var array */ private $last_result; …

Member Avatar
+0 forum 0

Dear users, I am new to PHP5. My LAMP is working just fine.I made small database connect scripts and they just worked as it should.Then I tried the following code and run the mysql.php but showing me following error: [CODE]Could not run query: Access denied for user 'www-data'@'localhost' (using password: NO)[/CODE] My user name is root and password is root.Please check to help me.God bless you all. [CODE] <?php /*database.inc.php * */ define($server, "localhost"); define($conn_username, "root"); define($conn_password, "root"); define($database_name, "database_1.1"); ?> [/CODE] I think there is some mistake somewhere here: [CODE] <?php class mysql { var $server; var $conn_username; var …

Member Avatar
Member Avatar
+0 forum 5

I am trying to start a daemon on a server with Ajax PHP and JQuery. The following code executes without any errors an opens all the html files in separate browser windows like it's supposed to. I receive the alert message . However, the daemon never starts. Can anyone see what is wrong with the code? Server side php file: filename: executedp.php [CODE]<?php $startDaemon = exec('sh ~/.devilspie/ruleset.sh $x; done'); ?>[/CODE] Client side JQuery Code: [CODE] if(found) { //call to start daemon var xhr = $.ajax({ url: 'executedp.php', success: alert("It has begun!") }); switch($.tableCount) { case ($.tableCount = 1): window.open('table1.html'); xhr; …

Member Avatar
Member Avatar
+0 forum 2

hello :) it's been more than 4 days, i had been searching for php client library for facebook app development. all libraries, that i find, are outdated, (not supported by facebook anymore) and i get "undefined function........" error. so where can i get the latest php client library for facebook app development, that currently works? plz give me the exact link to that... Thanks :)

Member Avatar
Member Avatar
+0 forum 1

Hi guys I used the joomla cms for web development. Actually i install the roknewsrotator module and use it for Persian language that it decode with UTF-8. i don't know why the News rotators module want to show some news in UTF-8 language, at the end of the sentences it showed this icon : � i try to fix it, but until now, i was unsuccessful. I find all of php file of this module and change all of them from ANSI to UTF-8. But the problem persist. If anyone can help me, please guide me. Thank you

Member Avatar
Member Avatar
+0 forum 9

Hi, I have two servers. The question is i want to select the information form one server's table and insert it into other server's table. for that how many files i need. I am able to select table data form server one but i don't know how to insert it into server two's table. can any one help me or give me brief idea which will work

Member Avatar
Member Avatar
+0 forum 9

Im having a problem with my code. When I run it to php4 and it works fine. Then I tried it to php5. Im getting error -[COLOR="Red"]"Undefined Variable: _Session in ..."[/COLOR] [CODE]<?php session_start(); function logged_in() { return isset($_SESSION['idnum']); return isset($_SESSION['user_type']); return isset($_SESSION['fname']); } function confirm_logged_in() { if (!logged_in()) { redirect_to("index.php"); } } function confirm_logged_in_admin() { if (!logged_in()) { redirect_to("admin.php"); } } function booking_restriction(){ if ($_SESSION['user_type'] == 4) { redirect_to("home.php"); } } function confirm_if_admin() { if ($_SESSION['user_type'] == 2 || $_SESSION['user_type'] == 3 || $_SESSION['user_type'] == 4 ) { redirect_to("../home.php");} } ?> [/CODE]

Member Avatar
Member Avatar
+0 forum 2

I am trying to run the following perlscript from php page. But unfortunately, it failed without giving any error. exec("PERL C:/Program Files/Zend/Apache2/htdocs/Scripts/test.pl"); But when I am trying the same perl command from command line interface, it runs successfully. PERL C:/Program Files/Zend/Apache2/htdocs/Scripts/test.pl Can anybody advise, where i am making mistake? I need to invoke the same perl command from php. Thanks in advance!! Content of test.pl #!/usr/bin/perl print "Hello World!\n"; Regards, Deepali

Member Avatar
Member Avatar
+0 forum 1

Hi I'm developing a web application and needs to Integrate it with Authorize.NET AIM. I have tested the code provided by Authorize.NET it works fine for Single product. This code has an option to use for line items and is commented by default. I uncommented it and then used it but it only shows a single product processing no line items processing. Please see the Authorize.NET AIM Sample Code [CODE]// By default, this sample code is designed to post to our test server for // developer accounts: [url]https://test.authorize.net/gateway/transact.dll[/url] // for real accounts (even in test mode), please make sure that …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have some difficulty with my 'select' In my select/menu, I display all the options come from a table (table_db_email) in my database In this table ([B]tb_code_prmtn11_email[/B]) I have two field : [B]fld_email_id fld_name_email[/B] It works here is a code [CODE]<select name="email_adress_menu" id="email_adress_menu" class="valid" onchange="submit()"> <?php echo "<option selected=\"selected\" value=''>Choose your name</option>"; $req_email_adress_menu = " select DISTINCT id_email, fld_name_email, fld_adresse_email FROM $table_db_email ORDER BY fld_name_email "; $rep_email_adress_menu = mysql_query($req_email_adress_menu, $cnx) or die( mysql_error() ) ; while($show_email_adress_menu = mysql_fetch_assoc($rep_email_adress_menu)) { echo '<option value="'.$show_email_adress_menu['id_email'].'"'; //if($primes==$show_email_adress_menu['fld_name_email']){echo " selected";} //display to select an option!!!!!!!!!!!!!!!! echo '>'.$show_email_adress_menu['fld_name_email'].' - '.$show_email_adress_menu['fld_adresse_email'].'</option>'; } ?> </select>[/CODE] I have …

Member Avatar
+0 forum 0

function main() { if(window.XMLHttpRequest) { ab=new XMLHttpRequest; } else { ab=new ActiveXObject("Microsft.XMLHttp"); } ab.onreadystatechange=function(){ if(ab.readyState==4 && ab.status==200) { document.getElementById("progress").innerHTML=ab.responseText; } } ab.open("GET","querygoogle.php"); ab.send(); } function test(id) { if(window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest; } else { xmlhttp=new ActiveXObject("Microsft.XMLHttp"); } xmlhttp.onreadystatechange=function(){ if(xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("testdiv").innerHTML=xmlhttp.responseText; //alert(xmlhttp.responseText); } } xmlhttp.open("GET","test.php",0); xmlhttp.send(); } function interval() { main(); setInterval('test(<? echo $_SESSION['id'];?>)','5000'); //test(); } in the main() i am insertig data in a table and i am running this function synchronously 2 minutes and from test() i am getting the result, of on which insertion id this is processing every 5 second getting alert(id) but giving …

Member Avatar
+0 forum 0

[CODE]<?php if(isset($_REQUEST['action'])) { $value=$_REQUEST['check']; foreach($value as $ids) { $mdelete="DELETE FROM songs WHERE id='".$ids."'"; mysql_query($mdelete); } } ?>[/CODE]

Member Avatar
Member Avatar
+0 forum 5

hi i have a form where we can see all values from database and in this all row having three submit button named edit,del,info and i given id of the row is primary key of database table. when i press info i want that in next page i can get its value and also identify that user press info or when user identify info button than i want to get id of the button. please help me. (its just like when we work with wamp server there are table data show and when i press on delte button than it …

Member Avatar
Member Avatar
+0 forum 2

I have a linux shared hosting account on godaddy and I want to use mysqli instead of the standard mysql. I'm not sure how to set it up though. I've picked up pieces of information around, but can't seem to find enough information that is specific enough to the situation. I'm on a Linux shared server and I'm using PHP 5 with MySQL 5.0 currently. Step by step instructions would be awesome, but any direction that could be given would help out.

Member Avatar
Member Avatar
+0 forum 1

How can I use explode function in php I already implode some data in mysql [CODE] // customer table cust_id, impid, 1, 1,2 // sports table sport id, sport name 1, football 2, basketball [/CODE] How can I explode and make a php/mysql query

Member Avatar
Member Avatar
+0 forum 11

I created a login system using php.And it can handle member profiles.But i was unable to upload profile picture.how can i do that???????

Member Avatar
Member Avatar
+0 forum 2

Hi there, I am a PHP developer and know little of JS - in my current project I have hit a few probs as I know I need to incoporate some JS. After some help already from this community I have almost completed the JS part of one page that totals without needing a refresh. I have looked up JS resources that show me how easy it is to take a value and make it and change it to 2 dec places. However, I can not seem to put the relevant code into the function - a very scaled down …

Member Avatar
Member Avatar
+0 forum 12

Hi, I am a PHP developer I never learned much JS but there is no way to accomplish this function using only PHP without a refresh. I am trying to adapt a script that did the basics. [CODE] <script language="JavaScript"> function som() { var First, Last, Full; First = document.Credit.First.value; Last = document.Credit.Last.value; Full = document.Credit.Full.value; document.Credit.Full.value = (First / Last); } </script> [/CODE] My page is a dynamic php page using MySQL and I have created the JS using concatenation of strings in a loop for those items pulled from the DB table where sts==1 - this is really …

Member Avatar
Member Avatar
+0 forum 4

Hi, I have a question regarding Object Orientated Programming as it is baffling me. Lets say I have a form called register. It is made up of Username, Password and Emai. Now when the user clicks submit the form will be handled by the class register but how does the methods know what the values are ? [CODE] <form name="register" action="register.php"> Username<input type="text" name="Username" /> Password<input type="text" name="Password" /> Email<input type="text" name="Email" /> </form> [/CODE] Now I would have a method within a class like below: [CODE] public function checkLogin($Username, $Password) { // carry out form processing } [/CODE] How …

Member Avatar
Member Avatar
+0 forum 1

The End.