« first day (259 days earlier)      last day (51 days later) » 

10:00 PM
0
Q: CakePHP migration issue

AchilleasAt my work we have a cakePHP application that was working fine, after we moved the application to other server, the application loads but dont work. Shows "Error: An Internal Error Has Occurred". In core.php/ i have Configure::write('debug', 2); Fatal Error Error: Call to a member function get...

0
Q: change ENTIRE url without redirect

Riccardo Genioburgercondoppiobi have this domain: http://www.example.com and when page is loaded a want to change/mask it in http://www.example2.com WITHOUT REDIRECT at the second URL i have tried with htacces, jquery and more other solutions. thanks

0
Q: Regular expression that gets a variable length field and outputs a field that is fixed

user2958058I need to add an ID field to a plif file that is made from the user ID section of an email address. Our email user ID is a variable length but when I output that as an ID the output must be exactly 48 characters long. The regex that finds the email user ID A(02||20)(N.*)( [^ ]*)(\@[a-zA_Z.]*ne...

0
Q: Sql server and Zend Framework 2 connection issues on windows machine

golldyIs there a tutorial or any kinda documentation anywhere online for ZF2 integration with Sql Server. I have tried and tested the things which are already there and where some are deprecated as well. The SQLSRV is pretty painful driver to get it working, in one of the examples, i tried downloading...

0
Q: Why is this else if not getting executed?

1n9i9c7omI have the following code: <?php ini_set('error_reporting', E_ALL); error_reporting(E_ALL); ini_set('log_errors', TRUE); ini_set('html_errors', FALSE); ini_set('error_log', '/var/www/vhosts/*******/test/random/error.log'); ini_set('display_errors', TRUE); require "./func/dbc.php"; define("IN...

0
Q: imagecreatefromjpeg() works fine on one server and gives error on other

SimranI have a script and it uses php fucntions like imagecreatefromjpeg() I recently bought a new server and migrated all the files from old server to new. I have checked the code 100 times and it is same as it was on old server and all the files are migrated successfully but when run it gives the fo...

0
Q: php $_POST not sending full value

FoxWizzyupdate.php $q = mysql_query("SELECT id FROM performer WHERE username='$user' LIMIT 1") or die("Error : " . mysql_error()); $r = mysql_fetch_assoc($q); $id = $r['id']; $query = mysql_query("SELECT baned_c, baned_c2, baned_c3 FROM performer_s WHERE id='$id' LIMIT 1"); $result = mysql_fetch_assoc(...

0
Q: wordpress include local root php file

webmaster alex lI have a child theme functions.php that I am trying to have include a few local domain files , through the use of short codes, that live outside of the Wordpress file structure. I cant seem to find whats going wrong. Anyone have any pointers? child theme functions.php <?php // localhost path d...

0
Q: Display category name from a table

user2956943i have two tables in my database. One name jokes and the other named category. jokes CREATE TABLE `jokes` ( `joke_id` int(11) NOT NULL AUTO_INCREMENT, `joke` varchar(1024) NOT NULL, `category_id` int(11) NOT NULL, PRIMARY KEY (`joke_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCR...

 
10:17 PM
-1
Q: Porting PHP code to Delphi code [need help]

user2958247i need help to porting PHP code to Delphi code. Thx = 1){ $loginonline = "";} else{ $loginonline = "";} $fp = @fsockopen($servergame, $portgame, $errno, $errstr, 1); if($fp >= 1){ $gameonline = "";} else{ $gameonline = ""; } ?> Login server: Game setver:

0
Q: $_POST does not working

Alan MulliganI have a html form that amens 4 fields which are populated from a database. I have my sql update statement inside an if statement but the but I am never getting into the if statement. I have been looking at this code now for ages and can not see my mistake. <form action="" method...

0
Q: PHP upload transparent images gives black background

KimI've been looking around for a solution to fix, transparent images that are turning black in the background after upload. What can I do to fix this? Thankful for any help! PHP: if($_GET['img']) { include('resize-class.php'); $valid_formats = array("jpg", "png", "gif", "bmp", "jpeg"); ...

0
Q: Easy way to create invoices with PHP and TCPDF

RoyWI'm busy programming something in PHP with an invoice function. In the administration panel employees can see all the details of the customers and there it's also possible to click and create invoices, reminders etc. in PDF format. For that I am using TCPDF and their examples on http://www.tcpdf....

0
Q: Checking MySql table for an entry and either UPDATE or INSERT with PHP

user2762390I am pulling data from the Crunchbase API and adding into a database. I am not sure what the best unique identifier is for both companies, people, or other, but I am thinking the permalink would work as an id. My question is how do I check if an entry has been added, if it has, then update/repl...

0
Q: HTML Form + PHP Issues

user2958205I have looked everywhere and searched high and low. I have seen many issues with the PHP code I'm about to post, but nothing pertaining to my specific issue I am seeing. Here is my issue - The two lines ($values/$required) where I have 'name','email',subject','message' I would like to add 'tel'...

0
Q: How to update codeigniter shopping cart using ajax?

Leonard DrapezaI want to update the quantity of a shopping cart when the item is already in the cart and add it when it is not(added in the cart). I'm confused on how to solve the twist of this problem. I've google a lot of the same problem but there is no same exact problem/solution for this. Here is the cod...

-1
Q: Adding a Delet button to an EDIT.PHP page

user2958236I'm kinda of new to .PHP and I would like to add a delete record function(Delete button) to an existing EDIT data page. Here is the codes from the edit.php page <?php require_once("database.php"); $con = mysql_connect($config["db_server"],$config["db_user"],$config["db_pass"]); mysq...

0
Q: Using Poedit to parse Twig templates in a Zend Framework 2 application

SaevenI've downloaded Poedit, and am attempting to parse my Twig templates. A few tutorials online pointed to https://github.com/umpirsky/Twig-Gettext-Extractor which I later found was referenced in a tutorial here http://aromatix.fr/?p=611 (French) with full instructions. I got the tutorial done, i...

0
Q: In Wordpress, how can I change the destinations of my links dependent on what page user is on?

GivenyI have the problem that I am using a theme where the navigation is simply 'scrolling' to a given part (eg. #contact) when pressed. However, I have implemented some seperate subpages that exits this scrollable page and thus renders the navigation ineffective. My question is, how can I change the ...

-1
Q: PHP strtotime using m-d-Y format

bagofmilkI have my dates in format (m-d-Y) month-day-Year. I'm trying to subtract dates. I can't use strtotime() because it won't work in that format. How can I subtract dates with m-d-Y format? <?php date_default_timezone_set('America/Chicago'); $olddate = "11-04-2013"; $today = date("m-d-Y"); ...

0
Q: PHP Resize Script not working on new server/domain

GO3DExpansionI had the resize.php script working on my previous server/domain and when you go to it HERE you can see the division by zero error. BUT! if you go to the same script on the new domain/server HEREits a blank page with no errors which leads me to believe something is not happening like it should be...

0
Q: PHP - Upload images to FTP directory and then Display images uploaded only from directory - 2

Don MisquittaWhile trying to upload image and display it, i'm getting the 'Failed moving the uploaded file'. Don't know where I'm going wrong.. Here's my image.php: <form enctype="multipart/form-data" action="upload.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a fil...

0
Q: unexpected T_ELSE, ENDIF

Seth ForzaCan anyone tell me what is wrong with this code? <?php if($this->session->userdata('login_user_id'));?> <?php $a = $this->session->userdata('login_user_id');?> <?php $data = mysql_query("SELECT * FROM user WHERE id='$a' AND specialrank='0'") or die(mysql_error());while($info = mysql_fetch_arra...

0
Q: LinkedIn PeopleSearch using list of names

user2687915I want to search for multiple people using the LinkedIn PeopleSearch APi. I have a CSV file with first names and last names that get uploaded ( I use php, for that). Then I pass the array of first names and last names ($data) to javascript. I am able to fetch the first names and last names in jav...

0
Q: Apache user permission

thomasandersenI have an Apache server installed which exposes a website written in PHP that I have been working on. One of the functions of the website is to insert new data into a MySQL database. When data is to be inserted the user presses a link which in turn calls a PHP script which contains a line like th...

0
Q: post querystring to mysql via php as opposed to plaing the link in address bar

user2835653i am trying to create a link in php, and submit that link, so that it will post the data contained therein to my mysql DB. if i paste this link into my address bar, and press enter, i will be able to add a record to the DB, no matter from what website or browser: http://mysite.com/data.php?firs...

0
Q: Xampp Zend_Mail_Protocol_Exception: Unable to find the socket transport "ssl" - library\Zend\Mail\Protocol\Abstract.php:277

user2697955I have been trying for the best part of an hour for us to enable SSL for our emails to be sent through google, but when ever i test it , I get this error http://pastebin.com/wRPmPkKj (It says generated 19 mins ago but I assure you I have been trying a lot harder.) We are using Xampp and google...

0
Q: Query not working, it is not deleting the values from the database

user2958298I have a drupal website where added a function that will allow the user to delete his account. I tested it and when i click on the button, nothing happens. I echoed out the values $u['meme'] and $u['id'] and they return the right thing which is not processed by the function. Why my query is not...

 
10:58 PM
0
Q: Parsing JSON Data with nested foreach() fails

Brett PowellWhen attempting to import a large JSON string of data into our MySQL Database, I have encountered an issue when nesting foreach loops. The following code works fine... $json = json_decode($jsondata, false); foreach ($json as $item) { $asset_type = "RAM"; foreach ($item -> assets -> $ass...

0
Q: Hit PHP from node server to process images

posit labsI'm trying to hit a php page from a node server so that it will generate some thumbnail images. The problem is that it isn't generating the images when i hit do a jquery.get request from node. It works perfectly if I hit the page from a browser, though. Here is the php code: <?php $thumbsFolde...

0
Q: How to grab data (titles, thumbnails and custom field) from multiple posts in a specific category to populate a map?

Jim CreedBasically, I have like 15K posts which I use them for directory purposes. I currently use a map plugin called '5 sec gmap' to show their locations in single posts. I customized that plugin to pull the posts' physical address from a custom-field called $wpcf-address to show. But, I want create a ...

0
Q: Loop only once on post excerpt

codekI'm displaying an excerpt that is pulled from an advanced custom field in wordpress. The problem I have is that the code generates a lot of spans if the post have different paragraph. How can I control to just generate one span? Just show the first one I mean. This is my code: <?php while...

0
Q: Magento Fatal Error when editing customer accounts

user2958356I have Magento 1.7.0.2 and when I try to edit a customer account in the admin panel i get this error: Fatal error: Call to a member function setRenderer() on a non-object in /home/techspec/public_html/magento/includes/src/Mage_Adminhtml_Block_Customer_Edit_Tab_Account.php on line 77 $attributes...

0
Q: View PDF in browser rather than download

Kieran McClungThere are meetings on this website and each meeting has a PDF attached showing the meeting minutes. The next meeting that takes place dynamically collects this attached PDF and allows for a download as the previous minutes. This is all working perfectly, however, when clicking the link for the pr...

0
Q: How can I download the xml file created by this php code?

Jon JamesMy php code is below, the source code that this produces gives me the data i want to save as an xml file. How could i do this? ini_set ("display_errors", "1"); error_reporting(E_ALL); session_start(); include_once('function.php'); $select_query = build_select_query("xml","cust_id",$_SESSION['cu...

0
Q: Php Private Message System

user2958351Hello my name is spyros im developing a social site with php ,html i have some problems with it . I stuck at the idea of creating private messages system , i managed to created but the problem is that i wanted to be created in a modal window like facebook .On my user.php like facebook i got some ...

0
Q: Manipulate content in a single tag

user2958354I am relatively new to programming and I have embarked on a quest to create a website that will eventually boost my career. To describe the website in a few words - I am a financial consultant and I want to create a place online where I can provide some basic information about personal finance in...

0
Q: I cant access wordpress CMS after I installed a plugin

atrikI installed a plugin in my wordpress site, and after I installed that every time I try to access the CMS it redirects me to http://mysite.com/wp-admin/install.php How can I solve this, thanks.

0
Q: XAMPP v1.8.2 VHOST 403 error

Josh C.i recently updated my xampp and now i can not host my vhosts. I have already updated my hosts file and everything i just dont know why im getting a 403 error or how to fix it. Here is my code NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot C:\vhosts\basinmedia ServerName basinmedi...

0
Q: rows added via javascript to table inside form don't submit

user2157370Hy, I have read many discussion on this argument but I just can't find a solution. I have table inside a form, the first rows of this table are displayed by a php script, I won't the user to be able to add a row to the table so that he can insert a new set of values. the problem is that this new...

0
Q: Echo variable from phpmailer in template

anvdHow can i pass a variable from phpmailer to contents.php (template file) ? I need to pass the $email variable. $mail -> msgHTML(file_get_contents('contents.php'), dirname(__FILE__)); contents.php <div> This email was sent by x. <a href="www.x.com/process_contact.php?email="<?php echo $ema...

0
Q: Shortcode with open and close tag doesn't works

GabrieleI tryed to use a shortcode that has an open and a close tag, but it doesn't works. This is my code: <?php if (is_category(4)) { echo do_shortcode('[access role="administrator, my-role"]Only admin and my role members'); } else { echo 'pass'; echo do_shortcode('[/access]')...

0
Q: Converting string to time in PHP

AdelphiaI am having some trouble trying to convert string to time. My Code is: $time = strtotime("14 November, 2013 2:30 AM"); echo $time ."<br />"; echo date("m/d/Y", $time); I know that strtotime is not magic, and I checked out the acceptable date/time formats but I am not sure how to convert the s...

0
Q: How to encode this XML values into a PHP literal?

AubinIn the context of a WS developpment, I use the following schema: <xs:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Apporteurs"> <xs:complexType name="namedValue_t"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:st...

0
Q: Is there a 'take notes' plugin for wordpress?

JakeMy question is exactly the same as this, not sure if it can be bumped so thought I'd post again. Basically I'm trying to create a scenario similar to how comments work. On a page, a registered user can submit a comment, except, only they can see it, no one else. These comments would be called no...

0
Q: HTML/CSS: Could this be achieved with a list or table?

John RobinsonI am trying to make a list of hyperlinked images, one for each color in a catalog. I want the layout to look like this: Only, I will probably only do 5 or 6 wide by however many tall. The images to be added will be generated from the result of a MySQL query, so it won't be static. It's easy en...

0
Q: mod-xsendfile 404 caused by SELinux

Ryan SOk. Wanted to share this - took me 10 hours to figure out. I had properly installed mod-xsendfile, following the good instructions here. I also configured xsendfile correctly in my /etc/httpd/conf/httpd.conf file, adding the settings: XSendFile on XSendFilePath /var/files_need_valid_s...

0
Q: Check Zend Registry variable inside htaccess?

Ronak ModiI want write redirect rule on the base of value inside Zend_Registry variable from htacces.. Something like this if(Zend_Registry::get('country') == 'uk'){ RewriteRule (.+).html /abc/page/directory/abc/view/$1 [L] }elseif(Zend_Registry::get('country') == 'ca'){ RewriteRule (.+).htm...

0
Q: Permission denied error in php when try to write in a txt file

DorukoI'm trying to write in a txt file the data i get from a html form, but I get this error: Warning: fopen(/var/www/4/datos.txt): failed to open stream: Permission denied in /var/www/4/ComprobacionFormulario.php on line 13 Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/w...

0
Q: Issues with composer.phar with nss and api.github.com

tedbI am attempting to use composer.phar on a server with RHEL6. Installation details: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 PHP 5.4.16 Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies My composer.json looks like this: {...

0
Q: PHP use canvas (html5) to copy and upload the copied picture to server

user2909037Is it possible for html5 canvas to be used has a very strong way to upload jpg, gif and png (converted to jpg) files to a server ? Normally we would do something like this http://hungred.com/useful-information/secure-file-upload-check-list-php/ and some other measures to prevent any code in and i...

0
Q: How to get width of a Div or table in Pixels?

Fernando BaltazarThe main reason of this question is because I need the Width of a DIV element which holds an image, but the resize script (timtumb) only accepts pixel size and not % (will be great). for example : timthumb.php?src=castle1.jpg&h=230&w=640 If I set the width 640 I will have the image size to be ...

0
Q: Imgaecreatefromjpeg not working when placed inside IF satement

Jben Kayei have a code that generates an image using imagecreatefromjpeg. it's working well, not until i decide to place it inside an if statement. my purspoe of doing that is to check whether a file is uploaded of not. if not, i will just use an image from the server. here is my code. please feel free to...

0
Q: PHP - Find the number of zeros in a decimal number

gtilflmLet's say we have 0.00045. I want to find a way to count the number of "significant" zeros after the decimal point (3 in this case). I've been trying to implement strpos or substr, but I'm getting stuck. Other exs.... 3.006405: Should return "2" 0.0000062: Should return "5" 9.0100000008: Shou...

0
Q: Xpath expression to get unknown element names with SimpleXMLElement

user1472549Iam trying to write an xpath expression to get element names from an xml based on some criterias. The thing iam after is to get a list of the element name of each element that has the child node "fields/enable". I don't know what the name of the elements is, i dont have any attribut to trigger b...

0
Q: How to insert text into a text file using php website

ldigginsI'm sure it's an easy solution, and i'm not great with the correct terms. Basically i have a form already using sql server. It submits great. I want to add another field then when someone types in whatever it adds it to the next line in a txt file. Is this possible? Thanks in advance!

0
Q: how to post from flash abject action script to wordpress

user2958418I am trying to post(upload) an image file to Wordpress from within a flash object embedded inside one of the pages of Wordpress. I get a fatal error like this: Fatal error: Call to undefined function wp_insert_post() in /home/content/94/11856294/html/wp-content/themes/notoriouswordpress/test.ph...

0
Q: Global Languages in MySQL with PHP

monamonaWe started website in intention that we only use English Language and do all insertion/deletion to MySQL using English. And use PHP to escape string while writing to DB. Now the situation is our website have lot of Chinese/German/Russia Users. and we are facing problem writing data into MySQL - ...

0
Q: Take the data from a mysql SELECT query and drag the individual records to a droppable area.

user2710772html goes here jquery library's go here stylesheet here draggable function goes here etc. all this works, and it actually works the way it should but I am looking fora different result. $result = mysqli_query($con, "SELECT * FROM employees"); echo "<table border='1'> <tr> <th>Fi...

 

« first day (259 days earlier)      last day (51 days later) »