Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Gd Issues


I got an image which i then want to modify using GD. the issue now here is, I cant store the image since the modification is only usable for each diffrent user and i dont want to send out the header allready.....is this even possible?




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
PDF Issues In IE
im having issue opening pdf's in IE, im basicly outputting a pdf to a browser by reading the file in then printing it out. The headers set are

header('Content-Type: application/pdf');
header('Content-Length: '.$file_size);
header('Content-Disposition: inline; filename="document.pdf"');

now this works fine on the local server in both IE and Firefox, however when i try and put it on the live server IE just asks wether i want to open or save "Adobe Acrobat Control for ActiveX". It works fine in firefox.

the headers sent on the live server show as

HTTP/1.0 200 OK
Date: Fri, 22 Dec 2006 12:11:25 GMT
Server: Apache/1.3.33 (Unix)
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Disposition: inline; filename="document.pdf"
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
X-Powered-By: PHP/4.4.4
Content-Length: 229287
Connection: close
Content-Type: application/pdf

has anyone come accross the same problem and possibly a soloution?


View Replies !   View Related
Php 4/5 Issues
I'm building a website, and I've been using Php 5 on my computer. I found out, however, that my hosting company still uses php 4. I uploaded my php files anyway, and they don't seem to be working. Does anyone know a good place to find what in my Php files may not be compatible with Php 4?

View Replies !   View Related
Legal Issues With Php ?
I made a commercial application using php and mysql database. Now i am interested in legal issues regarding commercial distribution of that software. I intend to sell that php code (distribute my .php files only). As I understand, it is free to me, right ? Meaning php+mysql are free to use, I do not have to pay fees to authors of php and mysql ? Can you direct me to read some more articles on legal issues, or anything I need to know before selling my softweare?

View Replies !   View Related
Issues With Mail()
I basically wrote an auto emailer that will send a welcome email to a new user and then update the db to say that the mail had been sent in order to avoid sending a million emails.

The problem is this.. mail() doesn't always return true when an email has been sent successfully... I know this because I tested it on myself a number of times last night. In faact, I am not sure the mail() function has ever returned true after a successful exicution.

Now I really have no idea if the emails are being sent of not since the mail() function returns false all the time and I know that atleast some of the time mail is being sent but I can not be certain that it is always being sent due to mail() returning false.

View Replies !   View Related
PHP Paging Issues
I am reposting this becuase i left out some important information.

I am trying to create a "Question and Answer" app with pageing nav system that will take u to the "first" "last" "prev" and "next" question.

I also have it set up to carry over the pageing when you click on the answer link. Now this wher things get weird. Now the "next" link does not show up as a link even though it the IF THEN ELSE statment is satisfied....

View Replies !   View Related
Security Issues With PHP SSI
I was wondering if there are any security issues I should know about with using PHP Server Side Includes.

View Replies !   View Related
SMTP Issues
For some reason my (IIS WinXP SP2) SMTP server doesnt send messages, everything comes through from php alright, the email is generated and so on, then all the mails endup in the: C:InetpubmailrootBadmail folder, ive tried all sorts on this one and it doesnt seem to work. I have had this setup before and worked fine but i belive i was using a bundled package of apache, php and mysql, at present im using standalone installations of the above mentioned.

View Replies !   View Related
Db Connection Issues
The pages I have are template driven and they seem to work until I try and connect to the MySql db - then the pages don't want to display properly. I am sure it is some error in the way I am coding it. code:

View Replies !   View Related
Having Some Date Issues
I'm creating a "power rankings" page and I have the database set up like this:

rank_id ¦ date ¦ player_id ¦ rank

I list each player and rank with the date (8 in total for each week).

I can get current rankings (or archived rank if viewing old rankings) with no problem. The problem I have is when I try to view the previous rank. I can't get the previous week to the one I'm viewing to work.

this is the code I current have. I need to change the "Get previous power8 date" section so that it gives me the date prior to either the current date, or the date given in the url.

//Get current power8 date
if(!empty($_GET)){
$current_power8 = $_GET['date'];
} else {
$query_current = "SELECT date
FROM power8
GROUP BY date
ORDER BY date DESC
LIMIT 0,1";
$current = mysql_query($query_current, $connectDB) or die(mysql_error());
$row_current = mysql_fetch_assoc($current);
$current_power8 = $row_current['date'];
}

