Sorting LDAP Ouput With PHP3
I am wanting to create a telephone list of all users on a LDAP database. I have managed to extract the data, but cannot get the code to sort the results in alphabetic order , based on surname. My code:
View Complete Forum Thread with Replies
Related Forum Messages:
Sorting Active Directory/LDAP Output (Lastname, Firstname)
My company has asked me to put a company directory on our intranet site and I'm trying to use php to extract the users from our active directory server. I've got everything working, however, when the list of users is shown in the output, it seems to display the users in the order their accounts were created, with Administrator obviously being first. What do you think would be the best way to get the list to be sorted by lastname (sn), based on the coding below. usort? ldap_sort? Not really too familiar with using php and ldap or active directory. <?php $ldap_server = "ldap://ourldap"; $auth_user = "user"; $auth_pass = "pass"; // Set the base dn to search the entire directory. $base_dn = "ou=staff, dc=ourldap, dc=com"; // Show People $filter = "(&(objectClass=user)(objectCategory=person)(cn=*))"; // connect to server if (!($connect=@ldap_connect($ldap_server))) { die("Could not connect to ldap server"); } // bind to server if (!($bind=@ldap_bind($connect, $auth_user, $auth_pass))) { die("Unable to bind to server"); }
View Replies !
Ouput Formatting...
I would like to have the results of my query display in a grid format. The code below returns my thumbnails and links them to the actual images. However the entries in the database are simply paths to these images. I thought I could do this with CSS but the way this query is returning the results I am stuck and not sure how to resolve it. Any suggestions?
View Replies !
Select And Ouput
I'm trying to display a bunch of pictures in rows with 5 pictures per row. The filenames of the pictures are all stored in a MySQL database and the actual files are stored on the server. So, I know how to return and output all of the records from a MySQL table using a while statement. However, I need to only output five of them, insert a break in the HTML to start a new line, and then output five more and another break, and then do it again until there are no more pictures left. Anyone have any ideas?
View Replies !
Ouput Image
I am trying to output an image with text coming from a database" $image=mysql_result($result,$i,"image"); trying to output it like this: <img src=../prod_images/" . $image . " height=90> problem is that some images have a space in the text like "image 1". When it is outputted onto the screen, the browser does not read anything after the space. How can I get around this?
View Replies !
How To Ouput A Html Page To PDF ?
I been able to output data from MySQL page and put in into a generated HTML page using <TABLE>. Is there any fastest way to convert the HTML page directly into a PDF document for the user to download when the user click on a link, juts like the one (PDF Version / Printable Version) of Devshed.com?
View Replies !
Mysql/PHP To Excel Ouput?
I can successfully, output contents from two mysql tables into excel but I was wondering if there was a way of determining the actual layout - column sizes because at present they are all over tha place? .....
View Replies !
I'm Getting Strange Ouput In Url String
I've been getting strange output in my url string within my app lately. It adds stuff like ?1174406969965 when I'm not even posting a url string on my forms. This doesn't seem like a big issue, but I was wondering if anyone has ran into this before. Code:
View Replies !
HTML Ouput Gets Scrambled While Parsing
On a page I want to display rows of recordset, coming from a mysql database. The problem is that somewhere halfway, PHP seems to generate messed up HTML code for no reason at all. e.g: The first 54 records display correct syntax. Code bellow is an examlpe of a row ouput for record 54 Code:
View Replies !
Sorting Is Better Than MySQL Sorting?
I've had a few people come to me and tell me that they are able to sort huge amounts of data better in PHP than MySQL (as to how they go about that I didn't inquire since I thought it to be a little odd). Now, I know if you're returning only 100's or even 1000's of rows then a simple ORDER BY clause will work fine (better than developing a sorting algorithm in PHP). However, I can't seem to see where PHP would be better at sorting than MySQL. Does anyone have any experience with PHP being a better choice to sort something than MySQL?
View Replies !
Using SSI CGI In PHP3
I have my site in .php3 and I am getting some CGI files. They are counters, polls and date information. Also stat information for graphs and such. My problem is that every CGI I get it says to put in the SSI code: <!--#exec cgi="/cgi-bin/sigfigdate.cgi"--> Well, it don't work in PHP3. Is there a way to make SSI CGI work in my PHP3 document?
View Replies !
Php3.cgi And Php3.ini
I'm working with a web host that runs PHP3 by php3.cgi and don't have access to php3.ini but I need to modify the setting for upload_max_filesize. The exact version of PHP is 3.0.9. Is there anyway to override the value for just my program? And can someone explain to me what the difference is between the master and local settings displayed by phpinfo()? Does 'master' refer to compile time settings and 'local' the values set by php3.ini?
View Replies !
PHP3 And PHP 4
What is the difference between PHP4 and PHP 3? I tried the codes from a book which is based on PHP 3 on PHP4..but unfortunately it doesn't work? what should i do?
View Replies !
PHP3 And PHP4 Together
I'm a little new to the PHP thing. I want to try to setup my server to handle PHP3 and PHP4 requests easily. e.g. I have some scripts that are PHP3 and want to start learning PHP4. Instead of doing the simple (like anything I do is simple URL ) thing, I am attempting to set up apache to support MySQL, PHP3, PHP4, SSL, ColdFusion, SteelBlue, and maybe even Frontpage. Tell me I'm insane. Now I have read the "Soothingly Seamless" setup from the website, and had it mostly working, until some unforseen circumstances caused me to have to start over. I can set up Apache to use PHP4, MySQL, and SSL, but for those PHP3 scripts, I am a bit lost. Finally, my question. Is there a simple way (using the Sootingly Seamless page as a reference) to add PHP3 into the mix. Any help on this would be great!
View Replies !
PHP3 Or PHP4
I am starting to write some scripts. Now should I wait until PHP4 documentation and tutorials arise and write in PHP4, or should I just do everything in PHP3? I have a book on PHP3 and I want to know if the language has changed enough to make this book invalid. Thanks. Any clear input is appreciated.
View Replies !
Reauthentication In PHP3
I´m trying to reauthenticate users using PHP3 but variables like PHP_AUTH_USER can´t be unset. The only I have achieved is to obligue the user to change his name or his password using the Hidden element. However, if he doesn´t change anything the dialog box pops up until the Cancel button is pressed. Is possible to define variables like PHP_AUTH _USER that last until the session is closed? If not, is possible to reauthenticate?
View Replies !
Php3 On Redhat 6.1
I have never tried to get php3 to work on my home Linux PC until now. I am running Redhat Linux 6.1. Apache and PHP3 are both installed, but I don't think that they are configured by default. I haven't been able to find any information on-line specifically for this setup.
View Replies !
Filemaker Pro & Php3
Does anybody have experience with filemaker pro and php. I'm currently running a mysql database with php3 but a client of mine wants to use his filemaker pro database. So what problem may I expect?
View Replies !
Netscape And PHP3
when i search for data in MySQL and then create a link of the data returned to another page so users can click on the link and then edit the data associated with their selection, thats were Netscape fails to pass the data to the next page so when users click on the links nothing comes up except if they are using IE 4.0+ which passes the data with no plroblem. i already tried the forms in HTML and PHP but wiht no success.
View Replies !
Uninstall Php3?
I want to install a php4 rpm, but it says I have php3 installed already and to uninstall it. I did a search and the only thing I found was that I should delete all the php stuff I can find. I *think* it was installed binary style, not with an rpm. If I do it this way, should I edit any conf files also? Please help as I can not find anything on how to remove a binary installation!
View Replies !
Users IP On PHP3?
I have a project and PHP 3.0.12 is installed...rediculous I know, but its not my fault. what is the syntax for getting the visiting users IP? Nothing I try seems to work.
View Replies !
PHP3 + MySQL
I'm trying to design a form using PHP3 which will only print results should their be information in the appropriate column in MySQL. I thought the syntax was something like this, but to no avail. if ($row["column"] == [A-Za-z]){ print ("This column is full") } else { print ("This column is empty")} Explanation: If there is text in the column, print "The column is full", otherwise, print "The column is empty".
View Replies !
Changing Php3.ini !!
I need to enable magic_quotes_gpc. I have learned to get to php3.ini through FTP, have changed it's value, and uploaded the file again. However, the value does not seem to change. I am running a dedicated server, and have attempted to reboot the server. Any ideas to why the settings won't change? Could permissions be a factor?
View Replies !
.php Parsed But Not .php3?
can somebody tell me why my web server will parse .php files but not .php3 files? heres all the stuff in my httpd.conf.. Code: AddModule mod_php4.c <IfModule mod_dir.c> DirectoryIndex index.html index.shtml index.php index.php3 </IfModule> AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3-source .phps AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps is there anything i'm missing? .php3 files just show up as plain text my web browser but .php files get parsed and displayed.
View Replies !
.php Or .php3 Or .php4
With the advent of php4, which extension should we use. A lot of php3 pages use the .php3 extension, but by deafault the extension in the apache httpd.conf is .php. Should we just adapt .php4 or use .php to make sure future upgrades don't cause any issues with already existing code. I would welcome any thoughts.
View Replies !
UPLOAD WITH PHP3
I've built a form for uploading a user file, it works for sure, and PHP3 is even telling the name of temporary file in specified directory - BUT there's no such file there! And I can't find it any where in the system. I'm using Apache 1.3 on Linux RH 6.0 Hedwig.
View Replies !
Links In Php3
echo "<a href="link.htm" onMouseOver="window.status='Hie , I am Wallace ' return true ">Home</a><p>"; This script works fine in html page but when I put it in a php3 page an error message appears in the status bar .
View Replies !
Sessions In PHP3
I am trying to avoid recreating the wheel in developing a session object. Essentially, we want a session object that stores all of teh information we are collecting in a session table in the dbase. We want to store only the session ID in a cookie.
View Replies !
Php3-error
ive got php-4.3.9-3 on my fedora3....tried installing phptimesheet-1.2.4.tar.gz on my system..extracted the folder to document root of apache2..all the files of the timesheet have php3 extensions... php is working fine on my sys but php3 is not interpreted...when i go to //localhost/timesheet/timesheet.php3...i can see the source code of the page like... <?............................ ...................................?> ServerTokens OS ServerRoot "/etc/httpd" PidFile run/httpd.pid Timeout 120 KeepAlive Off MaxKeepAliveRequests 100 KeepAliveTimeout 15 <IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 </IfModule> <IfModule worker.c> StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule> Listen 80 LoadModule access_module modules/mod_access.so LoadModule auth_module modules/mod_auth.so LoadModule auth_anon_module modules/mod_auth_anon.so LoadModule auth_dbm_module modules/mod_auth_dbm.so LoadModule auth_digest_module modules/mod_auth_digest.so LoadModule ldap_module modules/mod_ldap.so LoadModule auth_ldap_module modules/mod_auth_ldap.so LoadModule include_module modules/mod_include.so LoadModule log_config_module modules/mod_log_config.so LoadModule env_module modules/mod_env.so LoadModule mime_magic_module modules/mod_mime_magic.so LoadModule cern_meta_module modules/mod_cern_meta.so LoadModule expires_module modules/mod_expires.so LoadModule deflate_module modules/mod_deflate.so LoadModule headers_module modules/mod_headers.so LoadModule usertrack_module modules/mod_usertrack.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule mime_module modules/mod_mime.so LoadModule dav_module modules/mod_dav.so LoadModule status_module modules/mod_status.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule asis_module modules/mod_asis.so LoadModule info_module modules/mod_info.so LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule vhost_alias_module modules/mod_vhost_alias.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule dir_module modules/mod_dir.so LoadModule imap_module modules/mod_imap.so LoadModule actions_module modules/mod_actions.so LoadModule speling_module modules/mod_speling.so LoadModule userdir_module modules/mod_userdir.so LoadModule alias_module modules/mod_alias.so LoadModule rewrite_module modules/mod_rewrite.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule cache_module modules/mod_cache.so LoadModule suexec_module modules/mod_suexec.so LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule file_cache_module modules/mod_file_cache.so LoadModule mem_cache_module modules/mod_mem_cache.so LoadModule cgi_module modules/mod_cgi.so
View Replies !
PHP3 And Define()
I know this might be an odd question, but does PHP version 3 support the define() function? What little PHP 3 documentation I have doesn't seem to contain the function, but I would think PHP 3 would support constants. I realize that upgrading and using PHP 4 and PHP 5 would give me the define() function, but that's not what I'm looking for, just the answer to this specific question. When the manual says, "PHP 4, PHP 5" and excludes "PHP 3" it's not always accurate, as there are many functions supported by PHP 3 not listed in the current manual.
View Replies !
Php3 Files
When I run localhost/info.html with the code <? phpinfp(); ?> This is running perfect but when I do the same with localhost/info.php or /info.php3 , it says the file is not found. I have checked all the possible mistakes. My apache config file has these lines ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php .html Action application/x-httpd-php "/php/php.exe"
View Replies !
.phtml Vs .php3 Vs .html
I'm looking for some advice about the pros and cons of different file name extensions for html/php documents. I'm working from the basic premise that it's not a good idea to keep changing the extension of a file because, for example, those hard-earned search engine references will be compromised if you change the name of a file in any way. It would seem shortsighted to give a php document a .php3 file extension since php4 is just around the corner. So I tend to prefer naming any document containing any version of php with the generic extension of .phtml. However, I could go the whole hog and give all my web page documents an extension of .html - whether or not they include php. But, as I understand it, the price I pay is that non-php code must now go through the php parser regardless, thereby (marginally) slowing down access to those pages. Is that a big overhead?
View Replies !
Multi-dimensional In Php3
Hi, I was using php4 on my test area and setup a 3d array like below.... <input type="text" name="col[<?echo $i1; ?>][<?echo $i; ?>]" value="<? /* if begin is yes then get input value from db */ if (($begin=="yes")| |($new_setnum == $setnum)) { echo $row_payele[$item2]; } /* else print current input box value */ else { echo trim($col[$i1][$i]); }?>" maxlength="8" size="4"> then i reference the value in the same way... $col[$i2][$i] etc.. This all worked fine on my own machine which is using php4. but when I go to the live server which is using php3 the variable is not picked up. Even if I try using $col[1][1] it doesn't work. Does anyone know why and a work around to it in php3??? Thanks in advance.
View Replies !
SSI And Perl Within .php3 Documents
Im new to PHP. I want to know if you can use ssi within .php3 documents and call php3 funtions in a .pl scritp. That is if you want to use the useful perl scripts you find on the web and combine them with php.
View Replies !
PHP3 Or PHP4 Tag Not Working
I am setting up my own Apache web server. I downloaded PHP4 but the only php tag that works is .php and not .php3 or .php4. Is this something in the Apache conf file?
View Replies !
Help!!! Having Trouble With Php3.ini File!
I have win32 shareware version of Mysql. I can't figure out how to get the dl("php3_mysql.dll") module to load automatically through the php3.ini file. I have been to the php3.ini file numerous times trying to get all of the paths and directories correct. I couldn't get any of them to work so I'm back to what the original instructions told me to do. That was to uncomment extension=php3_mysql.dll module under Windows extensions. I did that. And then the next step was to point the extension directory to where the php3.dll modules reside. And I did that. My extension_dir = chp3. I've even tried putting the "chp3" in quotes like so. The only way I can get my php3 scripts connecting mysql to run are by adding dl("php3_mysql.dll"); before my mysql_connect code. Can anybody help me.
View Replies !
PHP4 Functions In PHP3
An error in my configuration-file (probably) in PHP4 installed by EasyPHP makes it neccesary to use PHP3 local. And therefore, some functions are unavailable. Who knows a proper function for array_shift and in_array? Somebody gave me something, but it doesn't seem to work very good: <? function in_array($needle,$haystack) {for($i=0;$i<count($haystack) && $haystack[$i] !=$needle;$i++); return ($i!=count($haystack));} function array_shift($array) { $value_from_beginning=$array[0]; for($i=0;$array[$i];$i++) { $array[$i]=$array[$i+1]; } unset( $array[$i] ); return($value_from_beginning); }?>
View Replies !
Unique Cookie Id In PHP3
my server does only supports php3. I am attempting to make an unique ID for visitors to the site i'm building. I am not able to access the unique id i make "across the board" in the directory's hierarchy. The only way that I can access the Cookie ID is through pages that are located further down the hierarchy than the page that I initialized the ID cookie on. Does anyone have some suggestions as to how I can best approach my need to be able to access the cookie "across the board" from any page within the site?
View Replies !
PHP3 Data Validation
I have a site running with PHP3 and MySQL on the back end. There is an HTML form driving a set of search and update queries. For checkbox and radio button input, it's easy enough to obscure the input so that no damage can easily be done during the query. However, I was asked to add a text search field (i.e., Name contains _____). this field (call it searchstring) seems to work fine generally, but I am concerned about exposure and properly validating the user's input. In one case, the field is used to update data and provides an opportunity for the user to insert something like : Odonnell'delete * from employee;' which may have unpleasant effects on my database. Where can I find reliable information on protecting my site from unexpected user input? I have seen a few comments in this forum about handling ticks in user input, etc. but nothing comprehensive on the subject.
View Replies !
Disable Phpinfo In Php3
In PHP4 there is the posibility to disable the use of phpinfo() by putting "disable_functions = phpinfo" in the php.ini-file. Is this also possible with PHP3 (in php3.ini) or is there another way of disabling this function?
View Replies !
Got A Problem With PHP3 Upload!
I've built a form for uploading a user file, it works for sure, and PHP3 is even telling the name of temporary file in specified directory - BUT there's no such file there! And I can't find it any where in the system. I'm using Apache 1.3 on Linux RH 6.0 Hedwig. So what could be a problem.
View Replies !
Disk Quotas And PHP3
My network allows each user to access his/her own home directory in the server, and I limit the disk usage with the Linux Disk Quota System... but the Windows 9x and NT does not recognize the quota format and tells the client that he/she have xxx bytes free where this is the total free, not his/her quota usage... and I can access the user quota usage by repquota -u <user> command.... What I want to know is if is possible to read the user quota and display it in a dynamic web page compiled with php3, so my users can any time refresh and view his / her disk usage and so on...
View Replies !
|