I never had a problem with FirePHP. Among other tools I have used,
some gave "Headers already sent" problem. The rest failed in case of
AJAX requests.
AFAIR Breakpoints are used for debugging and are different from
Logging. For debugging you may have a look at xDebug
Kranthi.
http://g
Hi,
> Perhaps your server is configured to have output buffering enabled by default
Thanks. That was the problem. I spent a day trying to debug this.
Kranthi.
http://goo.gl/e6t3
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>> But the example will NOT work via the web browser on my Apache 2
>> (2.2.17) / PHP (5.3.5) Web Server!
May be a problem with the permissions ?
Kranthi.
http://goo.gl/e6t3
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
this might be of use
http://php.net/posix-getpwnam
<http://php.net/manual/en/function.posix-getpwnam.php>
Kranthi.
http://goo.gl/e6t3
you script looks (and works) fine. so i dont think the problem is in your script
I found firebug/live http headers firefox addons to be helpful in this situation
see if your client is actually sending "Authorization Basic" header
Kranthi.
http://goo.gl/e6t3
--
PHP General Mailing
wats the setting of display_errors php.net/display_errors ?
if you are not getting any output it might be because of a simple
parse error (mismatched brackets, misplaced semicolon etc) or an
exit/die command
Kranthi.
http://goo.gl/e6t3
--
PHP General Mailing List (http://www.php.net/)
To
in this case when you put a tab before the closing heredoc it is not
an error in itself. Its equivalent to removing the closing heredoc. so
PHP treats the rest of the code as part of the string.
A Parse error is reported when ?> OR end of the file is reached
--
PHP General Mailing List (http://w
The exact error message will help understand your situation
Most probable reason is Zend is not included in your include path
develop with error_reporting set to E_ALL & E_STRICT that will help
you understand many trivial errors
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
apache log files will be of help
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
echo $query;
before
$result = mysqli_query($dbc, $query);
might be of help to understand what is going wrong
copy that query and execute in phpMyAdmin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
apache error logs will be helpful in this case. Their location varies
depending upon your installation. But in any case they'll be insde
your server directory (IIRC it is c:/Program Files/Apache Software
Foundation/Apache by default)
--
PHP General Mailing List (http://www.php.net/)
To unsubscrib
they should be something like error_log-[date] not sure about windows though
>>However I have found that if I paste the html into my web page created by
>>Serif WebPlus 10 I get the "html" line but not the "php" line.
are you saying that you are getting the php code in your browser ?
This is a P
and if proxxy is the issue http://proxychains.sf.net/ will help
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
http_proxy or HTTP_PROXY i m not sure
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
As pointed out echo $insertSQl should help you locate many trivial
problems. But using PDO will avoid these kind of problems
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
probably not the issue, but is the php engine behind a proxy server ?
wget uses the environment variable, but PHP does not
Kranthi.
http://goo.gl/e6t3
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
uperglobal array
http://php.net/GLOBALS
http://php.net/heredoc
Kranthi.
http://goo.gl/e6t3
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Is MAX_FILE_SIZE passed to PHP as $MAX_FILE_SIZE?
only if register_golbals is set to ON in php.ini. This is a very bad
practice and should be avoided. Use $_POST['MAX_FILE_SIZE'] instead.
But in this case dont use the post variable also. define a constant in
your configuration file and use that c
i m not sure if i usderstood your question completely.
by database you mean something like phpmyadmin, right ?
i would save the latest session id of the boss in a file, and every
time an employee tries to log in, verify the time stamp of the session
file in the tmp folder.
and if the boss logs out
use some thing like http://uploadify.com
u can always check for the uploaded file extension/mime-type on the server side
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
i have an array
$parms = array('1' => 'a', 'b' => array(3 => 'test'));
i want $mail = '1:a 3:test';
array_walk_recursive($parms, function($val, $key, &$mail) {
$mail .= ucwords($key) . ': '. ucwords($val) . "\n";
}, &$mail);
The above function worked perfectly well
but i am getting: Call-time
i would configure apache to let php interpreter handle all kinds of
extensions ( http://httpd.apache.org/docs/2.0/mod/mod_mime.html#addhandler
)
even then u'll have go through all the steps pointed out by Ash.
the only advantage of this method is more user friendly URL
--
PHP General Mailing Lis
i would use a single point of entry to solve this problem
1. keep the files outside your doc root
2. in the php file files.php check for an authorized user, if so allow
the user to download the file
the path http://site.com/files/we23h4hk234hjksdjrjkl23jfasdf will
actually be http://site.com/files
i prefer using a template engine like smarty http://www.smarty.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
http://www.php.net/manual/en/function.mysql-get-server-info.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
== operator type casts the string to integer before comparing
so the comparison boils down to 0 == 0 which is true
these rules also apply to the switch statement
http://php.net/manual/en/language.operators.comparison.php
but with === the typecasting does no occur
--
PHP General Mailing List (htt
may be it is not the error with the code. The problem may be with some
' in the input. Print out the mysql error and/or the sql query to see
what is going wrong.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>> Your server management software may provide a way to get this information
>> either through the command line or through a network interface
Using exec('gconftool-2 -g
/apps/gnome-power-manager/timeout/sleep_display_ac') helped. Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsu
Hi all,
My PHP script is running as CLI. Can I get the Power Management
Settings of the server ?
I am using PHP 5.3.2 on Fedora 12 Machine (2.6.32.10-90.fc12.i686)
KK.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>> because arithmetic operations with "Unknown" operands should result to
>> "Unknown" ...
in PHP "Unknown" values are represented by NaN, not NULL
http://php.net/manual/en/function.is-nan.php
but what surprises me is
is_nan(6/0) = (bool)false (along with a warning)
>> Now PHP uses NULL as a 0 (
when you install pear package Mail a file called Mail.php will be
installed into C:/xampp/php/PEAR
>> Mail.php contains the class Mail. So getting a "class not found" error is
>> not possible..
are you sure you are doing require_once 'Mail.php' ?
--
PHP General Mailing List (http://www.php.net/)
thats weired...
Mail.php contains the class Mail. So getting a "class not found" error
is not possible... (require_once stops the script in case it can't
find Mail.php)
>> Do I need to move the Mail PEAR class to the same folder as my web folder
ensure that C:/xampp/php/PEAR folder is added to your
PEAR's mail package does support authentication.
http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm
In case you get a "Sent Successfully" message (but didn't get a mail
in your inbox or spam folder) there is a problem with your SMTP server
configuration. And
>> The
guess you are looking for
http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You can use javascript to trigger an onclick function every time a checkbox
is selected.
The onclick function can make an ajax call to a remote php script which can
then make the database query.
have you tried using a profiler like xdebug? or may be it is not a php
issue at all..
i find https://addons.mozilla.org/en-US/firefox/addon/1843 to be
helpful in these situations
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
header('HTTP/1.1 200 Ok');
in /subapp_members/search_user.php will do the job
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
you forgot httpd
KK.
On Fri, Apr 9, 2010 at 08:32, David McGlone wrote:
> Hey guys, quick question. I had to re-install my Ubuntu, and I forgot
> what package I needed so firefox will display the php files and not ask
> me to if I want to download them. I've done installed PHP5, mysql, and
> ph
>> print $a[0]; // prints 5
>> print $a[100]; // Notice: Uninitialized string offset: 100
Yup, this should happen when 5 is treated as an array of characters.
In other words as a string.
$a = '5';
echo $a[0];
echo $a[100];
gives you the expected result
regarding the original question, i think t
you can do that by using .htacess in the required directory
http://www.askapache.com/htaccess/apache-speed-cache-control.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
stream_socket_client("tcp://talk.google.com:5222")
i m trying to use http://code.google.com/p/xmpphp/ actually
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I did'nt understand completely. But I noticed that if i do
$opts = array('http' => array('proxy' => 'tcp://10.3.100.212:8080',
'request_fulluri' => true));
$context = stream_context_set_default($opts);
fopen, file_get_contents, etc. are working fine, but fsockopen is not
KK.
Hi all,
I want to run fsockopen etc behind a proxy.
proxychains (http://proxychains.sourceforge.net/) may be helpful,
unfortunately the support for that is pretty bad. Please inform me of other
alternatives
KK.
> When I first started using sessions, I was alarmed to read a very similar
> statement about
> sessions, but I soon found that if I started my program with the statement
> "session_start();" I could then set up, access, modify or clear any session
> variable at
> any time in my program. This is
Hi all,
I am trying to use http://code.google.com/p/xmpphp/ package. It uses
stream_socket_client to connect to XMPP servers. I am behind a proxy
server so obviously this is not working. Tried proxychains but to no
avail.
Am I missing something obvious?
Kranthi.
--
PHP General Mailing List
better try using ssh2_* functions
http://www.php.net/manual/en/function.ssh2-tunnel.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
most probable error in your case is the dev server has output
buffering enabled while it is turned off on the live server. try
phpinfo to verify
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Thanks all, I've found the solution! PHP Backend + JQuery works great!
Just out of curiosity. Can you please tell me how you initiated the download?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Just out of curiosity. Can you please tell me how you initiated the download?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The javascript function formValidator() must return false if any
errors are formed.
>>The PHP only runs if the fields are set by testing using ‘isset”.
You should definitely have a better validation than that. Remember
that all users dont have javascript enabled. Moreover it is very easy
to modify
I dont think the problem in discussion has a solution. Your idea can
probably work but I could not understand how $_REQUEST['compleated']
variable is populated.
However it suffers from 2 problems.
1. It consumes a lot of unnecessary bandwidth.
2. How are you going to initiate the download ?
That
No. You must have noticed gmail saying "images are blocked from .. ". This
is done to prevent spammers from knowing if your email is authentic or not.
Moreover you must have also noticed that all the news letters have a link
pointing to a web page version of the newsletter.
another point worth noting...
most of the major email clients does not display external css/images by
default. The user will have to grant permission explicitly.
my mistake didn't use move_uploaded_file to see if the uploading
is working or not in the first case
but i could not understand why
1. ini_get() is giving correct value while
$_FILES['file']['tmp_name'] is ignoring that.
2. move_uploaded_file($_FILES['file']['tmp_name'], 'file.php');
i doubt i can use ini_set in this scenario
http://us3.php.net/manual/en/ini.core.php#ini.upload-tmp-dir
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
; string '/tmp/phpbSZ6WP' (length=14)
var_dump(file_exists($_FILES['file']['tmp_name'])); gives me (/tmp
has permissions drwxrwxrwt and i never used file_move_upload or any
similar functions)
boolean false
am I missing something here?
Kranthi.
--
PHP General
may be unrelated to your problem... but are you behind a proxy?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
as jim stated you'll get a "undefined function" error if php_mysql
extension is not loaded.
in this case probably the MySql server is not running, or not running
on the default port (most likely the former)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.ne
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#RewriteCond
>> Db error: Access denied for user 'www-data'@'localhost' (using password: NO)
>> WTF? I´m not using a user called www-data for MySQL connections, but apache
>> runs as this user
in the case where $test is true there is an open mysql connection, but
when $test is false there is no open connecti
i never worked with postfix, but form my experience with hmail server
i can say that you need to relay through a mail account of ISP(not the
server itself)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
even APD is not up to the task
xdebug trace http://devzone.zend.com/article/2871 is sufficient, but
the output will be in a separate file.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
i faced the same problem quite a few times.
the general email route is
php script -> sender smtp server -> receiving mail server
in your case path 2 is broken. meaning port 25 is blocked by your ISP
the work around is:
1. see if your ISP provides you with an SMTP account that is not blocked (OR)
http://php.net/manual/en/language.operators.errorcontrol.php ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
cant http://us3.php.net/manual/en/function.set-exception-handler.php be used ?
getMessage());
}
set_exception_handler('exception_handler');
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thats a lot of headers to read..
At a first glance I can see that you did not specify a content-length
header. this is a must and must be equal to the size of the file in
bytes
--
Kranthi.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>> I've read that the upcoming Firefox 4 may have some features built in
>> for this sort of thing, and there are plugins out there for most
>> browsers that can do this as an added layer of security.
Sorry but I could not understand what you meant by "this"
coming back to original problem... you
/10/2009, Ashley Sheridan wrote:
> On Fri, 2009-10-02 at 12:51 +0530, kranthi wrote:
>> using the > relative..
>> http://www.w3schools.com/TAGS/tag_base.asp
>> but I am not sure if base tag works outside
>>
>> try... before curl_init()
>> where URL
ill use the first submit field it
>> finds I believe.
Cant agree with you on this though. as far as i know using name=""
(names of the two buttons may/may not be unique) is the only way to
track form submission for forms with multiple submit buttons. Please
point out if you
and yes i forgot to mention... i avoid hidden form elements because
they can be modified very easily and hence pose a security threat.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>> That only works if the user clicks on that submit button. If the user
>> hits the enter key in a text input, the form is submitted but the submit
>> input variable is not set. That is why an hidden input is a safer solution.
i doubt that, because i use the above mentioned method in nearly all
o
I would recommend using an open framework like yui/dojo/jquery for ALL
your javascript needs..(i personally prefer jquery) each of the above
mentioned frameworks have wysiwyg editors of their own.
try using http://code.google.com/p/jwysiwyg/ i doubt it will conflict
with your javascript with compa
i dont have any idea about your problem, but just an idea
have you used https://localhost in the browser while trying to check
_SERVER['SERVER_PORT'] ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I try to avoid the use of hidden form elements as much as possible,
especially for tracking whether a user has submitted a form or not...
I use name="submit" for the submit button instead, that will pass the
value of the submit button to the action script.
above all i use a template engine, smart
using the http://www.w3schools.com/TAGS/tag_base.asp
but I am not sure if base tag works outside
try... before curl_init()
where URL is parsed using PHP's parse_url() function on http://example.com
in either case if there are any external js/css files cURL wont fetch
external files(and if t
> '; ?>
may b u should have
'; ?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> @Andera May be you should consider using application/json as the
> content type instead of text/plain.
> The Response text given by Formaldehyde cannot be understood manually
> (for example if I use jQuery.load()).
> Had the content type been application/json firebug parses it by default
my mis
I dont think I understood you completely..
Javascript debugger: Something you use to debug javascript. but
Formaldehyde dosent make any seance if xhr object is not used.
PHP Debugger: We cant use Formaldehyde to debug errors in every single
PHP script. I am talking about pages called directly via
i prefer http://in3.php.net/strtotime it supports loads of other
formats as well (including +30 days and 8/26/2009)
above all it returns unix time stamp which can be used directly with date().
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
unset($obj) always calls the __destruct() function of the class.
in your case clearly you are missing something else. Probably
unset($anobject) is not being called at all ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
this might be some help...
http://stackoverflow.com/questions/283087/php-mysql-sql-parser-insert-and-update
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>> I imagine redirects couldn't be the cause of the problem, right?
Thanks, this is really a life saver.. I never used
session_write_close() before any redirects...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The original problem..
>> server is losing session variables.
I dont think PHP is not good at unset() ing variables while the script
is executing.
general logger will be of use in this case (especially when cant
reproduce the problem every time). PEAR, Zend, FirePHP, files... any
thing will do...
can you provide a sample URL that you have in your mysql database ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
may be you can use a couple of var_dumps to see what's happening
behind the screens.
and... use a debugger like xdebug.. it'll be of help
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
try adding
AddType application/x-httpd-php .pl --> or whatever extension your
perl script has
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>> That's a potential security flaw waiting to happen. A script like this
>> shouldn't be kept in a web-accessible directory.
/var/www is not the document root. document root is /var/www/html so I
dont think there's a problem.
>> /var/www (usually your server root)
I am mistaken regarding this.
f
Did you check SELinux options ??
I have a similar problem. For some unknown reason scan_dir() is not
able to read /home/user when run as Apache module. but the CLI is
giving expected results. I did not find any work around, but had to
read /var/www which is the home directory of 'apache' (this is
see if can run the same php file via CLI. does script.sh run without
any problems ? then, probably something linke SELinux is preventing
httpd from running scripts. you have to contact your system
administrator to get this fixed.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
dont you think http://in3.php.net/strtotime is a solution to your problem ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
A browser will always parse tag regard less of the
extension. the only condition is that the file should provide a mine
type 'text/css' for css files.
https://developer.mozilla.org/en/Incorrect_MIME_Type_for_CSS_Files
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
HTTP_REFERRER is transparent, but if can be messed with very easily. I
prefer use of $_SESSION vars if security is needed in my application
(epically when a page is shown after a POST request)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
you dont seem to understand how radio buttons work. they treat
name="sex[][]" as a single group. and you can select only one element
in that group.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
("Content-type:..')
in display_img.php
>> however with a .png extention to get the browser displaying the picture.
thats not required as long as you have correct Content-type header
Kranthi.
On Fri, Aug 7, 2009 at 05:38, Michael A. Peters wrote:
> Ben Dunlap wrote:
>>>
>
you will have to manually maintain the number in the bracket. but you
can try using a template engine like smarty, and use a for loop to
take care of the numbers in the brackets
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
mod_rewrite is the best solution available to your case. more over if
you are sure that your host supports .htaccess, there is very little
chance that they will block mod rewrite alone. you can confirm that by
phpinfo. look in apache2handler-> Loaded Modules section (this does
not tell you if .hta
\n";
}
wont this do ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
code:
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
i never used x-mapp-php5, but most of a forums say it is specific to
1and1 hosting service. php recommends application/x-httpd-php
http://us2.php.net/manual/en/install.unix.apache2.php
try adding AddType application/x-httpd-php .html in your root htaccess
if that dosent help you'll have to add th
Code:
passthru('firefox &');
echo '1';
I am expecting 1 to be echoed while firefox is running. but that is
not the case. ny ideas how i can make this work ?
Kranthi.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
1 - 100 of 149 matches
Mail list logo