//Get previous power8 date
$query_previous = "SELECT date
FROM power8
GROUP BY date
ORDER BY date DESC
WHERE date < $current_power8
LIMIT 0,1";
$previous = mysql_query($query_previous, $connectDB) or die(mysql_error());
$row_previous = mysql_fetch_assoc($previous);
$previous_power8 = $row_previous['date'];

I get an error with this: "WHERE date < $current_power8"

What can I do differently?

View Replies !   View Related
Loop Issues
I am having trouble trying to figure out how I should compose this loop to
give me ALL the results I want.
Below are my queries. I am querying two different databases to pull in
records that match the requested $id. I am then putting the result into a
$variable and also counting the number of rows returned. These queries work...

View Replies !   View Related
Security Issues?
I'm new to PHP but have read enough to know to ask the experts before implementing anything. I want to allow non-registered visitors to submit data via a form. That data would not be immediately viewable on the website (I would review and edit before adding the data to the rotation). The visitor would get a 'thank you' page upon submission (no posted data displayed back to them). Is there any danger to my database in allowing just text to be inserted? In other words, are there malicious things that malicious people could do with a text form? I'm not allowing image or file uploads or anything else.

View Replies !   View Related
Upgrade To 4.3.10 Issues?
I got an email from my web host stating that they are going to upgrade
their PHP on the server from 4.3.8 to 4.3.10.

Are there any known problems with this upgrade that need to be addressed
in the PHP scripts I use? I'm sure there will always be some small
glitches in an upgrade like this but I'm looking for any info on the
scale of any "register globals = off" type changes.

View Replies !   View Related
Authentication Issues
Well not exactly authentication issues, i am having an issue that is driving me crazy. On my page's index i have three frames. One frame for the top (banners and such), a left frame (for navigation), and a right frame for the body of the site. My problem is that in the left frame I have a php script to determine whether someone's logged in or not (using cookies).

If the person is not logged in, the table displays a login for, but if they are logged it says "welcome <user>". Thus far everything works perfectly. The place where i am having issues is when the user isn't logged in it shows the form, then they proceed to log in. Upon successful authentication i have the login script doing something like this
PHP Code:

View Replies !   View Related
Unicode Issues...
I was wondering if anyone could give me some suggestions to an issue that I am having. Basically, I have a simple form posting the field results to a database, and a method of editing the data that is being entered. So, I have a user typing out unicode lets use the trademark symbol (&#8482 -> ™.

The data is Posted to the form processing page and is entered into the database as the actual unicode (as it is typed out). The issue is that when the code is in edit mode, it exists in the page source as unicode (as it was typed into the form), but displays to the user as the symbol, which is also correct. The problem is that when I hit submit and Post the data to the processing page, the symbol is being Posted not the actual code for the symbol, which was originally typed into the input box and which existed in the source code of the edit input box's value.

Is there anyway to escape this, and on what end (the edit form display or the edit form's processing page)? I already played with the utf8_encode/decode fucntions with no results. I would also consider htmlentites(), but haven't tried as of yet.

View Replies !   View Related
DOMXML Issues
I've been stabbing at this for the past hour and I figured it out, but
there's some erratic behavior under certain conditions that I think I
should mention...

I used tidy to clean up an html document before reading it into an xml
document via DOMDocument->loadXML(). When I load the page via
loadXML(), the XPath won't return values at all for queries other than
"//" "*" or "." (such as //a, etc)

When I switch to DOMDocument->loadHTML(), it works fine.

I was wondering if anyone could give me a reason for this. It works
now, so I'm not complaining, just there was nothing in TFM to lead me
to believe this behavior would arise.

PHP 5.2.0 with Suhosin-Patch 0.9.6.2 (cli) (built: Nov 30 2006
17:40:17)
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies

View Replies !   View Related
PHP And SELECT Box Issues
I have an input form for which I've created a "matrix" for user input.
Basically, the user chooses a radio button and then through javascript, a
select box is displayed to define a value for that radio option, like so:

Choice: (Radio1) type: (select box1)
Choice: (Radio1) type: (select box2)
Choice: (Radio1) type: (select box3)
Choice: (Radio1) type: (select box4)
Choice: (Radio1) type: (select box5)

I know, it looks confusing and is ;)

Now the problem is weird:

After a record is stored, I want to also pull out the data and repopulate
this form with it. I've used the "checked" attribute to define the correct
radio button, and the "selected" attribute to define the selected dropdown
value. This works properly and appears in my HTML properly however when I
make a new choice in the drop-down select box, the value designated as
"selected" always takes precedence when the form is posted.

I really need the user to be able to modify the selct box for the radio
button that has been checked, or to pick a new radio button and then choose
options from that associated select box. For the sake of orderly
presentation, this is the easiest method I have found but for PHP, I need
to override the "selected" value if something new has been chosen.

To clarify a bit further, here's an example of the HTML to visualize
things:

<html>
<head>
<title>Select Box problem example.</title><meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/javascript">
<!--
function hide(id){
if (document.getElementById && document.createTextNode){
spans=document.getElementById
('mainform').getElementsByTagName('span');
m=document.getElementById('mainform');
for (i=0;i<spans.length;i++){
m.getElementsByTagName('span')
[i].style.visibility='hidden'
m.getElementsByTagName('p')
[i].style.background='#eee'
m.getElementsByTagName('p')
[i].style.borderColor='#ccc'
}
if(id!='none'){
m.getElementsByTagName('span')
[id].style.visibility='visible'
m.getElementsByTagName('p')
[id].style.background='#ffc'
m.getElementsByTagName('p')[id].style.borderColor='#
000'
}
}
}

View Replies !   View Related
SOAP Issues
I have a "Hello World" web service written in C# running on a win2003 server. From a Linux server I have PHP code which tries to execute the web service. The problem is that when I print the results of the function I get "Object id #2" instead of "Hello World".

But if I inspect the response with _getLastResponse, the Hello World message is inside the XML. What Am I missing? Here is the code and the results afterwards. PHP Code:

View Replies !   View Related
Issues With ImageCreateFromJPEG
I'm struggling to get imagecreatefromjpeg to work correctly.

I'm running PHP 4.3.9 with GD bundled (2.0.28 compatible).

If I run this:

$myimage = imagecreatefromjpeg("myfilename");

I get this error message:

Fatal error: Call to undefined function: imagecreatefromjpeg() in....

If I run this:

$myimage = @imagecreatefromjpeg("myfilename");

My program crashes out.

View Replies !   View Related
Memory Issues
i have alot of raw data (e.g. x-coords, y-coords) stored in text files,
and i'm reading from those text files so that i can use that data to
create graphs. i'm currently using the image_graph package
(http://pear.php.net/package/Image_Graph/) to create these graphs. the
problem i'm having is that my memory usage just after creating less
than 5 graphs is already at 3.5 megs, and i need to create over 100
graphs. so, memory usage is a big problem. does anyone have any
suggestions on how alleviate this problem?

View Replies !   View Related
Zend Issues
does anyone know of a way to decrypt zend files? it just comes up blank when i try to open it because its encrypted. and without decrypting it i can't fix the file.

View Replies !   View Related
Session Issues
I'm building a simple login form with a "remember me" checkbox. I've done
this before, just keeping the username and a hash of the password in a
cookie, and changing the expiration of the cookie based on the checkbox, but
this time I want to use sessions instead.

There's another site I was looking at which gives you a session cookie
immediately. When you log in, log out, quit the browser, or anything, the
cookie still contains the same session id, whether or not you checked the
remember me box. So the session hasn't expired, yet they still have the
"remember me" functionality.

How do you do that?

I'm thinking of tricks surrounding saving the time they logged in and
whether they chose the checkbox, but all of them would log a user out
eventually if they sat on the same page for too long.

View Replies !   View Related
Compiling Issues
I'm having issues compiling php v4.2.2 on Redhat 9.0. The goal
ultimately is to compile in mcrypt support, but that's a bit down the
road from here. I've chased down the dependencies for the configure
options below (I think), but it still won't configure.

It appears to be choking on MySql (v3.23.54). The error I get is
something like:

/usr/bin/ld : cannot find -lmysqlclient

However, /etc/ls.so.conf appears to point to the correct directory:
/usr/bin/mysql, the contents of which are listed below.

-----------------------------
Configure options:

--host=i386-redhat-linux --build=i386-redhat-linux
--target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include
--libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/usr/com --mandir=/usr/share/man
--infodir=/usr/share/info --cache-file=../config.cache
--with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d
--enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath
--enable-inline-optimization --with-bz2 --with-db3 --with-curl
--with-dom=/usr --with-exec-dir=/usr/bin --with-freetype-dir=/usr
--with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf
--with-gdbm --with-gettext --with-ncurses --with-gmp --with-iconv
--with-jpeg-dir=/usr --with-openssl --with-png --with-regex=system
--with-xml --with-expat-dir=/usr --with-zlib --with-layout=GNU
--enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes
--enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm
--enable-discard-path --enable-track-vars --enable-trans-sid --enable-yp
--enable-wddx --without-oci8 --with-pear=/usr/share/pear
--with-kerberos=/usr/kerberos --with-ldap=shared --with-mysql=shared,/usr
--------------------------------------------------------

View Replies !   View Related
Issues With PHP5
I've used php4 I just created a site and am using php5 server... now some of my commands are broken if(isset($HTTP_POST_VARS) doesnt workand my method of passing a variable through a url doesn't work also... ?id=1 anyone know what the fixes are?

View Replies !   View Related
Mysql_num_rows Issues
$item_name = $_POST['item_name'];
$item_author_id = $_SESSION['id'];
$item_location = $_POST['item_location'];
$item_description = $_POST['item_description'];
$item_type = $_POST['item_types'];
$extra_notes = $_POST['item_notes'];
$check_name = mysql_query("SELECT * WHERE item_name = '{$item_name}'");

if (mysql_num_rows($check_name) == 0){...

error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:WAMPwwwPPitemprogramcreate_item.php on line 14

trying to make it so it will check if that item name has already been used ot not, if not it will do the if and if no it will do the else.

View Replies !   View Related
Forum Issues
i am making a forum and on he index its supposed to have a list of forums, i have that but when you clock a forum its supposed to link to a sub forum, the sub forum should show posts in a table forumtutorial_posts that have forumid to the same value as the forum is in. heres my code:

View Replies !   View Related
URL Redirect Issues
I currently have a script that redirects the user to another page if a form button is clicked.  This redirect works fine right now, but I need it to redirect the user to a different page based on certain conditions.  I've tried two things, and both have failed.  My problem will no doubt make more sense after I post the code of my two attempts. Code:

View Replies !   View Related
PHP Cookies Issues
I am calling an application which needs some cookies to be set to function properly. The appln sets some cookie parameters on login and on furthur calls it require these cookies to follow.

I was successful in storing the cookies as a txt file using CURL. But in the furthur calls , how to pass that?

from curl tutorial i came to know that the cookies are automatically passed to the furthur calls. But how can i check that? If i have one variable Jsessionid in the cookies test, how can i check whether that variable remains the same in the next call?

Also, setting the cookies in the header and calling an url like http://xyz.com?JsessionId=abcd are same or not?

View Replies !   View Related
Interbrowser Issues
ive been designing a website for a card company. lately he has been having issues uploading cards but i have no issues when i try. the only difference is i am on firefox and he is on ie7. could this have any difference? Code:

View Replies !   View Related
UPDATE Issues
I have the code below which INSERTS a simple record in my DB (which works fine). The problem I have is that I want to be able to update a record if a specific email address already exists. So far everything I've tried doesn't work even though it all looks correct as far as I can tell.

If anyone can point out the mistake or point me in the right direction that would be great. Code:

View Replies !   View Related
Uploading Issues
We had a comprehensive uploading feature based on PHP for our website, but since we recently changed servers it seems to be giving us problems.

I've looked into the permission settings, etc and everything seems intact, but i am still not able to upload files.

Not sure if posting code will necessarily make a difference, but I can if needed. Has anyone had similar issues, or aware of what might be the cause?

View Replies !   View Related
Number_format Issues
I am having some number_format issues. Here is the code I currently have. It basically is just a MySQL database loading an array into some javascript .....

View Replies !   View Related
Email Issues
I am sending out a newsletter. Everytime I send out the body the email shows any Qutoes with backslashes. EG:

This is a 'test'

Shows to the user:

This is a 'test'

Now, before I send the $body variable I put it through stripslashes() but that doesn't work. Code:

View Replies !   View Related
Logic Issues
I'm trying to add a search function to my website, and I'm not real sure how to go about it. I have a loaded database on my site with the following fields:

id //(primary key)
title //(image title)
page //(name of the page the image is on)
thumb //(name of the thumbnail image)
kywords //(keywords that describe the image)

The kywords field has many keywords separated by commas. I used commas to prevent the end of one word and the beginning of the next from accidentally giving a false match. Code:

View Replies !   View Related
MkDir() Issues
I am trying to use MkDir to automatically create a directory like so:

mkdir("/home/httpd/vhosts/website.com/httpdocs/crm_admin/progressimages/$accountID/");

The page this script is on is in the httpsdocs folder, but the place I need to create the directory is in the httpdocs folder in the path given above.

I have set the permissions on all folders to 777, but I still get this error Code:

View Replies !   View Related
PHP $_GET Issues
I'm not sure if this is out of scope for this forum, because it also entails a little bit of SQL. If this is out of scope, please let me know. Here is a bit of my code:

$isbn = $_GET['isbn'];
if ($_POST['_submit_check']) {
if ($_POST['yes_no'] == 'yes') {
$delete_sql = "DELETE FROM lounge WHERE isbn = $isbn";
$db->query($delete_sql);
print "Entry deleted";
} elseif ($_POST['yes_no'] == 'no') {
print 'Entry not deleted'
}
} else {
print "Cannot process form";
}

I am trying to delete a record from a MySQL database. I am getting some information from the url: www.domain.com/delete.php?isbn=123 and use that isbn=123 as part of the SQL statement. I can print the $_GET['isbn'] on the screen and it works. The SQL query works in phpmyadmin when I use isbn = 123, but it won't work when I assign the $_GET['isbn'] to a variable named $isbn. I think I am having some problems putting these two things together. I can post more code if needed.

View Replies !   View Related
Unicode Issues
I'm playing around with an OpenID implementation, which uses cURL to send/retrieve the relevant data. The actual OpenID bit is working nicely, I can authenticate just fine. The problem, however, is when I use the Simple Registration Extension to retrieve a nickname from the ID server.

The nickname (and everything else, really) is supposed to be sent accross in UTF-8 format. For some reason, however, it seems like curl_init() is converting to a different character set, causing validation to fail for nickname's with non-Latin characters (like the û in my nickname). I've tried just about everything, including curl_init( utf8_encode( $url ) ); but nothing seems to work.

View Replies !   View Related
PHP Installation Issues
I'm currently running a little linux box at home with Apache2, PHP 4 and
mySQL 4. I was attempting to compile PHP 5 from source but when using ./configure I got the following error:

#configure: error: libxml2 version 2.6.11 or greater required.

I then downloaded and installed the libxml2 rpm but alas the ./cofigure still throws the same error :(

When I run #rpm -q libxml2 I get a responce so surely this means the package has been installed?

View Replies !   View Related
Login Issues
I'm working on getting a new user registered into both phpbb and into an opensource game called phpdiplomacy (can be found on sourceforge). I've gotten far enough where I can get the user registered/inserted into both databases. But when I attempt to login in to the game, I'm told I have a bad password. Although the encrypted pass in both the phpbb table and games table is the same. I'm not sure, but the game's config file contains the following, which may be affecting the game login:

var $random='enter30charactarshereplease'
/*
This is used to salt hashes, and the md5 hash of this is appended to the directory
that errors are logged to. *This should be long ( ~30 charecters), random, contain lots of weird charecters, etc* If this isn't changed or is predictable it is a serious security risk.

View Replies !   View Related
Dates Issues
$datepurchased=$resultup['datepurchased'];
$t_100=$datepurchased-360000;
if ($amountaccessed>1 || $datepurchased>$t_100){

what i need to know is if it already passed 3 days from the $datepurchased
(meaning if today is the 24 then it should return if the datepurchased is before the 21st.).

View Replies !   View Related
Issues With Require()
This is the directory setup of my page:

root -> sro -> admin
root -> sro -> login

What i'm having trouble with is that my login system is located in the login directory and has a file named safe.php I have to require this file in the pages in my admin directory for security. The problem is that safe.php has it's own dependencies in the login directory but looks for them in the admin directory. Is there a simple way to fix this?

View Replies !   View Related
Issues With SWITCH
Alright. I have a form on let's say, page 1 and the form contains a dropdown with numbers as values.

IE:
<select size="1" name="store">
<option value="1">Auburn</option>
<option value="2">Camillus</option>
<option value="3">Canandaigua</option>
<option value="4">Colonie</option>
<option value="5">Cortland</option>
<option value="6">Great Northern</option>
<option value="7">Liverpool</option>
<option value="8">New Hartford</option>
<option value="10">Oneonta</option>
<option value="12">Shoppingtown</option>
<option value="13">Vestal</option>
<option value="14">Watertown</option>
</select>               

Now, the form get's directed to page 2 and I have this code:

switch ($_POST[store]) {
case 1:
   $stadr = "1234 duffy ave";
   $cszip = "New York, NY";
   $phnum = "111-222-3333";
case 2:
   $stadr = "1234 duffy ave";
   $cszip = "New York, NY";
   $phnum = "111-222-3333";
case 3:
   $stadr = "1234 duffy ave";
   $cszip = "New York, NY";
   $phnum = "111-222-3333";
case 5:
   $stadr = "1234 duffy ave";
   $cszip = "New York, NY";
   $phnum = "111-222-3333";
case 6:
   $stadr = "1234 duffy ave";
   $cszip = "New York, NY";
   $phnum = "111-222-3333";
case 7:
   $stadr = "1234 duffy ave";
   $cszip = "New York, NY";
   $phnum = "111-222-3333";
case 8:
   $stadr = "1234 duffy ave";
   $cszip = "New York, NY";
   $phnum = "111-222-3333";
case 10:
   $stadr = "1234 duffy ave";
   $cszip = "New York, NY";
   $phnum = "111-222-3333";     
case 12:
   $stadr = "1234 duffy ave";
   $cszip = "New York, NY";
   $phnum = "111-222-3333";     
case 13:
   $stadr = "1234 duffy ave";
   $cszip = "New York, NY";
   $phnum = "111-222-3333";     
case 14:
   $stadr = "1234 duffy ave";
   $cszip = "New York, NY";
   $phnum = "111-222-3333";     
}
PLEASE NOTE that each case has a different address I just changed it for the sake of posting it here. Now, when I run through page 1 and hit submit it always displays case 14's variables. So, I went and I put an echo statement at the top (ie: echo $_POST[store]; ) and it returns the proper values. I just cannot figure out why It' not working. Please, any advice would be very much appreciated!

View Replies !   View Related
My Calendar Issues
I am having a slight problem with the following calendar code. What I would like it to do is start the 1st on the corresponding day of the week. So far I have not been able to get my code to correspond. If anyone here is able to assist with this small issue I would greatly appreciate it. Here is the glorious code.....

View Replies !   View Related
Imap Issues
I have searched the forums and the www and cannot find an answer to my specific question. I am writing a script to read emails from an IMAP server.

Everything is fine until I have an attachment. When I have an email with an attachment the message is not displayed. When I fix it so that the message is displayed, it prints out a bunch of garbage surrounding the message.

View Replies !   View Related
Basic FTP Issues
Running a really simple script here

$FTPserver = "xxx.xxx.xxx.xxx";
$FTPuser ="xxxxxxx";
$FTPpass ="xxxxxxx";

$ftp = ftp_connect($FTPserver) or die ("Can't connect to FTP Server : $FTPserver");
$login = ftp_login($ftp, $FTPuser, $FTPpass) or die ("Can't login to FTP Server : $FTPServer");

I get the first error (can't connect). However when i connect through a browser (ftp://xxx.xxx.xxx.xxx) it works fine.

Obviously im missing something fundamental here. Can anyone point me in the right direction?

View Replies !   View Related
Inlcude() Issues
I am trying to do

include("theme/menu.php?index");

what this would do it run the menu.php page and because ?index is there the menu.php page would recognize that the $_GET['index'] is set and then generate the code for the index menu. This also works with $_GET['section'] and $_GET['project']. Since there is going to be 3 different menus, but the top and bottom of all those menus are the same and it saves on number of PHP pages.

I saw fit to just make one menu file. Except well as we all know or, like me, seem to find out; PHP will not let you run a $_GET when including a file. Is there a way to by pass this or another way I can pass the information to the menu.php page. For testing I'm using a $_SESSION['MENU'] = 'index'; variable but I hate to have to keep doing that. Or is that my only hope to get this to work?

View Replies !   View Related
Register_shutdown_function Issues
I was astounished by the idea behind register_shutdown_function(), since it was the perfect solution for my problems with a web system developed in PHP.

The problem, as I've soon discovered, is that the function registered by this command is always called, meaning that even if a PHP script ends normally the shutdown function is called, messing everything up - since my registered function is intended to unregister sessions and so on IF a script dies abnormally.

Is there a workaround on this? I mean, I'd love that the function is still called if the user closes the browser or hits the stop button. The problem is I don't want it to be called if a script ends normally. Maybe I can do something with exit(int status) ?

Even if I can do something with exit(), what about if a script redirects to other, via the header() function?

View Replies !   View Related
Thumbnail Issues
im using the code. PHP Code:

$srcImg = imagecreatefromjpeg("/img1/$filename");
$origWidth = imagesx($srcImg);
$origHeight = imagesy($srcImg);

$thumbWidth = 200;
$thumbHeight = 133;

$thumbImg = imagecreate($thumbWidth, $thumbHeight);
imagecopyresized($thumbImg, $srcImg, 0, 0, 0, 0, $thumbWidth, $thumbHeight, imagesx($thumbImg), imagesy($thumbImg));

imagejpeg($thumbImg, "$filename", "img1/thumbs", 100);
......................

View Replies !   View Related
Some Header() Issues
I am having a bit of problems with the header() function. I am trying to do a simple script that redirects to a certain case id. Javascript (location.href) is not possible (at least not with my knowledge of javascript) since it has to work on Windows 2003 Server, and it ignores/blocks/prevents this javascript. So, I turned to header() and with the respective ob_start() and ob_end_flush() it works well in standard. Works:

header("Location: list.php");

Does not work:
header("Location: list.php?id=$id");
(simply assume $id is a number)

Is there anything I have missed regarding header? Can i get this to work or can it be done in another way?

View Replies !   View Related
Date Issues
i've got the date stored in my db in this format: 2454007 . How can i convert it to dd/mm/yyyy?. i'd like to create a list of events. i've got all the events, old and upcoming, in a db and i'd like to display only the upcoming ones. e.g. SELECT * FROM events WHERE date....(after current date).

View Replies !   View Related
Performance Issues
I am running a fairly large php/mysql app. In total it is only about
100 or so separate php files, but it is large because I have multiple
clients and each currently gets their own directory with a copy of each
of these files, which adds up quickly. Code:

View Replies !   View Related
Issues With A Check Box
I set up a field in a table in a database as follows:

enum('Yes', 'No') with a default of Yes

On a php page I have the following form:

<input type="checkbox" name="contact" CHECKED/>

and then I have this to check the form input and to create the quiery

$contact = isset($_REQUEST['contact']);

$query = "INSERT INTO contest (contact) VALUES ('$contact')";

My problem is that when the user keeps the box checked a record of YES stays in the database but when they uncheck it, nothing appears in the DB...where I would like it to say "No" instead of being null...

Any way to fix this? Is it a DB thing or a script thing?

View Replies !   View Related
GD Library + RAM Issues
I run a moderately popular website that provides PHP generated graphics. On our dedicated server with 2GB of RAM, we manage to crash more than once a day.

I fear there is something I need to do about the RAM issue. I use imageDestroy() at the end and unlink() all unused graphics. Does anybody know what the problem may be? Maybe you've had and solved this problem in the past?

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved